- Joined
- Sep 22, 2011
- Messages
- 1,520
- Motherboard
- HP EliteDesk 800 G5 Mini
- CPU
- i9-9900
- Graphics
- UHD 630
- Mac
-
- Mobile Phone
-
This is a question for those who have a basic understanding of programming and logic and it would help to know ASL. Is the code below a bug in the DSDT for the Dell Latitude E6410 (also in other Dell Latitude models)? Does this expression ALWAYS evaluate to TRUE and if so, should LOr be replaced with LAnd? The original unpatched DSDT.dsl is attached.
The Dell Latitude DSDT (BIOS A17) contains Method (GNOT) with the following lines of code in the disassembled DSDT.dsl:
OSYS is assigned a value depending on the Operating System (Linux: 0x03E8; Win 2001: 0x07D1; Win 2001 SP1 & SP2 0x07D2; Win 2006: 0x07D6; Win 2009: 0x07D9.
It appears that the ASL programmer was trying to create a condition, where something is done for Windows 2001 that is different from what is done for Linux, Win 2006 and Win 2009. Instead, it appears to me that the programmer has created a condition that ALWAYS evaluates to TRUE, so the first branch ( Notify (\_SB.PCI0, Arg1) ) is always executed. Those, like me, who set OSYS for Darwin equal to OSYS for Linux (or Windows 2006 or Windows 2009) will inadvertently always be setting it to Windows 2001.
Am I correct in my logic? If I'm not correct, where am I wrong?
Thanks for any feedback that would help me to learn.
The Dell Latitude DSDT (BIOS A17) contains Method (GNOT) with the following lines of code in the disassembled DSDT.dsl:
Code:
If (LOr (LGreater (OSYS, 0x07D0), LLess (OSYS, 0x07D6)))
{
Notify (\_SB.PCI0, Arg1)
}
Else
{
Notify (\_SB.PCI0.VID, Arg1)
}
OSYS is assigned a value depending on the Operating System (Linux: 0x03E8; Win 2001: 0x07D1; Win 2001 SP1 & SP2 0x07D2; Win 2006: 0x07D6; Win 2009: 0x07D9.
It appears that the ASL programmer was trying to create a condition, where something is done for Windows 2001 that is different from what is done for Linux, Win 2006 and Win 2009. Instead, it appears to me that the programmer has created a condition that ALWAYS evaluates to TRUE, so the first branch ( Notify (\_SB.PCI0, Arg1) ) is always executed. Those, like me, who set OSYS for Darwin equal to OSYS for Linux (or Windows 2006 or Windows 2009) will inadvertently always be setting it to Windows 2001.
Am I correct in my logic? If I'm not correct, where am I wrong?
Thanks for any feedback that would help me to learn.
Attachments
Last edited: