commit 292255b8de594987d261a5367511d6fd14dab126
parent f3294d1323a3c63ef40c3680fca074fbbd1853e8
Author: Matsuda Kenji <info@mtkn.jp>
Date: Wed, 1 May 2024 12:50:07 +0900
set primary interrupter
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/sys/src/kernel/main.c b/sys/src/kernel/main.c
@@ -124,6 +124,10 @@ kernel_main(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
xhc.runtime->IR[0].ERSTBA = (uint64) event_ring_segment_table;
// setup the primary interrupter
+ xhc.runtime->IR[0].IMOD = 4000;
+ xhc.runtime->IR[0].IMAN |= 3; // IMAN.IP & IMAN.IE
+ xhc.op->USBCMD |= 1 << 2; // USBCMD.INTE
+ // set MSI
cons_printf(&con0, "local apic id: %x\n", *(uint32 *) (0xfee00020) >> 24);
uintptr pci_config_base = (uintptr) pci_xhc;