From 0f6b51b2de5e53166a7a1e21e5d3f73724219b86 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 20 Jun 2019 14:09:01 +0200 Subject: arch/x86/tables: use ALIGN_UP instead of ALIGN for better readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idfb814abee87d52d0f5970ec0cd291f738631320 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/33629 Reviewed-by: Kyösti Mälkki Reviewed-by: Paul Menzel Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/arch/x86/tables.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c index f17fb858b0..3cc385b530 100644 --- a/src/arch/x86/tables.c +++ b/src/arch/x86/tables.c @@ -36,7 +36,7 @@ static unsigned long write_pirq_table(unsigned long rom_table_end) /* This table must be between 0x0f0000 and 0x100000 */ rom_table_end = write_pirq_routing_table(rom_table_end); - rom_table_end = ALIGN(rom_table_end, 1024); + rom_table_end = ALIGN_UP(rom_table_end, 1024); /* And add a high table version for those payloads that * want to live in the F segment @@ -68,7 +68,7 @@ static unsigned long write_mptable(unsigned long rom_table_end) /* The smp table must be in 0-1K, 639K-640K, or 960K-1M */ rom_table_end = write_smp_table(rom_table_end); - rom_table_end = ALIGN(rom_table_end, 1024); + rom_table_end = ALIGN_UP(rom_table_end, 1024); high_table_pointer = (unsigned long)cbmem_add(CBMEM_ID_MPTABLE, MAX_MP_TABLE_SIZE); @@ -114,7 +114,7 @@ static unsigned long write_acpi_table(unsigned long rom_table_end) unsigned long acpi_start = high_table_pointer; unsigned long new_high_table_pointer; - rom_table_end = ALIGN(rom_table_end, 16); + rom_table_end = ALIGN_UP(rom_table_end, 16); new_high_table_pointer = write_acpi_tables(high_table_pointer); if (new_high_table_pointer > (high_table_pointer + MAX_ACPI_SIZE)) @@ -146,10 +146,10 @@ static unsigned long write_acpi_table(unsigned long rom_table_end) printk(BIOS_ERR, "ERROR: Didn't find RSDP in high table.\n"); } - rom_table_end = ALIGN(rom_table_end + sizeof(acpi_rsdp_t), 16); + rom_table_end = ALIGN_UP(rom_table_end + sizeof(acpi_rsdp_t), 16); } else { rom_table_end = write_acpi_tables(rom_table_end); - rom_table_end = ALIGN(rom_table_end, 1024); + rom_table_end = ALIGN_UP(rom_table_end, 1024); } return rom_table_end; @@ -168,7 +168,7 @@ static unsigned long write_smbios_table(unsigned long rom_table_end) new_high_table_pointer = smbios_write_tables(high_table_pointer); - rom_table_end = ALIGN(rom_table_end, 16); + rom_table_end = ALIGN_UP(rom_table_end, 16); memcpy((void *)rom_table_end, (void *)high_table_pointer, sizeof(struct smbios_entry)); rom_table_end += sizeof(struct smbios_entry); @@ -184,7 +184,7 @@ static unsigned long write_smbios_table(unsigned long rom_table_end) new_rom_table_end = smbios_write_tables(rom_table_end); printk(BIOS_DEBUG, "SMBIOS size %ld bytes\n", new_rom_table_end - rom_table_end); - rom_table_end = ALIGN(new_rom_table_end, 16); + rom_table_end = ALIGN_UP(new_rom_table_end, 16); } return rom_table_end; -- cgit v1.2.3