Get info of kernel symbol table from bootloader before calling consinit().
consinit() was moved before oea_init() in rev 1.136, but startsym and endsym are not initialized at that point. Now kernel symbols are usable (on ddb(4), ksyms(4) etc.) again on macppc.
This commit is contained in:
parent
9604fc283a
commit
bad6707cdd
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.141 2006/10/24 02:47:40 mrg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.142 2006/11/29 16:31:19 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.141 2006/10/24 02:47:40 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.142 2006/11/29 16:31:19 tsutsui Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -183,6 +183,14 @@ initppc(startkernel, endkernel, args)
|
||||
* but I really think the console should be initialized
|
||||
* as early as possible.
|
||||
*/
|
||||
#if NKSYMS || defined(DDB) || defined(LKM)
|
||||
/* get info of kernel symbol table from bootloader */
|
||||
memcpy(&startsym, args + strlen(args) + 1, sizeof(startsym));
|
||||
memcpy(&endsym, args + strlen(args) + 1 + sizeof(startsym),
|
||||
sizeof(endsym));
|
||||
if (startsym == NULL || endsym == NULL)
|
||||
startsym = endsym = NULL;
|
||||
#endif
|
||||
consinit();
|
||||
|
||||
oea_init(ext_intr);
|
||||
@ -203,13 +211,6 @@ initppc(startkernel, endkernel, args)
|
||||
/*
|
||||
* Parse arg string.
|
||||
*/
|
||||
#if NKSYMS || defined(DDB) || defined(LKM)
|
||||
memcpy(&startsym, args + strlen(args) + 1, sizeof(startsym));
|
||||
memcpy(&endsym, args + strlen(args) + 5, sizeof(endsym));
|
||||
if (startsym == NULL || endsym == NULL)
|
||||
startsym = endsym = NULL;
|
||||
#endif
|
||||
|
||||
if (args) {
|
||||
strcpy(bootpath, args);
|
||||
args = bootpath;
|
||||
|
Loading…
Reference in New Issue
Block a user