mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Merge branch 'acpi' into pci
This commit is contained in:
commit
2e06454c2e
2
Makefile
2
Makefile
@ -271,7 +271,7 @@ all :
|
||||
## QEMU/DEBUG RELATED
|
||||
|
||||
test: all installonimage
|
||||
@qemu-system-x86_64 -vga std -enable-kvm -soundhw pcspk -cpu host -s \
|
||||
@qemu-system-x86_64 -vga std -enable-kvm -machine type=q35 -soundhw pcspk -cpu host -s \
|
||||
-rtc base=localtime -m $(ram) -hda $(installdisk) \
|
||||
-d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &
|
||||
|
||||
|
@ -185,31 +185,6 @@ static inline void IoInitRXSDT(void)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Returns the address of the MCFG
|
||||
//
|
||||
static inline SDTHeader_t *IoFindMCFG()
|
||||
{
|
||||
char *mcfg = NULL;
|
||||
|
||||
for (uint i = 0; i < memoryMap.length; i++) {
|
||||
if (memoryMap.entry[i].type == RESERVED_ZONE) {
|
||||
|
||||
for (mcfg = (char *)memoryMap.entry[i].addr;
|
||||
(ulong)mcfg < (ulong)(memoryMap.entry[i].addr +
|
||||
memoryMap.entry[i].length);
|
||||
mcfg++) {
|
||||
|
||||
if (!strncmp(mcfg, "MCFG", 3)) {
|
||||
return (SDTHeader_t *)mcfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Explore all ACPI Tables
|
||||
//
|
||||
@ -242,7 +217,6 @@ static inline void IoSearchAcpiTables(void)
|
||||
else
|
||||
table = (SDTHeader_t *)(ulong)curLong[i];
|
||||
|
||||
//KernLog("\tACPI RSDT[%d] %p\n", i, table);
|
||||
if (MmIsBusyZone(table)) {
|
||||
checksum = DoChecksum(table, (size_t)table->length, 0, 0);
|
||||
if (!checksum) {
|
||||
@ -284,24 +258,6 @@ static inline void IoSearchAcpiTables(void)
|
||||
}
|
||||
}
|
||||
|
||||
// Finding MCFG
|
||||
SDTHeader_t *mcfg = IoFindMCFG();
|
||||
|
||||
if (mcfg) {
|
||||
//DebugLog("MCFG found at %p\n");
|
||||
checksum = 0; //DoChecksum(mcfg, (size_t)mcfg->length, 0, 0);
|
||||
if (!checksum) {
|
||||
if (!strncmp(mcfg->signature, SDTChar[SDT_MCFG], 3)) {
|
||||
DebugLog("ACPI System Table %s (OEM %s) length %lu [%p]\n",
|
||||
SDTChar[SDT_MCFG],
|
||||
mcfg->OEMID,
|
||||
mcfg->length,
|
||||
mcfg
|
||||
);
|
||||
SDTDirectory[SDT_MCFG] = mcfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user