Project

General

Profile

Actions

Bug #177

open

Illumos should clear CMOS Warm Reset Code after each CPU start

Added by Per Allansson over 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2010-09-09
Due date:
% Done:

0%

Estimated time:
Difficulty:
Tags:
Gerrit CR:
External Bug:

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

Actions

Also available in: Atom PDF