Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2011 12:00:24 -0700
From:      Xin LI <delphij@gmail.com>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        "George V. Neville-Neil" <gnn@neville-neil.com>, freebsd-current@freebsd.org, Johannes Dieterich <dieterich.joh@googlemail.com>
Subject:   Re: Boot halts on Thinkpad X220 (Sandy Bridge)
Message-ID:  <BANLkTikj%2BPVNKLP96JvdoQVqjc9zk8RQvA@mail.gmail.com>
In-Reply-To: <201105312003.29931.jkim@FreeBSD.org>
References:  <BANLkTikZnDcUHDc9oW%2Bbey%2B5D_oHpjd_1Q@mail.gmail.com> <BANLkTimJChpv2ZW5y3t5caekUiBezvxiJw@mail.gmail.com> <201105311650.16164.jkim@FreeBSD.org> <201105312003.29931.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 31, 2011 at 5:03 PM, Jung-uk Kim <jkim@freebsd.org> wrote:
[...]
> I found something strange about this BIOS (well, if we can call it
> that). =C2=A0Please try this:
>
> Index: sys/dev/atkbdc/atkbd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- sys/dev/atkbdc/atkbd.c =C2=A0 =C2=A0 =C2=A0(revision 222550)
> +++ sys/dev/atkbdc/atkbd.c =C2=A0 =C2=A0 =C2=A0(working copy)
> @@ -1100,7 +1100,8 @@ get_typematic(keyboard_t *kbd)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!(kbd->kb_config & KB_CONF_PROBE_TYPEMATIC=
))
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENODEV);
>
> - =C2=A0 =C2=A0 =C2=A0 if (x86bios_get_intr(0x15) =3D=3D 0 || x86bios_get=
_intr(0x16) =3D=3D 0)
> + =C2=A0 =C2=A0 =C2=A0 if (x86bios_get_intr(0x15) !=3D 0xf000f859 ||
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 x86bios_get_intr(0x16) !=3D 0xf000e8=
2e)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENODEV);
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Is BIOS system configuration table supporte=
d? */
>
> You must re-enable typematic probing from loader to test it, of
> course. =C2=A0I think the following line should do:
>
> hint.atkbd.0.flags=3D"0x10"
>
> Note: You may add printf() before and after the check to make sure it
> is being called (and it fails immediately).
>
> A long answer goes like this. =C2=A0INT 0x15 and 0x16 vectors have fixed
> entry points in *real* BIOS, i.e., 0xf000:0xf859 and 0xf000:0xe82e.
> For this BIOS (or CSM), INT 0x16 vector is correct but INT 0x15
> vector is not (0xf000:0xb4f1). =C2=A0Funny thing is 0xf000:0xf859 actuall=
y
> points to a working INT 15h handler, it seems, which confused me
> totally. =C2=A0Probably it was done like this because (U)EFI CSM spec.
> mandated it to be located @ 0xf000:0xf859. =C2=A0If we follow the
> interrupt vector (0xf000:0xb4f1), it gets nowhere (or jumps to an
> unknown external interrupt handler). =C2=A0If we follow the fixed address=
,
> it will exit gracefully. =C2=A0So, actually there are two possible
> solutions, i.e., 1) check whether the interrupt vector is modified
> (the above patch), or 2) jump directly to the fixed interrupt entry
> point. =C2=A0I chose Option #1 because it is very hard to find BIOS
> typematic support these days (as you pointed out).

Sorry for the delay.  I finally got a copy of (U)EFI spec and found
the requirement of fixed entry there.

Option #1 sounds like a good idea to me too (if the "BIOS" can break
one rule, it can also break more).  Could you please commit the change
(maybe revert mine before that?) and merge it back to -STABLE?

Thanks for your time on investigating this!

Cheers,
--=20
Xin LI <delphij@delphij.net> http://www.delphij.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikj%2BPVNKLP96JvdoQVqjc9zk8RQvA>