Zero bss in start, not in initppc.
This commit is contained in:
parent
7a7dfd71a7
commit
4f493fc42d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.5 2003/02/02 20:43:19 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.6 2003/02/24 08:06:42 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001, 2002 Wasabi Systems, Inc.
|
||||
|
@ -171,11 +171,7 @@ initppc(u_int startkernel, u_int endkernel, char *args, void *info_block)
|
|||
extern int ipkdblow, ipkdbsize;
|
||||
#endif
|
||||
int exc;
|
||||
extern char _edata, _end;
|
||||
struct cpu_info * const ci = &cpu_info[0];
|
||||
|
||||
/* Set the curcpu() pointer */
|
||||
mtspr(SPR_SPRG0, ci);
|
||||
struct cpu_info * const ci = curcpu();
|
||||
|
||||
/* Disable all external interrupts */
|
||||
mtdcr(DCR_UIC0_ER, 0);
|
||||
|
@ -183,8 +179,6 @@ initppc(u_int startkernel, u_int endkernel, char *args, void *info_block)
|
|||
/* Initialize cache info for memcpy, etc. */
|
||||
cpu_probe_cache();
|
||||
|
||||
memset(&_edata, 0, &_end-&_edata); /* Clear BSS area */
|
||||
|
||||
/* Save info block */
|
||||
if (info_block == NULL)
|
||||
/* XXX why isn't r3 set correctly?!?!? */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: walnut_start.S,v 1.4 2003/02/02 20:43:19 matt Exp $ */
|
||||
/* $NetBSD: walnut_start.S,v 1.5 2003/02/24 08:06:43 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -117,13 +117,6 @@ GLOBAL(intrcnt)
|
|||
.long 0
|
||||
GLOBAL(eintrcnt)
|
||||
|
||||
/*
|
||||
* File-scope for locore.S
|
||||
*/
|
||||
.data
|
||||
idle_u:
|
||||
.long 0 /* fake uarea during idle after exit */
|
||||
|
||||
/*
|
||||
* This symbol is here for the benefit of kvm_mkdb, and is supposed to
|
||||
* mark the start of kernel text.
|
||||
|
@ -183,10 +176,18 @@ __start_cpu0:
|
|||
tlbia
|
||||
sync
|
||||
isync
|
||||
|
||||
/* compute end of kernel memory */
|
||||
/* get start of bss */
|
||||
lis 3,_C_LABEL(_edata)-4@ha
|
||||
addi 3,3,_C_LABEL(_edata)-4@l
|
||||
/* get end of kernel memory */
|
||||
lis 8,_C_LABEL(end)@ha
|
||||
addi 8,8,_C_LABEL(end)@l
|
||||
/* zero bss */
|
||||
li 4,0
|
||||
2: stwu 4,4(3)
|
||||
cmpw 3,8
|
||||
bne+ 2b
|
||||
|
||||
#if defined(DDB)
|
||||
/* If we had symbol table location we'd store it here and would've adjusted r8 here */
|
||||
lis 7,_C_LABEL(startsym)@ha
|
||||
|
|
Loading…
Reference in New Issue