Bug #177
openIllumos should clear CMOS Warm Reset Code after each CPU start
0%
Description
I have had a problem with a machine (Dell R210) that wouldn't boot/POST automatically after pulling the power, and after testing I found that this happened on all versions of Solaris/OpenSolaris/Illumos, but not when running other OSes, like Linux/OpenBSD/Windows.
After stepping through the kernel a bit I found that the problem was caused by the code in
usr/src/uts/i86pc/io/pcplusmp/apic_common.c
which, when starting the (additional) CPUs, sets the CMS 'Warm Reset Code':
static void
apic_cpu_send_SIPI(processorid_t cpun, boolean_t start)
{
...
if (start) {
outb(CMOS_ADDR, SSB);
outb(CMOS_DATA, BIOS_SHUTDOWN);
}
...
}
Well, this is all fine - I admit that I don't know how this works in detail - but if I look into the source code of Linux or OpenBSD I can see that this value is reset to 0 after each CPU start - which isn't done in the Illumos code - this is only done at shutdown.
Anyway, I made a quick test to add
if (start) {
outb(CMOS_ADDR, SSB);
outb(CMOS_DATA, 0);
}
before the call to intr_restore() in apic_cpu_send_SIPI(), and this
solved my problems - after applying this fix my machine happily booted/POSTed after pulling the power.
No data to display