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>
This commit is contained in:
gallatin 2000-05-11 13:31:05 +00:00
parent a9ed660f51
commit 9da6b3add6

View File

@ -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 */