W dniu 17.10.2023 o 13:46, Nhi Pham pisze:
Then looked again at code from
Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiDsdt.c and noticed
UpdateStatusMethodObject() function. Copied some code and it worked.
Could you please check whether we can replace the
UpdateStatusMethodObject() function with the
AcpiAmlObjectUpdateInteger() function provided by AcpiLib?
AcpiAmlObjectUpdateInteger() finds \\_SB.USB0._STA, checks Buffer[0] and
quits because it is AML_METHOD_OP while it only works for AML_NAME_OP.
So I went a way I had in meantime. Added AML variable into DSDT and then
have _STA method return it's value (as I set it to either 0xF or 0x0).
DSDT.asl snippet:
----------------------------------------------------------------------
// USB XHCI Host Controller
Device (USB0) {
Name (_HID, "PNP0D10") // _HID: Hardware ID
Name (_UID, 0x00) // _UID: Unique ID
Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
Name (XHCI, 0xF) // will be set using AcpiLib
Method (_STA) {
Return (XHCI)
}
----------------------------------------------------------------------
And then:
// UpdateStatusMethodObject (AcpiSdtProtocol, TableHandle,
"\\_SB.USB0._STA", 0x0);
AcpiAmlObjectUpdateInteger (AcpiSdtProtocol, TableHandle,
"\\_SB.USB0.XHCI", 0x0);
With this change code works as expected. Thanks!
Will send v3.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109680): https://edk2.groups.io/g/devel/message/109680
Mute This Topic: https://groups.io/mt/101992601/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-