ACPI version 5.0 compatibility
This "feature" is added here just to keep things in mind.
Currently the coreboot ACPI FADT structure is compliant with version 3.0.
If one sets the version to 5.0 in the header, there will be problems at least with Windows 10 when booting:
1. ACPI 5.0 defines two additional fields in FADT called SLEEP_CONTROL_REG and SLEEP_STATUS_REG
2. Windows 10 is more restrictive on several fields within FADT (in general access_width and the x_gpe0_blk-structure seems to be important) when ACPI 5.0 is used
If the additional two fields are missing, Windows 10 seems to be able to deal with it and at least boots.
If the access_width is set to 0, Windows 10 will hang at a very early boot stage with no error message visible to the user.
If x_gpe0_blk structure is not filled in the right way, Windows 10 will end up in a blue screen and a reboot, endlessly.
I have tried to provide the very minimum that is needed to make Windows 10 boot correctly on current Apollo Lake
with ACPI 5.0 in FADT. Here is the patch set that is needed (based on current master 6fcaaef6140aca68603f57d1c684c3381d472ac4):
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c index 3c1faa5..5f54de2 100644 --- a/src/soc/intel/apollolake/acpi.c +++ b/src/soc/intel/apollolake/acpi.c @@ -125,12 +125,16 @@ void acpi_fill_fadt(acpi_fadt_t * fadt) fadt->x_pm1a_evt_blk.space_id = 1; fadt->x_pm1a_evt_blk.bit_width = fadt->pm1_evt_len * 8; fadt->x_pm1a_evt_blk.addrl = pmbase + PM1_STS; + //If access_size is missing, Win 10 will crash + fadt->x_pm1a_evt_blk.access_size = 2; fadt->x_pm1b_evt_blk.space_id = 1; fadt->x_pm1a_cnt_blk.space_id = 1; fadt->x_pm1a_cnt_blk.bit_width = fadt->pm1_cnt_len * 8; fadt->x_pm1a_cnt_blk.addrl = pmbase + PM1_CNT; + //If access_size is missing, Win 10 will crash + fadt->x_pm1a_cnt_blk.access_size = 2; fadt->x_pm1b_cnt_blk.space_id = 1; @@ -138,6 +142,11 @@ void acpi_fill_fadt(acpi_fadt_t * fadt) fadt->x_pm_tmr_blk.bit_width = fadt->pm_tmr_len * 8; fadt->x_pm_tmr_blk.addrl = pmbase + PM1_TMR; + // If the GPE0 entries are missing, Win 10 will end up in a blue screen + fadt->x_gpe0_blk.space_id = 1; + fadt->x_gpe0_blk.access_size = 1; + fadt->x_gpe0_blk.addrl = pmbase + GPE0_STS(0); + fadt->x_gpe1_blk.space_id = 1; }
So if we one day want to switch to ACPI 5.0, this might be important to know.
For now we go back to version 3 in FADT header for Apollo Lake and perhaps even Skylake.