currently item size is u8, which would truncate APIC IDs that are greater than 255. Make it u32 so that it cna hold x2apic IDs as well. Signed-off-by: Igor Mammedov --- lib/x86/apic.h | 2 +- lib/x86/apic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/x86/apic.h b/lib/x86/apic.h index cac6eab1..a76b1138 100644 --- a/lib/x86/apic.h +++ b/lib/x86/apic.h @@ -8,7 +8,7 @@ #include "processor.h" #include "smp.h" -extern u8 id_map[MAX_TEST_CPUS]; +extern u32 id_map[MAX_TEST_CPUS]; typedef struct { uint8_t vector; diff --git a/lib/x86/apic.c b/lib/x86/apic.c index 0d151476..c538fb5f 100644 --- a/lib/x86/apic.c +++ b/lib/x86/apic.c @@ -9,7 +9,7 @@ static void *g_apic = (void *)APIC_DEFAULT_PHYS_BASE; static void *g_ioapic = (void *)IO_APIC_DEFAULT_PHYS_BASE; -u8 id_map[MAX_TEST_CPUS]; +u32 id_map[MAX_TEST_CPUS]; struct apic_ops { u32 (*reg_read)(unsigned reg); -- 2.47.1