Move cn_tab initialization to bootstrap()

This commit is contained in:
martin 2012-07-31 14:23:33 +00:00
parent 1423b85c62
commit c93cee27e7
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.244 2012/07/29 18:05:46 mlelstv Exp $ */
/* $NetBSD: autoconf.c,v 1.245 2012/07/31 14:23:33 martin Exp $ */
/*
* Copyright (c) 1996
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.244 2012/07/29 18:05:46 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.245 2012/07/31 14:23:33 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -266,6 +266,8 @@ void
bootstrap(void)
{
extern uint8_t u0[];
extern struct consdev consdev_prom;
#if NKSYMS || defined(DDB) || defined(MODULAR)
struct btinfo_symtab *bi_sym;
#else
@ -273,6 +275,7 @@ bootstrap(void)
#endif
struct btinfo_boothowto *bi_howto;
cn_tab = &consdev_prom;
prom_init();
/* Find the number of CPUs as early as possible */

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.322 2012/07/30 17:29:55 christos Exp $ */
/* $NetBSD: machdep.c,v 1.323 2012/07/31 14:23:34 martin Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.322 2012/07/30 17:29:55 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.323 2012/07/31 14:23:34 martin Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_sunos.h"
@ -152,8 +152,6 @@ struct extent *dvmamap24;
void dumpsys(void);
void stackdump(void);
extern struct consdev *cn_tab, consdev_prom;
/*
* Machine-dependent startup code
*/
@ -169,7 +167,6 @@ cpu_startup(void)
paddr_t pa;
char pbuf[9];
cn_tab = &consdev_prom;
#ifdef DEBUG
pmapdebug = 0;
#endif