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>
This commit is contained in:
@@ -173,7 +173,7 @@ static void save_mma_results_data(void *unused)
|
||||
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);
|
||||
|
@@ -152,7 +152,7 @@ unsigned long southcluster_write_acpi_tables(const struct device *device,
|
||||
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 @@ unsigned long southcluster_write_acpi_tables(const struct device *device,
|
||||
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");
|
||||
|
@@ -12,7 +12,7 @@ void fill_postcar_frame(struct postcar_frame *pcf)
|
||||
|
||||
/* 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,
|
||||
|
@@ -414,7 +414,7 @@ unsigned long northbridge_write_acpi_tables(const struct device *device,
|
||||
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 @@ unsigned long northbridge_write_acpi_tables(const struct device *device,
|
||||
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 @@ unsigned long northbridge_write_acpi_tables(const struct device *device,
|
||||
|
||||
/* 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;
|
||||
|
||||
|
@@ -91,7 +91,7 @@ unsigned long hest_create(unsigned long current, struct acpi_rsdp *rsdp)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user