cancel
Showing results for 
Search instead for 
Did you mean: 

Z370-e BIOS bug, that I have fixed

renordw
Level 7
There is a critical error in the BIOS, in the ACPI setup under SSDT7.

I have taken the liberty to fix it on my machine, but I don't know where to report the bug, so here goes.

There are 3 big screwups on methods that require two arguments, being passed as a method with one argument and then a "hanging" argument. I am not sure how this was implemented, but it's total garbage.

For example \_SB.SGOV requires two arguments, but in positions where it SHOULD be invoked, \_SB.GGOV is invoked instead, and only takes ONE argument. So, instead of passing two arguments, one argument is given, and one argument is just hanging in the middle of nowhere, causing compilation errors in BIOS.

There are many instances of this behavior for example:

\_SB.GGOV (0x02010014)
OLDV

must be changed to:

\_SB.SGOV (0x02010014, OLDV)

For the board to handle power correctly. There are many such instances, I'll paste my fixed version:

/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20181031 (64-bit version)
* Copyright (c) 2000 - 2018 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of SSDT7, Tue Nov 6 15:49:09 2018
*
* Original Table Header:
* Signature "SSDT"
* Length 0x0000029F (671)
* Revision 0x02
* Checksum 0x48
* OEM ID "INTEL "
* OEM Table ID "sensrhub"
* OEM Revision 0x00000001 (1)
* Compiler ID "INTL"
* Compiler Version 0x20160422 (538313762)
*/
DefinitionBlock ("", "SSDT", 2, "INTEL ", "sensrhub", 0x00000001)
{
External (_SB_.GGOV, MethodObj) // 1 Arguments
External (_SB_.PCI0.I2C0.DFUD, DeviceObj)
External (_SB_.SGOV, MethodObj) // 2 Arguments
External (GPBS, UnknownObj)
External (SDS0, UnknownObj)
External (SHAP, UnknownObj)
External (USBH, UnknownObj)

Scope (\)
{
Device (SHAD)
{
Name (_HID, EisaId ("INT33D0")) // _HID: Hardware ID
Name (_CID, EisaId ("PNP0C02") /* PNP Motherboard Resources */) // _CID: Compatible ID
Method (_STA, 0, Serialized) // _STA: Status
{
If (((SDS0 & One) || (USBH & One)))
{
Return (0x0F)
}

Return (Zero)
}

Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
Name (PGCE, Zero)
Name (PGCD, Zero)
Name (PGCG, 0x2E)
Name (DFUE, Zero)
Name (DFUD, Zero)
Name (OLDV, Zero)
Name (PGCV, Zero)
Name (DFUV, Zero)
If ((Arg0 == ToUUID ("03c868d5-563f-42a8-9f57-9a18d949b7cb")))
{
If ((SHAP == One))
{
PGCG = 0x3A
}

If ((ToInteger (Arg1) >= One))
{
Switch (ToInteger (Arg2))
{
Case (Zero)
{
Return (Buffer (One)
{
0x0F // .
})
}
Case (One)
{
PGCE = DerefOf (Arg3 [Zero])
PGCD = DerefOf (Arg3 [One])
OLDV = \_SB.GGOV (0x02010016)
\_SB.SGOV (0x02010016, PGCE)
If ((PGCD > Zero))
{
Sleep (PGCD)
\_SB.SGOV (0x02010016, OLDV)
}

If ((\_SB.GGOV (0x02010016) == One))
{
Sleep (0x96)
If ((\_SB.GGOV (0x02010014) == One)){}
Else
{
Notify (\_SB.PCI0.I2C0.DFUD, One) // Device Check
}
}

Return (Zero)
}
Case (0x02)
{
DFUE = DerefOf (Arg3 [Zero])
DFUD = DerefOf (Arg3 [One])
OLDV = \_SB.GGOV (0x02010014)
\_SB.SGOV (0x02010014, DFUE)
If ((DFUD > Zero))
{
Sleep (DFUD)
\_SB.SGOV (0x02010014, OLDV)
}

Return (Zero)
}
Case (0x03)
{
DFUV = \_SB.GGOV (0x02010014)
PGCV = \_SB.GGOV (0x02010016)
Return (Package (0x02)
{
PGCV,
DFUV
})
}

}

Return (Zero)
}

Return (Zero)
}

Return (Buffer (One)
{
0x00 // .
})
}
}
}
}
3,183 Views
0 REPLIES 0