Felix Held has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33630 )
Change subject: arch/x86: use ALIGN_UP instead of ALIGN for better readability ......................................................................
arch/x86: use ALIGN_UP instead of ALIGN for better readability
This patch contains the rest of the fixes for this subtree; having one change for every area would create an unnecessary amouint of patches.
Change-Id: Id92c11d58693292d58cba323c8468db858becfb5 Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/33630 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 --- M src/arch/x86/gdt.c M src/arch/x86/include/arch/early_variables.h M src/arch/x86/pirq_routing.c 3 files changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve HAOUAS Elyes: Looks good to me, approved
diff --git a/src/arch/x86/gdt.c b/src/arch/x86/gdt.c index c9aec6d..d3ad01e 100644 --- a/src/arch/x86/gdt.c +++ b/src/arch/x86/gdt.c @@ -46,7 +46,7 @@ newgdt = cbmem_find(CBMEM_ID_GDT); num_gdt_bytes = (uintptr_t)&gdt_end - (uintptr_t)&gdt; if (!newgdt) { - newgdt = cbmem_add(CBMEM_ID_GDT, ALIGN(num_gdt_bytes, 512)); + newgdt = cbmem_add(CBMEM_ID_GDT, ALIGN_UP(num_gdt_bytes, 512)); if (!newgdt) { printk(BIOS_ERR, "Error: Could not relocate GDT.\n"); return; diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index 9ea1537..b3042c3 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -69,7 +69,7 @@ static inline size_t car_data_size(void) { size_t car_size = _car_relocatable_data_size; - return ALIGN(car_size, 64); + return ALIGN_UP(car_size, 64); }
static inline size_t car_object_offset(void *ptr) diff --git a/src/arch/x86/pirq_routing.c b/src/arch/x86/pirq_routing.c index 194efb4..70df201 100644 --- a/src/arch/x86/pirq_routing.c +++ b/src/arch/x86/pirq_routing.c @@ -191,7 +191,7 @@ const struct irq_routing_table *routing_table) { /* Align the table to be 16 byte aligned. */ - addr = ALIGN(addr, 16); + addr = ALIGN_UP(addr, 16);
/* This table must be between 0xf0000 & 0x100000 */ printk(BIOS_INFO, "Copying Interrupt Routing Table to 0x%08lx... ",