ACPI doesn't want to be enabled.
Posted: Wed Jul 08, 2020 1:51 pm
Here's my "enable acpi" function:
It gets stuck on "while( (inportw(fixedadt->PM1a_control_block) & 1) == 0);".
FADT is correct (I checked it in GDB).
outportb works (I didn't check it but my OS is quite a bit advanced already...).
sleep works with 1/100 second precision.
What may go wrong?
I will add that I use qemu and ACPI implemented in it is in version 1.
Code: Select all
void enable_acpi(FADT_t *fixedadt)
{
outportb(fixedadt->SMI_command_port, fixedadt->acpi_enable);
sleep(300);
while( (inportw(fixedadt->PM1a_control_block) & 1) == 0);
}
FADT is correct (I checked it in GDB).
outportb works (I didn't check it but my OS is quite a bit advanced already...).
sleep works with 1/100 second precision.
What may go wrong?
I will add that I use qemu and ACPI implemented in it is in version 1.