* Ed Schouten <[EMAIL PROTECTED]> wrote: > * Ed Schouten <[EMAIL PROTECTED]> wrote: > > I just merged the patch on AMD64 and I'm currently compiling a new > > install CD to test it. I'll let you know whether it works. Thanks a lot! > > It does. Please commit this patch on AMD64 as well.
To make it easier for our fellow readers, I've attached the patch that I'm using on FreeBSD/amd64 to boot my Macbook3,1. Yours, -- Ed Schouten <[EMAIL PROTECTED]> WWW: http://g-rave.nl/
--- src/sys/amd64/amd64/machdep.c 2007-11-15 23:00:57.000000000 +0100
+++ src/sys/amd64/amd64/machdep.c 2007-11-20 09:44:24.000000000 +0100
@@ -155,6 +155,9 @@
extern vm_offset_t ksym_start, ksym_end;
#endif
+/* Intel ICH register */
+#define ICH_PMBASE 0x400
+
int _udatasel, _ucodesel, _ucode32sel;
int cold = 1;
@@ -192,6 +195,27 @@
cpu_startup(dummy)
void *dummy;
{
+ char *ichenv, *sysenv;
+
+ /*
+ * On some systems, namely 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.
+ */
+ ichenv = getenv("hw.ich.disable_legacy_usb");
+ sysenv = getenv("smbios.system.product");
+ if ((ichenv != NULL) || (sysenv != NULL &&
+ strncmp(sysenv, "MacBook", 7) == 0)) {
+ if (bootverbose)
+ printf("Disabling LEGACY_USB_EN bit on Intel ICH.\n");
+ outl(ICH_PMBASE + 0x30, inl(ICH_PMBASE + 0x30) & ~0x8);
+ }
+ if (ichenv)
+ freeenv(ichenv);
+ if (sysenv)
+ freeenv(sysenv);
+
/*
* Good {morning,afternoon,evening,night}.
*/
pgpN12fCmDQKj.pgp
Description: PGP signature
