src: Make HAVE_CF9_RESET set the FADT reset register
All supported x86 chips select HAVE_CF9_RESET, and also use 0xcf9 as reset register in FADT. How unsurprising. We might as well use that information to automatically fill in the FADT accordingly. So, do it. To avoid having x86-specific code under arch-agnostic `acpi/`, create a new optional `arch_fill_fadt` function, and override it for x86 systems. Tested on Asus P8Z77-V LX2 with Linux 5.7.6 and Windows 10 at the end of the patch train, both operating systems are able to boot successfully. Change-Id: Ib436b04aafd66c3ddfa205b870c1e95afb3e846d Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43389 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
This commit is contained in:
@@ -1219,6 +1219,7 @@ void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length)
|
||||
header->checksum = acpi_checksum((void *)bert, header->length);
|
||||
}
|
||||
|
||||
__weak void arch_fill_fadt(acpi_fadt_t *fadt) { }
|
||||
__weak void soc_fill_fadt(acpi_fadt_t *fadt) { }
|
||||
__weak void mainboard_fill_fadt(acpi_fadt_t *fadt) { }
|
||||
|
||||
@@ -1259,6 +1260,8 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
|
||||
else
|
||||
fadt->preferred_pm_profile = PM_DESKTOP;
|
||||
|
||||
arch_fill_fadt(fadt);
|
||||
|
||||
acpi_fill_fadt(fadt);
|
||||
|
||||
soc_fill_fadt(fadt);
|
||||
|
Reference in New Issue
Block a user