Merge branch 'master' of git://www.denx.de/git/u-boot-mips
This commit is contained in:
commit
2fa0dd158c
@ -43,14 +43,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -53,14 +53,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -35,6 +35,6 @@ else
|
|||||||
ENDIANNESS = -EB
|
ENDIANNESS = -EB
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MIPSFLAGS += $(ENDIANNESS) -mabicalls
|
MIPSFLAGS += $(ENDIANNESS)
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += $(MIPSFLAGS)
|
PLATFORM_CPPFLAGS += $(MIPSFLAGS)
|
||||||
|
@ -234,11 +234,11 @@ reset:
|
|||||||
li t0, CONF_CM_UNCACHED
|
li t0, CONF_CM_UNCACHED
|
||||||
mtc0 t0, CP0_CONFIG
|
mtc0 t0, CP0_CONFIG
|
||||||
|
|
||||||
/* Initialize GOT pointer.
|
/* Initialize $gp.
|
||||||
*/
|
*/
|
||||||
bal 1f
|
bal 1f
|
||||||
nop
|
nop
|
||||||
.word _GLOBAL_OFFSET_TABLE_
|
.word _gp
|
||||||
1:
|
1:
|
||||||
move gp, ra
|
move gp, ra
|
||||||
lw t1, 0(ra)
|
lw t1, 0(ra)
|
||||||
@ -306,9 +306,9 @@ relocate_code:
|
|||||||
move t1, a2
|
move t1, a2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fix GOT pointer:
|
* Fix $gp:
|
||||||
*
|
*
|
||||||
* New GOT-PTR = (old GOT-PTR - CFG_MONITOR_BASE) + Destination Address
|
* New $gp = (Old $gp - CFG_MONITOR_BASE) + Destination Address
|
||||||
*/
|
*/
|
||||||
move t6, gp
|
move t6, gp
|
||||||
sub gp, CFG_MONITOR_BASE
|
sub gp, CFG_MONITOR_BASE
|
||||||
@ -341,15 +341,22 @@ relocate_code:
|
|||||||
j t0
|
j t0
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
.gpword _GLOBAL_OFFSET_TABLE_ /* _GLOBAL_OFFSET_TABLE_ - _gp */
|
||||||
.word uboot_end_data
|
.word uboot_end_data
|
||||||
.word uboot_end
|
.word uboot_end
|
||||||
.word num_got_entries
|
.word num_got_entries
|
||||||
|
|
||||||
in_ram:
|
in_ram:
|
||||||
/* Now we want to update GOT.
|
/*
|
||||||
|
* Now we want to update GOT.
|
||||||
|
*
|
||||||
|
* GOT[0] is reserved. GOT[1] is also reserved for the dynamic object
|
||||||
|
* generated by GNU ld. Skip these reserved entries from relocation.
|
||||||
*/
|
*/
|
||||||
lw t3, -4(t0) /* t3 <-- num_got_entries */
|
lw t3, -4(t0) /* t3 <-- num_got_entries */
|
||||||
addi t4, gp, 8 /* Skipping first two entries. */
|
lw t4, -16(t0) /* t4 <-- (_GLOBAL_OFFSET_TABLE_ - _gp) */
|
||||||
|
add t4, t4, gp /* t4 now holds _GLOBAL_OFFSET_TABLE_ */
|
||||||
|
addi t4, t4, 8 /* Skipping first two entries. */
|
||||||
li t2, 2
|
li t2, 2
|
||||||
1:
|
1:
|
||||||
lw t1, 0(t4)
|
lw t1, 0(t4)
|
||||||
|
@ -39,14 +39,14 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : { *(.data) }
|
.data : { *(.data) }
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = .;
|
||||||
.sdata : { *(.sdata) }
|
_gp = ALIGN(16) + 0x7ff0;
|
||||||
|
|
||||||
_gp = ALIGN(16);
|
.got : {
|
||||||
|
__got_start = .;
|
||||||
__got_start = .;
|
*(.got)
|
||||||
.got : { *(.got) }
|
__got_end = .;
|
||||||
__got_end = .;
|
}
|
||||||
|
|
||||||
.sdata : { *(.sdata) }
|
.sdata : { *(.sdata) }
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
cannot access physical memory directly from core */
|
cannot access physical memory directly from core */
|
||||||
#define UNCACHED_SDRAM(a) (((unsigned long)(a)) | 0x20000000)
|
#define UNCACHED_SDRAM(a) (((unsigned long)(a)) | 0x20000000)
|
||||||
#else /* !CONFIG_AU1X00 */
|
#else /* !CONFIG_AU1X00 */
|
||||||
#define UNCACHED_SDRAM(a) PHYSADDR(a)
|
#define UNCACHED_SDRAM(a) KSEG1ADDR(a)
|
||||||
#endif /* CONFIG_AU1X00 */
|
#endif /* CONFIG_AU1X00 */
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
/*
|
/*
|
||||||
|
@ -22,3 +22,28 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
|
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
|
||||||
|
|
||||||
|
#
|
||||||
|
# From Linux arch/mips/Makefile
|
||||||
|
#
|
||||||
|
# GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
|
||||||
|
# code since it only slows down the whole thing. At some point we might make
|
||||||
|
# use of global pointer optimizations but their use of $28 conflicts with
|
||||||
|
# the current pointer optimization.
|
||||||
|
#
|
||||||
|
# The DECStation requires an ECOFF kernel for remote booting, other MIPS
|
||||||
|
# machines may also. Since BFD is incredibly buggy with respect to
|
||||||
|
# crossformat linking we rely on the elf2ecoff tool for format conversion.
|
||||||
|
#
|
||||||
|
# cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
|
||||||
|
# cflags-y += -msoft-float
|
||||||
|
# LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
|
||||||
|
# MODFLAGS += -mlong-calls
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Meanwhile, U-Boot rely on PIC. We add proper switches explicitly.
|
||||||
|
#
|
||||||
|
PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic -pipe
|
||||||
|
PLATFORM_CPPFLAGS += -msoft-float
|
||||||
|
PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib
|
||||||
|
Loading…
Reference in New Issue
Block a user