Fix previous commit. The code ended up in the wrong function.
Approved by: njl (mentor)
This commit is contained in:
parent
7894d1eb6e
commit
b3d67d43ff
@ -220,6 +220,27 @@ static void
|
||||
cpu_startup(dummy)
|
||||
void *dummy;
|
||||
{
|
||||
char *sysenv;
|
||||
|
||||
/*
|
||||
* On MacBooks, we need to disallow the legacy USB circuit to
|
||||
* generate an SMI# because this can cause several problems,
|
||||
* namely: incorrect CPU frequency detection and failure to
|
||||
* start the APs.
|
||||
* We do this by disabling a bit in the SMI_EN (SMI Control and
|
||||
* Enable register) of the Intel ICH LPC Interface Bridge.
|
||||
*/
|
||||
sysenv = getenv("smbios.system.product");
|
||||
if (sysenv != NULL) {
|
||||
if (strncmp(sysenv, "MacBook", 7) == 0) {
|
||||
if (bootverbose)
|
||||
printf("Disabling LEGACY_USB_EN bit on "
|
||||
"Intel ICH.\n");
|
||||
outl(ICH_SMI_EN, inl(ICH_SMI_EN) & ~0x8);
|
||||
}
|
||||
freeenv(sysenv);
|
||||
}
|
||||
|
||||
/*
|
||||
* Good {morning,afternoon,evening,night}.
|
||||
*/
|
||||
@ -1126,27 +1147,6 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
|
||||
static void
|
||||
cpu_idle_default(void)
|
||||
{
|
||||
char *sysenv;
|
||||
|
||||
/*
|
||||
* On MacBooks, we need to disallow the legacy USB circuit to
|
||||
* generate an SMI# because this can cause several problems,
|
||||
* namely: incorrect CPU frequency detection and failure to
|
||||
* start the APs.
|
||||
* We do this by disabling a bit in the SMI_EN (SMI Control and
|
||||
* Enable register) of the Intel ICH LPC Interface Bridge.
|
||||
*/
|
||||
sysenv = getenv("smbios.system.product");
|
||||
if (sysenv != NULL) {
|
||||
if (strncmp(sysenv, "MacBook", 7) == 0) {
|
||||
if (bootverbose)
|
||||
printf("Disabling LEGACY_USB_EN bit on "
|
||||
"Intel ICH.\n");
|
||||
outl(ICH_SMI_EN, inl(ICH_SMI_EN) & ~0x8);
|
||||
}
|
||||
freeenv(sysenv);
|
||||
}
|
||||
|
||||
/*
|
||||
* we must absolutely guarentee that hlt is the
|
||||
* absolute next instruction after sti or we
|
||||
|
Loading…
Reference in New Issue
Block a user