summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHugh Graham <hugh@cvs.openbsd.org>2001-01-08 04:25:14 +0000
committerHugh Graham <hugh@cvs.openbsd.org>2001-01-08 04:25:14 +0000
commit0293f173995734509f0738c2a43e4a4d5aba1885 (patch)
treea2703b34e4c95200684d7410de4268b32e80ad82 /sys
parent79fae5a1b189219ba900bccebcf7c3efde1bcf57 (diff)
Compare the end of symbol table as passed from boot with the address
of _end in the kernel, and base Sysmap on whichever is higher. This permits stripped kernels to load despite unexpected values from libsa.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/vax/subr.s9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/vax/vax/subr.s b/sys/arch/vax/vax/subr.s
index 8730b39535c..212021c4f9c 100644
--- a/sys/arch/vax/vax/subr.s
+++ b/sys/arch/vax/vax/subr.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.s,v 1.9 2000/10/10 18:25:27 bjc Exp $ */
+/* $OpenBSD: subr.s,v 1.10 2001/01/08 04:25:13 hugh Exp $ */
/* $NetBSD: subr.s,v 1.32 1999/03/25 00:41:48 mrg Exp $ */
/*
@@ -54,7 +54,12 @@ ASENTRY(start, 0)
pushl $to # Address to jump to
rei # change to kernel stack
to: movw $0xfff,_panic # Save all regs in panic
- addl3 _esym,$0x3ff,r0 # Round symbol table end
+ moval _end, r0 # Get kernel end address
+ addl2 $0x3ff, r0 # Round it up
+ cmpl _esym, r0 # Compare with symbol table end
+ bleq eskip # Symbol table not present
+ addl3 _esym, $0x3ff, r0 # Use symbol end and round
+eskip:
bicl3 $0x3ff,r0,_proc0paddr # save proc0 uarea pointer
bicl3 $0x80000000,_proc0paddr,r0 # get phys proc0 uarea addr
mtpr r0,$PR_PCBB # Save in IPR PCBB