From 0293f173995734509f0738c2a43e4a4d5aba1885 Mon Sep 17 00:00:00 2001 From: Hugh Graham Date: Mon, 8 Jan 2001 04:25:14 +0000 Subject: 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. --- sys/arch/vax/vax/subr.s | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3