From b3d67d43ffdbca81d3bce98a57c9f3e24ee9e743 Mon Sep 17 00:00:00 2001 From: rpaulo Date: Sun, 16 Dec 2007 20:37:27 +0000 Subject: Fix previous commit. The code ended up in the wrong function. Approved by: njl (mentor) --- sys/i386/i386/machdep.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c8834c7..01fbf1c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -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 -- cgit v1.1