From: Luke Kenneth Casson Leighton Date: Mon, 21 Feb 2022 18:34:13 +0000 (+0000) Subject: use microwatt mmu powerpc.lds with better stack space X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7bb022f3f9d272371a4d546cc499e828d2d4e009;p=ls2.git use microwatt mmu powerpc.lds with better stack space --- diff --git a/coldboot/head.S b/coldboot/head.S index 104cb7e..38d5421 100644 --- a/coldboot/head.S +++ b/coldboot/head.S @@ -14,8 +14,6 @@ * limitations under the License. */ -#define STACK_TOP 0x2900 - #define FIXUP_ENDIAN \ tdi 0,0,0x48; /* Reverse endian of b . + 8 */ \ b 191f; /* Skip trampoline if endian is good */ \ @@ -61,7 +59,7 @@ _start: .global boot_entry boot_entry: /* setup stack */ - LOAD_IMM64(%r1, STACK_TOP - 0x100) + LOAD_IMM64(%r1, __stack_top) LOAD_IMM64(%r12, main) mtctr %r12, bctrl diff --git a/coldboot/powerpc.lds b/coldboot/powerpc.lds index 5e2f317..99611ab 100644 --- a/coldboot/powerpc.lds +++ b/coldboot/powerpc.lds @@ -1,13 +1,27 @@ SECTIONS { - _start = .; . = 0; + _start = .; .head : { KEEP(*(.head)) - } - . = 0x1000; - .text : { *(.text) } - . = 0x2c00; - .data : { *(.data) } - .bss : { *(.bss) } + } + . = ALIGN(0x1000); + .text : { *(.text) *(.text.*) *(.rodata) *(.rodata.*) } + . = ALIGN(0x1000); + .data : { *(.data) *(.data.*) *(.got) *(.toc) } + . = ALIGN(0x80); + __bss_start = .; + .bss : { + *(.dynsbss) + *(.sbss) + *(.scommon) + *(.dynbss) + *(.bss) + *(.common) + *(.bss.*) + } + . = ALIGN(0x80); + __bss_end = .; + . = . + 0x4000; + __stack_top = .; }