Page 1 of 1

ACPI device initialization order

Posted: Thu Nov 19, 2020 5:20 am
by Gigasoft
The ACPI specification states that a device's _STA method is executed before executing the _INI method, which is in turn executed before _ADR, _CID, _HID, _UID and _SUN.

In Bochs, the _STA method of \_SB.PCI0.ISA.LPT accesses a PCI_Config operation region belonging to \_SB.PCI0.PX13, which is defined later. Also, the _STA method of \_SB.LNKA accesses a PCI_Config operation region belonging to \_SB.PCI0.ISA.P40C. Therefore, the devices containing those operation regions would have to have already had their _ADR object evaluated, right? So there is a specific order in which the devices have to be examined, but how does one know this? Is it just another Bochs bug? The specification specifically warns you not to access operation regions until the OS indicates they are ready.

Re: ACPI device initialization order

Posted: Thu Nov 19, 2020 2:26 pm
by isaacwoods
Without seeing the tables, I think it's probably likely that Bochs is just being lazy as it knows all those things will be hardcoded (most emulators don't do anything in their `_INI`s, from what I've seen). I'd bet that the `_ADR`s are just defined as constants?