soc/amd/stoneyridge/northbridge: use acpi_align_current

Use acpi_align_current to align the ACPI tables on a 16 byte boundary.
This changes the alignment of the HEST, IVRS, SRAT and SLIT tables from
8 bytes to 16 bytes. The alignment of the ALIB and PSTATE SSDT tables
was already 16 bytes before, so the alignment of those isn't changed.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8933e3731b67012bcae0773db2f7f8de7cd31b56
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72055
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2023-01-18 15:47:39 +01:00
parent e988cc20b6
commit 9abc411c89
1 changed files with 6 additions and 6 deletions

View File

@ -234,13 +234,13 @@ static unsigned long agesa_write_acpi_tables(const struct device *device,
acpi_hest_t *hest;
/* HEST */
current = ALIGN_UP(current, 8);
current = acpi_align_current(current);
hest = (acpi_hest_t *)current;
acpi_write_hest(hest, acpi_fill_hest);
acpi_add_table(rsdp, (void *)current);
current += hest->header.length;
current = ALIGN_UP(current, 8);
current = acpi_align_current(current);
printk(BIOS_DEBUG, "ACPI: * IVRS at %lx\n", current);
ivrs = agesawrapper_getlateinitptr(PICK_IVRS);
if (ivrs != NULL) {
@ -253,7 +253,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device,
}
/* SRAT */
current = ALIGN_UP(current, 8);
current = acpi_align_current(current);
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
srat = (acpi_srat_t *)agesawrapper_getlateinitptr(PICK_SRAT);
if (srat != NULL) {
@ -266,7 +266,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device,
}
/* SLIT */
current = ALIGN_UP(current, 8);
current = acpi_align_current(current);
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
slit = (acpi_slit_t *)agesawrapper_getlateinitptr(PICK_SLIT);
if (slit != NULL) {
@ -279,7 +279,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device,
}
/* ALIB */
current = ALIGN_UP(current, 16);
current = acpi_align_current(current);
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
alib = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_ALIB);
if (alib != NULL) {
@ -292,7 +292,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device,
" Skipping.\n");
}
current = ALIGN_UP(current, 16);
current = acpi_align_current(current);
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_PSTATE);
if (ssdt != NULL) {