Re: Do not return true to all kind of Windows OSI calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 02 August 2008 06:59:52 pm Matthew Garrett wrote:
> On Sat, Aug 02, 2008 at 06:57:57PM +0200, Thomas Renninger wrote:
> > ThinkPads store OSI calls in separate variables and later
> > check for NT/XP/VISTA specific code to process.
> >
> > I lately saw a line on a ThinkPad checking for XP and VISTA
> > at video device specific code.
> >
> > So currently some ThinkPads run into code paths which should
> > either run on XP or VISTA, but Linux might execute them both
> > or in a way that is not intended by BIOS developers.
>
> Could you please show the code in question? I think you're misdiagnosing
> the issue.


If (CondRefOf (\_OSI, Local0))
                {
                    If (\_OSI ("Windows 2001"))
                    {
                        Store (0x01, \WNTF)
                        Store (0x01, \WXPF)
                        Store (0x00, \WSPV)
                    }

                    If (\_OSI ("Windows 2001 SP1"))
                    {
                        Store (0x01, \WSPV)
                    }

                    If (\_OSI ("Windows 2001 SP2"))
                    {
                        Store (0x02, \WSPV)
                    }

                    If (\_OSI ("Windows 2006"))
                    {
                        Store (0x01, \WVIS)
                    }
                }

...
# Only process this on XP, not on Linux and Vista
                           If (LAnd (\WXPF, LNot (\WVIS)))
                            {
                                Notify (\_SB.PCI0, Arg1)
                            }
                            Else
                            {
                                Notify (\_SB.PCI0.VID, Arg1)
                            }
                        }
...

# Only process this on XP, not on Linux and Vista
                        If (LAnd (LNot (\WXPF), \WNTF))
                        {
                            Store (0x00, \_SB.PCI0.LPC.C4C3)
                        }
...
                Device (HPET)
                {
                    Name (_HID, EisaId ("PNP0103"))
                    Method (_STA, 0, NotSerialized)
                    {
  ...
# Only disable HPET on NT, not on Linux
                          If (LAnd (\WNTF, LNot (\WXPF)))
                            {
                                Return (0x00)
                            }


Amazing, it looks like they already check for Linux by checking if
OSI returned true on two major Windows versions which would indicate
Linux running.

So yes, everything looks fine and it seems this was not luck, but
they already realized Linux does not return true for OSI(Linux)
anymore.

Why must we force vendors to implement such a madness, the OSI
implementation is so wrong.

So this seems to get the state-of-the-art then..., check whether several
Windows versions return true and you do not need to process broken code
which is only intended to run on a very specific broken Windows version.

     Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux