diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-07-08 10:55:55 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-07-08 10:55:55 +0000 |
commit | 64498ae3011ec268f91baa2048117e4626b5c42b (patch) | |
tree | b974feddd476716072a504a90fb6e0e0e2da4731 | |
parent | 0427110e4f7e3d1cd4951a5d4ed7e1bc94637259 (diff) |
Recognize that a symbol table may exist, move up proc0paddr if so.
-rw-r--r-- | sys/arch/alpha/alpha/locore.s | 5 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/machdep.c | 12 | ||||
-rw-r--r-- | sys/arch/alpha/include/cpu.h | 4 |
3 files changed, 13 insertions, 8 deletions
diff --git a/sys/arch/alpha/alpha/locore.s b/sys/arch/alpha/alpha/locore.s index f6e109df808..d4af7fbf64e 100644 --- a/sys/arch/alpha/alpha/locore.s +++ b/sys/arch/alpha/alpha/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.8 1997/07/06 16:26:46 niklas Exp $ */ +/* $OpenBSD: locore.s,v 1.9 1997/07/08 10:55:53 niklas Exp $ */ /* $NetBSD: locore.s,v 1.27 1996/12/03 19:54:16 cgd Exp $ */ /* @@ -58,6 +58,7 @@ bootstack: * Arguments: * a0 is the first free page frame number (PFN) * a1 is the page table base register (PTBR) + * a2 is the end of the symbol table * * All arguments are passed to alpha_init(). */ @@ -77,7 +78,7 @@ Lstart1: LDGP(pv) /* * Call alpha_init() to do pre-main initialization. * alpha_init() gets the arguments we were called with, - * which are already in a0 and a1. + * which are already in a0, a1 and a2. */ CALL(alpha_init) diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 63ca3802978..999f792104f 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.20 1997/07/06 16:25:30 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.21 1997/07/08 10:55:54 niklas Exp $ */ /* $NetBSD: machdep.c,v 1.61 1996/12/07 01:54:49 cgd Exp $ */ /* @@ -120,7 +120,6 @@ vm_map_t buffer_map; -void alpha_init __P((u_long, u_long)); int cpu_dump __P((void)); int cpu_dumpsize __P((void)); void do_sir __P((void)); @@ -189,16 +188,21 @@ int alpha_unaligned_fix = 1; /* fix up unaligned accesses */ int alpha_unaligned_sigbus = 0; /* don't SIGBUS on fixed-up accesses */ void -alpha_init(pfn, ptb) +alpha_init(pfn, ptb, symend) u_long pfn; /* first free PFN number */ u_long ptb; /* PFN of current level 1 page table */ + char *symend; /* end of the symbol table */ { extern char _end[]; + extern char *esym; caddr_t start, v; struct mddt *mddtp; int i, mddtweird; char *p; + /* Save the symbol table end */ + esym = symend; + /* * Turn off interrupts and floating point. * Make sure the instruction and data streams are consistent. @@ -359,7 +363,7 @@ alpha_init(pfn, ptb) if (PAGE_SIZE != 8192) panic("page size %d != 8192?!", PAGE_SIZE); - v = (caddr_t)alpha_round_page(_end); + v = (caddr_t)alpha_round_page(symend ? symend : _end); /* * Init mapping for u page(s) for proc 0 */ diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index 1ae32845eb4..1b5d53cc805 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.6 1997/01/24 19:57:10 niklas Exp $ */ +/* $OpenBSD: cpu.h,v 1.7 1997/07/08 10:55:52 niklas Exp $ */ /* $NetBSD: cpu.h,v 1.14 1996/12/07 01:54:50 cgd Exp $ */ /* @@ -142,7 +142,7 @@ void XentMM __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */ void XentRestart __P((void)); /* MAGIC */ void XentSys __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */ void XentUna __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */ -void alpha_init __P((u_long, u_long)); +void alpha_init __P((u_long, u_long, char *)); void ast __P((struct trapframe *)); int badaddr __P((void *, size_t)); void child_return __P((struct proc *p)); |