Date: Tue, 20 Nov 2007 10:26:58 +0100 From: Ed Schouten <ed@fxq.nl> To: Rui Paulo <rpaulo@FreeBSD.org> Cc: FreeBSD Current <freebsd-current@freebsd.org>, freebsd-i386@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem Message-ID: <20071120092658.GE17028@hoeg.nl> In-Reply-To: <20071118201519.GY17028@hoeg.nl> References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <200711121351.58616.jhb@freebsd.org> <e1309ba60711121219i1ca9773ei2fc3796849e1a669@mail.gmail.com> <200711121611.37781.jhb@freebsd.org> <e1309ba60711140159x4c1143b1n6d3d791cca80d61b@mail.gmail.com> <20071118182623.GX17028@hoeg.nl> <20071118201519.GY17028@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--kyLY//NQyQkWxTQC Content-Type: multipart/mixed; boundary="9Z5hYcGq4mWDMhAr" Content-Disposition: inline --9Z5hYcGq4mWDMhAr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ed Schouten <ed@fxq.nl> wrote: > * Ed Schouten <ed@fxq.nl> 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! >=20 > 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, --=20 Ed Schouten <ed@fxq.nl> WWW: http://g-rave.nl/ --9Z5hYcGq4mWDMhAr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="machdep.patch" Content-Transfer-Encoding: quoted-printable --- 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 =20 +/* Intel ICH register */ +#define ICH_PMBASE 0x400 + int _udatasel, _ucodesel, _ucode32sel; =20 int cold =3D 1; @@ -192,6 +195,27 @@ cpu_startup(dummy) void *dummy; { + char *ichenv, *sysenv; +=09 + /* + * 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 =3D getenv("hw.ich.disable_legacy_usb"); + sysenv =3D getenv("smbios.system.product"); + if ((ichenv !=3D NULL) || (sysenv !=3D NULL && + strncmp(sysenv, "MacBook", 7) =3D=3D 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}. */ --9Z5hYcGq4mWDMhAr-- --kyLY//NQyQkWxTQC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHQqhi52SDGA2eCwURAlXaAJ45tlJ8u25nZx2eoQOCHiJv1w12oQCfURgR alTpl7zZTTMT+1MYmv9fGsQ= =FG+m -----END PGP SIGNATURE----- --kyLY//NQyQkWxTQC--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071120092658.GE17028>