From efe1d129f69c0d5668f37fdf7c8b37c17bc6496f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 5 Feb 2024 22:23:52 -0500 Subject: kernel/amd64: lapic: Fix icr_lo overflow bug Somehow icr_lo was a uint8_t which is obviously not right and would cause overflow bugs. Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/lapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index c5760f5..c4e81a6 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -273,7 +273,7 @@ void lapic_send_ipi(uint8_t id, uint8_t shorthand, uint8_t vector) { const uint32_t x2APIC_IPI_SELF = 0x3F0; - uint8_t icr_lo = vector | IPI_DEST_PHYSICAL; + uint64_t icr_lo = vector | IPI_DEST_PHYSICAL; bool x2apic_supported = has_x2apic(); if (x2apic_supported && shorthand == IPI_SHORTHAND_SELF) { -- cgit v1.2.3