summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-05-11 13:31:05 +0000
committergallatin <gallatin@FreeBSD.org>2000-05-11 13:31:05 +0000
commit9da6b3add6a979a76b1f4e635daa0189d943d5c0 (patch)
tree2220076cfa70632140e6d6765e70aa967c5e35bf /sys/alpha
parenta9ed660f51d2b2b40897b782d076227c7097ed87 (diff)
downloadFreeBSD-src-9da6b3add6a979a76b1f4e635daa0189d943d5c0.zip
FreeBSD-src-9da6b3add6a979a76b1f4e635daa0189d943d5c0.tar.gz
Some white-box (NT) systems have SRM which reports a systype that's
the negative of their blue-box (UNIX/OVMS) counterpart. This was causing us to panic early in the boot process because we weren't expecting a negative index into the cpuinit[] array. Obtained from: NetBSD Reported by: Brett Bump <bbump@mail.enetis.net>
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/machdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index 8855858..1f94697 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -725,6 +725,14 @@ alpha_init(pfn, ptb, bim, bip, biv)
* Find out what hardware we're on, and do basic initialization.
*/
cputype = hwrpb->rpb_type;
+ if (cputype < 0) {
+ /*
+ * At least some white-box (NT) systems have SRM which
+ * reports a systype that's the negative of their
+ * blue-box (UNIX/OVMS) counterpart.
+ */
+ cputype = -cputype;
+ }
if (cputype >= ncpuinit) {
platform_not_supported(cputype);
/* NOTREACHED */
OpenPOWER on IntegriCloud