From 5c83db1580cbfcdc0db04fa768fbf59bbc2befd1 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sat, 27 Jul 2024 23:58:33 -0300 Subject: [PATCH] x86_64 pci: fix msi message format --- kernel-src/include/x86-64/arch/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel-src/include/x86-64/arch/pci.h b/kernel-src/include/x86-64/arch/pci.h index b29994f3..217ae278 100644 --- a/kernel-src/include/x86-64/arch/pci.h +++ b/kernel-src/include/x86-64/arch/pci.h @@ -68,7 +68,7 @@ static void mcfg_write32(int bus, int device, int function, uint32_t offset, uin } static uint64_t msiformatmessage(uint32_t *data, int vector, int edgetrigger, int deassert) { - *data = (edgetrigger << 15) | (deassert << 14) | vector; + *data = (edgetrigger ? 0 : (1 << 15)) | (deassert ? 0 : (1 << 14)) | vector; return 0xfee00000 | (_cpu()->id << 12); }