summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2007-12-16 20:37:27 +0000
committerrpaulo <rpaulo@FreeBSD.org>2007-12-16 20:37:27 +0000
commitb3d67d43ffdbca81d3bce98a57c9f3e24ee9e743 (patch)
tree850fcb9c649afa974cd5ebf25faf5d9917782ec0
parent7894d1eb6efd549fbe69aaf1bee681daa78037fa (diff)
downloadFreeBSD-src-b3d67d43ffdbca81d3bce98a57c9f3e24ee9e743.zip
FreeBSD-src-b3d67d43ffdbca81d3bce98a57c9f3e24ee9e743.tar.gz
Fix previous commit. The code ended up in the wrong function.
Approved by: njl (mentor)
-rw-r--r--sys/i386/i386/machdep.c42
1 files 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
OpenPOWER on IntegriCloud