Streamline bootinfo logic.

This commit is contained in:
sekiya 2004-01-03 10:28:18 +00:00
parent f491995334
commit 5b343c479b
1 changed files with 18 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.70 2004/01/03 04:26:34 lonewolf Exp $ */ /* $NetBSD: machdep.c,v 1.71 2004/01/03 10:28:18 sekiya Exp $ */
/* /*
* Copyright (c) 2000 Soren S. Jorvang * Copyright (c) 2000 Soren S. Jorvang
@ -34,7 +34,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.70 2004/01/03 04:26:34 lonewolf Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.71 2004/01/03 10:28:18 sekiya Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -229,23 +229,23 @@ mach_init(argc, argv, magic, btinfo)
uvm_setpagesize(); uvm_setpagesize();
if (magic == BOOTINFO_MAGIC && btinfo != NULL) { nsym = 0;
#ifdef DEBUG ssym = esym = NULL;
printf("Found bootinfo at %p\n", btinfo); kernend = round_page((vaddr_t) _end);
#endif bi_syms = NULL;
bootinfo = btinfo; bootinfo = NULL;
}
bi_syms = lookup_bootinfo(BTINFO_SYMTAB); if (magic == BOOTINFO_MAGIC && btinfo != NULL) {
if (bi_syms != NULL) { printf("Found bootinfo at %p\n", btinfo);
nsym = bi_syms->nsym; bootinfo = btinfo;
ssym = (caddr_t) bi_syms->ssym;
esym = (caddr_t) bi_syms->esym; bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
kernend = round_page((vaddr_t) esym); if (bi_syms != NULL) {
} else { nsym = bi_syms->nsym;
nsym = 0; ssym = (caddr_t) bi_syms->ssym;
ssym = esym = NULL; esym = (caddr_t) bi_syms->esym;
kernend = round_page((vaddr_t) _end); kernend = round_page((vaddr_t) esym);
}
} }
/* Leave 1 page before kernel untouched as that's where our initial /* Leave 1 page before kernel untouched as that's where our initial