diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2016-01-16 11:15:38 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2016-01-16 11:15:38 +0000 |
commit | 238edc1d467e84ebd56896977830f7100efcdffc (patch) | |
tree | 09cebfa8a19b8c3348648ce58a85d4ceb6d99863 | |
parent | 14bb73e7a860c71461c6ca641ece152b7bc71b46 (diff) |
Panic if someone boots the kernel by force without CPU 0. The system
will not work without that core.
-rw-r--r-- | sys/arch/octeon/octeon/machdep.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index c4c5d4874ef..d75818a5ffb 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.70 2015/12/02 14:56:15 visa Exp $ */ +/* $OpenBSD: machdep.c,v 1.71 2016/01/16 11:15:37 visa Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -412,6 +412,15 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused, #endif /* + * It is possible to launch the kernel from the bootloader without + * physical CPU 0. That does not really work, however, because of the + * way how the kernel assigns and uses cpuids. Moreover, cnmac(4) is + * hard coded to use CPU 0 for packet reception. + */ + if (!(octeon_boot_info->core_mask & 1)) + panic("cannot run without physical CPU 0"); + + /* * Init message buffer. */ msgbufbase = (caddr_t)pmap_steal_memory(MSGBUFSIZE, NULL,NULL); |