diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2022-10-10 12:34:21 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-13 19:14:57 +0000 |
commit | d6b6b2261667f0a4688fa0cf9f0699596d7efc93 (patch) | |
tree | d2f3a5f715f911dbfd8013c060c1c9b9ea8f5b99 /src/northbridge | |
parent | 5f69b867f0c9ec9c0afab4df70a3d0d06809957a (diff) |
payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I80f3d2c90c58daa62651f6fd635c043b1ce38b84
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68255
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r-- | src/northbridge/amd/agesa/family14/northbridge.c | 10 | ||||
-rw-r--r-- | src/northbridge/amd/agesa/family15tn/northbridge.c | 12 | ||||
-rw-r--r-- | src/northbridge/amd/agesa/family16kb/northbridge.c | 12 | ||||
-rw-r--r-- | src/northbridge/amd/pi/00730F01/northbridge.c | 12 |
4 files changed, 23 insertions, 23 deletions
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 7a46bd4f36..6237a7ffff 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -709,14 +709,14 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, acpi_hest_t *hest; /* HEST */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); hest = (acpi_hest_t *)current; acpi_write_hest(hest, acpi_fill_hest); acpi_add_table(rsdp, hest); current += hest->header.length; /* SRAT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current); srat = (acpi_srat_t *)agesawrapper_getlateinitptr(PICK_SRAT); if (srat != NULL) { @@ -730,7 +730,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SLIT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current); slit = (acpi_slit_t *)agesawrapper_getlateinitptr(PICK_SLIT); if (slit != NULL) { @@ -744,7 +744,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SSDT */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current); alib = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_ALIB); if (alib != NULL) { @@ -758,7 +758,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, /* The DSDT needs additional work for the AGESA SSDT Pstate table */ /* Keep the comment for a while. */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current); ssdt = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_PSTATE); if (ssdt != NULL) { diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c index caacce933a..9cacb79c59 100644 --- a/src/northbridge/amd/agesa/family15tn/northbridge.c +++ b/src/northbridge/amd/agesa/family15tn/northbridge.c @@ -473,13 +473,13 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, acpi_hest_t *hest; /* HEST */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); hest = (acpi_hest_t *)current; acpi_write_hest(hest, acpi_fill_hest); acpi_add_table(rsdp, hest); current += hest->header.length; - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * IVRS at %lx\n", current); ivrs = agesawrapper_getlateinitptr(PICK_IVRS); if (ivrs != NULL) { @@ -492,7 +492,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SRAT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current); srat = (acpi_srat_t *)agesawrapper_getlateinitptr(PICK_SRAT); if (srat != NULL) { @@ -505,7 +505,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SLIT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current); slit = (acpi_slit_t *)agesawrapper_getlateinitptr(PICK_SLIT); if (slit != NULL) { @@ -518,7 +518,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* ALIB */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current); alib = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_ALIB); if (alib != NULL) { @@ -533,7 +533,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, /* this pstate ssdt may cause Blue Screen: Fixed: Keep this comment for a while. */ /* SSDT */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current); ssdt = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_PSTATE); if (ssdt != NULL) { diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c index 9f20e71352..9943e34d5f 100644 --- a/src/northbridge/amd/agesa/family16kb/northbridge.c +++ b/src/northbridge/amd/agesa/family16kb/northbridge.c @@ -467,13 +467,13 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, acpi_hest_t *hest; /* HEST */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); hest = (acpi_hest_t *)current; acpi_write_hest(hest, acpi_fill_hest); acpi_add_table(rsdp, hest); current += hest->header.length; - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * IVRS at %lx\n", current); ivrs = agesawrapper_getlateinitptr(PICK_IVRS); if (ivrs != NULL) { @@ -486,7 +486,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SRAT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current); srat = (acpi_srat_t *)agesawrapper_getlateinitptr(PICK_SRAT); if (srat != NULL) { @@ -499,7 +499,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SLIT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current); slit = (acpi_slit_t *)agesawrapper_getlateinitptr(PICK_SLIT); if (slit != NULL) { @@ -512,7 +512,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* ALIB */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current); alib = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_ALIB); if (alib != NULL) { @@ -527,7 +527,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, /* this pstate ssdt may cause Blue Screen: Fixed: Keep this comment for a while. */ /* SSDT */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current); ssdt = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_PSTATE); if (ssdt != NULL) { diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index 0245a74ea9..dab0e72d50 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -584,13 +584,13 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, acpi_ivrs_t *ivrs; /* HEST */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); acpi_write_hest((void *)current, acpi_fill_hest); acpi_add_table(rsdp, (void *)current); current += ((acpi_header_t *)current)->length; /* IVRS */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * IVRS at %lx\n", current); ivrs = (acpi_ivrs_t *)current; acpi_create_ivrs(ivrs, acpi_fill_ivrs); @@ -598,7 +598,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, acpi_add_table(rsdp, ivrs); /* SRAT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current); srat = (acpi_srat_t *)agesawrapper_getlateinitptr(PICK_SRAT); if (srat != NULL) { @@ -611,7 +611,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* SLIT */ - current = ALIGN(current, 8); + current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current); slit = (acpi_slit_t *)agesawrapper_getlateinitptr(PICK_SLIT); if (slit != NULL) { @@ -624,7 +624,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, } /* ALIB */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current); alib = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_ALIB); if (alib != NULL) { @@ -639,7 +639,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, /* this pstate ssdt may cause Blue Screen: Fixed: Keep this comment for a while. */ /* SSDT */ - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current); ssdt = (acpi_header_t *)agesawrapper_getlateinitptr(PICK_PSTATE); if (ssdt != NULL) { |