From 0cfb67ef24c749b1fc974d51dc3e63daeff6b893 Mon Sep 17 00:00:00 2001 From: N00byEdge Date: Mon, 28 Dec 2020 13:44:52 +0100 Subject: [PATCH] Set the 'level' flag when sending Init and Startup IPIs --- stage2/sys/smp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stage2/sys/smp.c b/stage2/sys/smp.c index 53f847de..6b5d166f 100644 --- a/stage2/sys/smp.c +++ b/stage2/sys/smp.c @@ -69,20 +69,20 @@ static bool smp_start_ap(uint32_t lapic_id, struct gdtr *gdtr, // Send the INIT IPI if (x2apic) { - x2apic_write(LAPIC_REG_ICR0, ((uint64_t)lapic_id << 32) | 0x500); + x2apic_write(LAPIC_REG_ICR0, ((uint64_t)lapic_id << 32) | 0x4500); } else { lapic_write(LAPIC_REG_ICR1, lapic_id << 24); - lapic_write(LAPIC_REG_ICR0, 0x500); + lapic_write(LAPIC_REG_ICR0, 0x4500); } delay(5000); // Send the Startup IPI if (x2apic) { x2apic_write(LAPIC_REG_ICR0, ((uint64_t)lapic_id << 32) | - ((size_t)smp_trampoline / 4096) | 0x600); + ((size_t)smp_trampoline / 4096) | 0x4600); } else { lapic_write(LAPIC_REG_ICR1, lapic_id << 24); - lapic_write(LAPIC_REG_ICR0, ((size_t)smp_trampoline / 4096) | 0x600); + lapic_write(LAPIC_REG_ICR0, ((size_t)smp_trampoline / 4096) | 0x4600); } for (int i = 0; i < 100; i++) {