From 92af9dfc1cf821f95957d4c15687dcf074aab168 Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Thu, 3 Nov 2011 14:26:35 +0000 Subject: [PATCH] arch/m68k-amiga: No longer allocate nor clear .bss Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@42238 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/m68k-amiga/boot/aros-ram.ld | 12 +++--------- arch/m68k-amiga/boot/aros-rom.ld | 12 +++--------- arch/m68k-amiga/boot/mmakefile.src | 13 ------------- arch/m68k-amiga/boot/mmu.c | 2 -- arch/m68k-amiga/boot/start.c | 20 +------------------- 5 files changed, 7 insertions(+), 52 deletions(-) diff --git a/arch/m68k-amiga/boot/aros-ram.ld b/arch/m68k-amiga/boot/aros-ram.ld index 2f223d46f1..873f26e0fe 100755 --- a/arch/m68k-amiga/boot/aros-ram.ld +++ b/arch/m68k-amiga/boot/aros-ram.ld @@ -33,16 +33,10 @@ INCLUDE ../../../bin/amiga-m68k/gen/local_objs.ld _ss_end = .; } >valid - /* BSS, typically at 0x1020 - * The '+8' is to make sure not to overlap the - * inital memchunk with areas must be zeroed. + /* This should cause angry complaints if .data exists + * We don't want .bss, and we don't need it. */ - .bss.MEMF_LOCAL : { - _bss = .; - . = . + 0x8; /* Reserved for memchunk */ - *(.bss) - _bss_end = .; - } >valid + .bss : { *(.bss) } >invalid /* This should cause angry complaints if .data exists * We don't want .data, and we don't need it. diff --git a/arch/m68k-amiga/boot/aros-rom.ld b/arch/m68k-amiga/boot/aros-rom.ld index 5ab867c215..fe6d50d8d6 100755 --- a/arch/m68k-amiga/boot/aros-rom.ld +++ b/arch/m68k-amiga/boot/aros-rom.ld @@ -27,16 +27,10 @@ INCLUDE ../../../bin/amiga-m68k/gen/rom_objs.ld _ss_end = .; } >valid - /* BSS, typically at 0x1020 - * The '+8' is to make sure not to overlap the - * inital memchunk with areas must be zeroed. + /* This should cause angry complaints if .data exists + * We don't want .bss, and we don't need it. */ - .bss : { - _bss = .; - . = . + 0x8; /* Reserved for memchunk */ - *(.bss) - _bss_end = .; - } >valid + .bss : { *(.bss) } >invalid /* This should cause angry complaints if .data exists * We don't want .data, and we don't need it. diff --git a/arch/m68k-amiga/boot/mmakefile.src b/arch/m68k-amiga/boot/mmakefile.src index d14c16c5ec..02823f03ea 100644 --- a/arch/m68k-amiga/boot/mmakefile.src +++ b/arch/m68k-amiga/boot/mmakefile.src @@ -69,18 +69,6 @@ USER_AFLAGS := -m68060 -DADATE="\"$(shell date "+%d.%m.%Y")\"" # available RAM, and this 0x800-0x1000 area will be ignored. ROMLOC_ss := 0x0000800 -# The BSS should be located as close as possible to the start of -# MEMF_CHIP memory for the in-ROM version, to maximize the -# contigous available memory. It must physically abut the MemHeader, -# so that mh->mh_First is *after* the .bss, otherwise krnRomTagScanner -# will not be able to allocate any memory. -# -# This turns out to be: -# -# ChipRamStart + sizeof(MemHeader) -# 0x1000 + 0x20 -ROMLOC_bss := 0x0001020 - # Main ROM (0xf80000 - 0xffffff) ROMLOC_rom := 0x0f80000 @@ -168,7 +156,6 @@ $(DISTDIR)/aros-amiga-m68k.elf: $(DISTDIR)/aros-amiga-m68k-reloc.elf --section-start .rom=$(ROMLOC_rom) \ --section-start .ext=$(ROMLOC_ext) \ --section-start .ss=$(ROMLOC_ss) \ - --section-start .bss=$(ROMLOC_bss) \ $< $(Q)$(TARGET_OBJDUMP) -h $@ | grep '[rea][oxm][mte] ' diff --git a/arch/m68k-amiga/boot/mmu.c b/arch/m68k-amiga/boot/mmu.c index 05208dd833..25c1562c92 100644 --- a/arch/m68k-amiga/boot/mmu.c +++ b/arch/m68k-amiga/boot/mmu.c @@ -55,8 +55,6 @@ extern BYTE _rom_start; extern BYTE _rom_end; extern BYTE _ext_start; extern BYTE _ext_end; -extern BYTE _bss; -extern BYTE _bss_end; static void mmuprotect(void *KernelBase, ULONG addr, ULONG size) { diff --git a/arch/m68k-amiga/boot/start.c b/arch/m68k-amiga/boot/start.c index 2fa4aa4cb2..5a626ec2af 100644 --- a/arch/m68k-amiga/boot/start.c +++ b/arch/m68k-amiga/boot/start.c @@ -30,7 +30,6 @@ #define SS_STACK_SIZE 0x02000 extern const struct Resident Exec_resident; -extern void __clear_bss(const struct KernelBSS *bss); static void protectKick(struct MemHeader *mh, struct MemList *ml, ULONG *mask); @@ -154,8 +153,6 @@ extern BYTE _rom_start; extern BYTE _rom_end; extern BYTE _ext_start; extern BYTE _ext_end; -extern BYTE _bss; -extern BYTE _bss_end; extern BYTE _ss; extern BYTE _ss_end; @@ -189,7 +186,6 @@ static void protectROM(struct MemHeader *mh) { DEBUGPUTHEX(("Protect", (IPTR)mh)); protectAlloc(mh, &_ss, &_ss_end, "SS", FALSE); - protectAlloc(mh, &_bss, &_bss_end, "BSS", FALSE); DEBUGPUTHEX(("First ", (IPTR)mh->mh_First)); DEBUGPUTHEX(("Bytes ", (IPTR)mh->mh_First->mc_Bytes)); } @@ -209,7 +205,7 @@ static struct MemHeader *addmemoryregion(ULONG startaddr, ULONG size, struct Mem MEMF_FAST | MEMF_KICK | MEMF_PUBLIC | MEMF_LOCAL | (startaddr < 0x01000000 ? MEMF_24BITDMA : 0)); } - /* Must be done first, in case BSS and SS are in it */ + /* Must be done first, in case SS is in it */ protectKick((struct MemHeader*)startaddr, ml, mask); protectROM((struct MemHeader*)startaddr); @@ -454,15 +450,6 @@ void exec_boot(ULONG *membanks, ULONG *cpupcr) int i; BOOL wasvalid; UWORD *kickrom[8]; - const struct KernelBSS kbss[2] = { - { - .addr = &_bss, - .len = &_bss_end - &_bss, - }, { - .addr = 0, - .len = 0, - } - }; struct MemHeader *mh; LONG oldLastAlert[4]; ULONG oldmem; @@ -620,16 +607,11 @@ void exec_boot(ULONG *membanks, ULONG *cpupcr) /* Clear alert marker */ trap[0] = 0; - DEBUGPUTHEX(("BSS lower", (ULONG)&_bss)); - DEBUGPUTHEX(("BSS upper", (ULONG)&_bss_end - 1)); DEBUGPUTHEX(("SS lower", (ULONG)&_ss)); DEBUGPUTHEX(("SS upper", (ULONG)&_ss_end - 1)); Early_ScreenCode(CODE_RAM_CHECK); - /* Clear the BSS. */ - __clear_bss(&kbss[0]); - /* Mark all the kick memory as 'unprotected' */ markKick(KickMemPtr, &KickMemMask); -- 2.11.4.GIT