diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2019-06-20 14:09:01 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2019-06-21 12:49:06 +0000 |
commit | 0f6b51b2de5e53166a7a1e21e5d3f73724219b86 (patch) | |
tree | 666e041940cd2a325420f918dac4cd0a31766ab6 /src/arch/x86/tables.c | |
parent | fcbb3c5747180ffb1796608b3689d2ce4c7aa6e4 (diff) | |
download | coreboot-0f6b51b2de5e53166a7a1e21e5d3f73724219b86.tar.xz |
arch/x86/tables: use ALIGN_UP instead of ALIGN for better readability
Change-Id: Idfb814abee87d52d0f5970ec0cd291f738631320
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33629
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/x86/tables.c')
-rw-r--r-- | src/arch/x86/tables.c | 14 |
1 files changed, 7 insertions, 7 deletions
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; |