From e279d90d4de18a0333fc7650710b0dba7e2fcd7f Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Fri, 23 Jul 2021 10:34:38 -0600 Subject: arch/x86,cpu/x86/mp_init: Switch cpu_info index type to size_t The alignment for `struct cpu_info` is wrong on x86_64. c_start.S uses the `push` instruction when setting up the cpu_info struct. This instruction will push 8 bytes but `unsigned int` is 4 bytes. By making it a `size_t` we get the correct size for both x86_32 and x86_64. BUG=b:179699789 TEST=Boot guybrush to the OS Suggested-by: Julius Werner Signed-off-by: Raul E Rangel Change-Id: I8ef311aaa8333ccf8a5b3f1f0e852bb26777671c Reviewed-on: https://review.coreboot.org/c/coreboot/+/56573 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/arch/x86/include/arch/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch') diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index 3fd4c1b2ea..42201e282e 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -225,7 +225,7 @@ struct thread; struct cpu_info { struct device *cpu; - unsigned int index; + size_t index; #if CONFIG(COOP_MULTITASKING) struct thread *thread; #endif -- cgit v1.2.3