On 2017/02/10 11:37, Martin Pieuchot wrote:
> On 09/02/17(Thu) 18:30, joshua stein wrote:
> > When running on machines with a hw_vendor of "Apple Inc." or "Apple
> > Computer, Inc.", only return 1 for an OSI check of "Darwin" and not
> > the other Windows variants.
> >
> > Code in the AML of the MacBookAir7,1 (most likely all Macs) does
> > much different things when running on Darwin systems, but the AML
> > that checks for Darwin does this:
> >
> > OSYS = 0x07DC
> > If (CondRefOf (\_OSI, Local0))
> > {
> > If (_OSI ("Darwin"))
> > {
> > OSYS = 0x2710
> > }
> >
> > If (\_OSI ("Linux"))
> > {
> > OSYS = 0x03E8
> > }
> >
> > If (\_OSI ("Windows 2009"))
> > {
> > OSYS = 0x07D9
> > }
> > [...]
> >
> > So we can't just add Darwin to aml_valid_osi.
>
> I'm not sure to understand why we can't add Darwin, is it going to
> break non Apple machines?
Because of the ordering, if _OSI returns true for Windows 2009 then
its OSYS setting will overwrite the earlier one for Darwin.