Subject: Re: apic timing/clock problem in 4.0_RC3, MacBook 2x2.0
To: Juan RP <juan@xtrarom.org>
From: Marco Trillo <marcotrillo@gmail.com>
List: port-i386
Date: 11/10/2007 13:57:18
Hi,

On 11/10/07, Juan RP <juan@xtrarom.org> wrote:
> On Sat, 10 Nov 2007 11:30:16 +0100
> "Marco Trillo" <marcotrillo@gmail.com> wrote:
> > More news about the issue: as I reported before, that patch indeed
> > appears to resolve all the issues (thanks to Ryan Lortie for finding
> > the cause of the problem).
> > The problem is that adding this line to a generic kernel is quirky and
> > may affect negatively to other (non-MacBook) systems.
> >
> > There was some discussion on FreeBSD lists about how to implement this
> > in a portable and clean way. It seems that the MacBook can be detected
> > using a SMBIOS 'system product' string:
> >
> <http://lists.freebsd.org/pipermail/freebsd-current/2007-November/079643.html>.
> >
> > What do you think of applying a similar patch to NetBSD?
> >
> > By the way, I sent a PR describing the issue and the fix as
> > "port-i386/37305".
>
> Clearly SMBIOS is the way to go. I think you can use smbios_find_table()
> and smbios_get_string() for this (I haven't used SMBIOS yet), they are
> defined in x86/include/smbiosvar.h.
>

I'm experimenting with this. It seems that the SMBIOS stuff is only
compiled when ipmi(4) is also compiled (probably because it's the only
thing that uses it?).

But removing the 'if NIPMI > 0' stuff from src/sys/arch/x86/bios32.c
does it. The SMBIOS is detected as:

SMBIOS rev. 2.4 @ 0xe7440 (37 entries)

So I'll try to get the system product string to check for MacBook.

Thanks,
Marco