mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
pci: msi-x support
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <arch/io.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <kernel/pmm.h>
|
||||
#include <arch/cpu.h>
|
||||
|
||||
static size_t mcfgentrycount;
|
||||
static mcfgentry_t *mcfgentries;
|
||||
@@ -65,6 +66,11 @@ static void mcfg_write32(int bus, int device, int function, uint32_t offset, uin
|
||||
*address = value;
|
||||
}
|
||||
|
||||
static uint64_t msiformatmessage(uint32_t *data, int vector, int edgetrigger, int deassert) {
|
||||
*data = (edgetrigger << 15) | (deassert << 14) | vector;
|
||||
return 0xfee00000 | (_cpu()->id << 12);
|
||||
}
|
||||
|
||||
static void pci_archinit() {
|
||||
mcfg_t *mcfg = arch_acpi_findtable("MCFG", 0);
|
||||
if (mcfg) {
|
||||
|
||||
Reference in New Issue
Block a user