Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/vax Use the symtab info given by loadfile in th...
details: https://anonhg.NetBSD.org/src/rev/460516bb720d
branches: trunk
changeset: 509378:460516bb720d
user: matt <matt%NetBSD.org@localhost>
date: Wed May 02 16:05:07 2001 +0000
description:
Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.
diffstat:
sys/arch/vax/vax/machdep.c | 9 +++++++--
sys/arch/vax/vax/subr.s | 9 +++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (53 lines):
diff -r 747c13387844 -r 460516bb720d sys/arch/vax/vax/machdep.c
--- a/sys/arch/vax/vax/machdep.c Wed May 02 15:59:38 2001 +0000
+++ b/sys/arch/vax/vax/machdep.c Wed May 02 16:05:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.114 2001/04/30 04:26:19 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.115 2001/05/02 16:05:07 matt Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -104,6 +104,8 @@
caddr_t msgbufaddr;
int physmem;
int dumpsize = 0;
+int *symtab_start;
+int symtab_nsyms;
#define IOMAPSZ 100
static struct map iomap[IOMAPSZ];
@@ -300,7 +302,10 @@
extern int end; /* Contains pointer to symsize also */
extern int *esym;
- ddb_init(*(int *)&end, ((int *)&end) + 1, esym);
+ if (symtab_start != NULL)
+ ddb_init(symtab_nsyms, symtab_start, esym);
+ else
+ ddb_init(*(int *)&end, ((int *)&end) + 1, esym);
}
#ifdef DEBUG
if (sizeof(struct user) > REDZONEADDR)
diff -r 747c13387844 -r 460516bb720d sys/arch/vax/vax/subr.s
--- a/sys/arch/vax/vax/subr.s Wed May 02 15:59:38 2001 +0000
+++ b/sys/arch/vax/vax/subr.s Wed May 02 16:05:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr.s,v 1.56 2000/12/02 17:07:55 ragge Exp $ */
+/* $NetBSD: subr.s,v 1.57 2001/05/02 16:05:09 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -109,7 +109,12 @@
pushl $to # Address to jump to
rei # change to kernel stack
to: movw $0xfff,_C_LABEL(panic) # Save all regs in panic
- addl3 _C_LABEL(esym),$0x3ff,r0 # Round symbol table end
+ cmpb $3,(ap) # symbols info present?
+ blssu 3f # nope, skip
+ bisl3 $0x80000000,8(ap),_C_LABEL(symtab_start)
+ # save start of symtab
+ movl 12(ap),_C_LABEL(symtab_nsyms) # save end of symtab
+3: addl3 _C_LABEL(esym),$0x3ff,r0 # Round symbol table end
bicl3 $0x3ff,r0,_C_LABEL(proc0paddr) # save proc0 uarea pointer
bicl3 $0x80000000,_C_LABEL(proc0paddr),r0 # get phys proc0 uarea addr
mtpr r0,$PR_PCBB # Save in IPR PCBB
Home |
Main Index |
Thread Index |
Old Index