From 9abc411c8995069d6125d96bee083ca9e75ca7f6 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 18 Jan 2023 15:47:39 +0100 Subject: [PATCH] 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 Change-Id: I8933e3731b67012bcae0773db2f7f8de7cd31b56 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72055 Reviewed-by: Fred Reitberger Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/soc/amd/stoneyridge/northbridge.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index 240aebdb1b..6389cc439c 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -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) {