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>
diff --git a/src/soc/intel/common/mma.c b/src/soc/intel/common/mma.c
index 04d766d..3314e8e 100644
--- a/src/soc/intel/common/mma.c
+++ b/src/soc/intel/common/mma.c
@@ -173,7 +173,7 @@
return;
}
- mma_data_size = ALIGN(mma_hob_size, 16) +
+ mma_data_size = ALIGN_UP(mma_hob_size, 16) +
sizeof(struct mma_data_container);
mma_data = cbmem_add(CBMEM_ID_MMA_DATA, mma_data_size);
diff --git a/src/soc/intel/denverton_ns/acpi.c b/src/soc/intel/denverton_ns/acpi.c
index 808affa..399bb64 100644
--- a/src/soc/intel/denverton_ns/acpi.c
+++ b/src/soc/intel/denverton_ns/acpi.c
@@ -152,7 +152,7 @@
acpi_header_t *ssdt2;
current = acpi_write_hpet(device, current, rsdp);
- current = (ALIGN(current, 16));
+ current = (ALIGN_UP(current, 16));
ssdt2 = (acpi_header_t *)current;
memset(ssdt2, 0, sizeof(acpi_header_t));
@@ -162,7 +162,7 @@
acpi_add_table(rsdp, ssdt2);
printk(BIOS_DEBUG, "ACPI: * SSDT2 @ %p Length %x\n", ssdt2,
ssdt2->length);
- current = (ALIGN(current, 16));
+ current = (ALIGN_UP(current, 16));
} else {
ssdt2 = NULL;
printk(BIOS_DEBUG, "ACPI: * SSDT2 not generated.\n");
diff --git a/src/soc/intel/quark/memmap.c b/src/soc/intel/quark/memmap.c
index 97a9fd8..46671b2 100644
--- a/src/soc/intel/quark/memmap.c
+++ b/src/soc/intel/quark/memmap.c
@@ -12,7 +12,7 @@
/* Locate the top of RAM */
top_of_low_usable_memory = (uintptr_t) cbmem_top();
- top_of_ram = ALIGN(top_of_low_usable_memory, 16 * MiB);
+ top_of_ram = ALIGN_UP(top_of_low_usable_memory, 16 * MiB);
/* Cache postcar and ramstage */
postcar_frame_add_mtrr(pcf, top_of_ram - (16 * MiB), 16 * MiB,
diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c
index 64851f5..c31fd61 100644
--- a/src/soc/intel/xeon_sp/nb_acpi.c
+++ b/src/soc/intel/xeon_sp/nb_acpi.c
@@ -414,7 +414,7 @@
const config_t *const config = config_of(device);
/* SRAT */
- current = ALIGN(current, 8);
+ current = ALIGN_UP(current, 8);
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
srat = (acpi_srat_t *) current;
acpi_create_srat(srat, acpi_fill_srat);
@@ -422,7 +422,7 @@
acpi_add_table(rsdp, srat);
/* SLIT */
- current = ALIGN(current, 8);
+ current = ALIGN_UP(current, 8);
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
slit = (acpi_slit_t *) current;
acpi_create_slit(slit, acpi_fill_slit);
@@ -431,7 +431,7 @@
/* DMAR */
if (config->vtd_support) {
- current = ALIGN(current, 8);
+ current = ALIGN_UP(current, 8);
dmar = (acpi_dmar_t *)current;
enum dmar_flags flags = DMAR_INTR_REMAP;
diff --git a/src/soc/intel/xeon_sp/ras/hest.c b/src/soc/intel/xeon_sp/ras/hest.c
index 02a9ab1..9eb54d9 100644
--- a/src/soc/intel/xeon_sp/ras/hest.c
+++ b/src/soc/intel/xeon_sp/ras/hest.c
@@ -91,7 +91,7 @@
printk(BIOS_DEBUG, "elog_addr: %llx, size:%x\n", gnvs->hest_log_addr,
CONFIG_ERROR_LOG_BUFFER_SIZE);
- 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, (void *)current);