Merge branch 'acpi' into pci

This commit is contained in:
Adrien Bourmault 2020-02-10 13:27:43 +01:00
commit 2e06454c2e
2 changed files with 1 additions and 45 deletions

View File

@ -271,7 +271,7 @@ all :
## QEMU/DEBUG RELATED ## QEMU/DEBUG RELATED
test: all installonimage 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) \ -rtc base=localtime -m $(ram) -hda $(installdisk) \
-d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &

View File

@ -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 // Explore all ACPI Tables
// //
@ -242,7 +217,6 @@ static inline void IoSearchAcpiTables(void)
else else
table = (SDTHeader_t *)(ulong)curLong[i]; table = (SDTHeader_t *)(ulong)curLong[i];
//KernLog("\tACPI RSDT[%d] %p\n", i, table);
if (MmIsBusyZone(table)) { if (MmIsBusyZone(table)) {
checksum = DoChecksum(table, (size_t)table->length, 0, 0); checksum = DoChecksum(table, (size_t)table->length, 0, 0);
if (!checksum) { 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;
}
}
}
} }
// -------------------------------------------------------------------------- // // -------------------------------------------------------------------------- //