git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: partial PCIe support (MCFG table parsing)
[lunaix-os.git]
/
lunaix-os
/
hal
/
acpi
/
acpi.c
diff --git
a/lunaix-os/hal/acpi/acpi.c
b/lunaix-os/hal/acpi/acpi.c
index 5713f9a95f2930b7a60c7e78cd8208346c9d76fd..0b1d9883b00ce7e381247696852ed0cb3913df2a 100644
(file)
--- a/
lunaix-os/hal/acpi/acpi.c
+++ b/
lunaix-os/hal/acpi/acpi.c
@@
-6,7
+6,7
@@
#include <klibc/string.h>
#include <klibc/string.h>
-#include "parser/
madt_
parser.h"
+#include "parser/parser.h"
static acpi_context* ctx = NULL;
static acpi_context* ctx = NULL;
@@
-26,7
+26,7
@@
acpi_init(multiboot_info_t* mb_info)
assert_msg(rsdp, "Fail to locate ACPI_RSDP");
assert_msg(acpi_rsdp_validate(rsdp), "Invalid ACPI_RSDP (checksum failed)");
assert_msg(rsdp, "Fail to locate ACPI_RSDP");
assert_msg(acpi_rsdp_validate(rsdp), "Invalid ACPI_RSDP (checksum failed)");
- kprintf(K
INFO
"RSDP found at %p, RSDT: %p\n", rsdp, rsdp->rsdt);
+ kprintf(K
DEBUG
"RSDP found at %p, RSDT: %p\n", rsdp, rsdp->rsdt);
acpi_rsdt_t* rsdt = rsdp->rsdt;
acpi_rsdt_t* rsdt = rsdp->rsdt;
@@
-47,21
+47,22
@@
acpi_init(multiboot_info_t* mb_info)
// FADT just a plain structure, no need to parse.
ctx->fadt = *(acpi_fadt_t*)sdthdr;
break;
// FADT just a plain structure, no need to parse.
ctx->fadt = *(acpi_fadt_t*)sdthdr;
break;
+ case ACPI_MCFG_SIG:
+ mcfg_parse(sdthdr, ctx);
+ break;
default:
break;
}
}
kprintf(KINFO "OEM: %s\n", ctx->oem_id);
default:
break;
}
}
kprintf(KINFO "OEM: %s\n", ctx->oem_id);
- kprintf(KINFO "IOAPIC address: %p\n", ctx->madt.ioapic->ioapic_addr);
- kprintf(KINFO "APIC address: %p\n", ctx->madt.apic_addr);
for (size_t i = 0; i < 24; i++) {
acpi_intso_t* intso = ctx->madt.irq_exception[i];
if (!intso)
continue;
for (size_t i = 0; i < 24; i++) {
acpi_intso_t* intso = ctx->madt.irq_exception[i];
if (!intso)
continue;
- kprintf(K
INFO
"IRQ #%u -> GSI #%u\n", intso->source, intso->gsi);
+ kprintf(K
DEBUG
"IRQ #%u -> GSI #%u\n", intso->source, intso->gsi);
}
}
}
}