1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

MCFG detected successfully. Oof. #73

This commit is contained in:
Adrien Bourmault 2020-02-10 13:24:20 +01:00
parent ea4376fc54
commit f30031e1d9
2 changed files with 1 additions and 43 deletions

View File

@ -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 &

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
//
@ -283,23 +258,6 @@ static inline void IoSearchAcpiTables(void)
}
}
// Finding MCFG
SDTHeader_t *mcfg = IoFindMCFG();
if (mcfg) {
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;
}
}
}
}
// -------------------------------------------------------------------------- //