From 8f8147612fd50f4759471246fe545c6dd6efdc44 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 20 Feb 2003 21:57:59 +0000 Subject: 2003-02-20 Till Straumann PR 349/bsps * startup/Makefile.am, startup/linkcmds startup/Makefile.am, startup/bspstart.c, startup/pgtbl_activate.c, startup/pgtbl_setup.c: Let the powerpc/shared (+derived) BSPs use pagetable support from libcpu. --- c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog | 8 ++++++++ .../powerpc/motorola_powerpc/startup/Makefile.am | 2 +- .../libbsp/powerpc/motorola_powerpc/startup/linkcmds | 19 ++++++++++++++----- 3 files changed, 23 insertions(+), 6 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog index 09e5831bce..5776dee3ce 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog @@ -1,3 +1,11 @@ +2003-02-20 Till Straumann + + PR 349/bsps + * startup/Makefile.am, startup/linkcmds startup/Makefile.am, + startup/bspstart.c, startup/pgtbl_activate.c, startup/pgtbl_setup.c: + Let the powerpc/shared (+derived) BSPs use pagetable support + from libcpu. + 2003-02-20 Till Straumann PR 349/bsps diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am index 1a41694842..06b1e5a96e 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am @@ -6,7 +6,7 @@ VPATH = @srcdir@:@srcdir@/../console:@srcdir@/../../../shared:@srcdir@/../../shared/startup C_FILES = bootcard.c main.c bspstart.c bsppost.c bsplibc.c sbrk.c bspclean.c \ - gnatinstallhandler.c + gnatinstallhandler.c pgtbl_setup.c pgtbl_activate.c C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) OBJS = $(C_O_FILES) diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/linkcmds b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/linkcmds index 86b212767a..a5e515dc08 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/linkcmds +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/linkcmds @@ -7,7 +7,7 @@ ENTRY(_start) PROVIDE (__stack = 0); MEMORY { VECTORS : ORIGIN = 0x0 , LENGTH = 0x3000 - CODE : ORIGIN = 0x3000 , LENGTH = 0x200000 + CODE : ORIGIN = 0x3000 , LENGTH = 0x400000 } SECTIONS { @@ -76,9 +76,6 @@ SECTIONS .fini : { _fini = .; KEEP(*(.fini)) } > CODE - _etext = .; - PROVIDE (etext = .); - .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } > CODE .rodata1 : { *(.rodata1) } > CODE @@ -104,6 +101,13 @@ SECTIONS .sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >CODE .eh_frame : { *.(eh_frame) } >CODE + /* NOTE: if the BSP uses page tables, the correctness of + * '_etext' (and __DATA_START__) is CRUCIAL - otherwise, + * an invalid mapping may result!!! + */ + _etext = .; + PROVIDE (etext = .); + /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. It would be more correct to do this: @@ -119,8 +123,13 @@ SECTIONS that no actual memory is lost; the page which is skipped can not be referenced). */ . = ALIGN(0x1000); - .data : + .data ALIGN(0x1000) : { + /* NOTE: if the BSP uses page tables, the correctness of + * '__DATA_START__' (and _etext) is CRUCIAL - otherwise, + * an invalid mapping may result!!! + */ + PROVIDE(__DATA_START__ = ABSOLUTE(.) ); *(.data) *(.gnu.linkonce.d*) SORT(CONSTRUCTORS) -- cgit v1.2.3