25 lines
456 B
C

#include <lcrash/pci/pci.h>
#include <lcrash/acpi/acpi.h>
bool PciIsPresent = false;
bool PciSupportsECM = false;
void PciInitialize() {
// Try to figure out if we have PCIe
if (AcpiPresent()) {
struct AcpiMCFG* BridgeTable = AcpiGetTable("MCFG");
// Guess not
if (BridgeTable == NULL) goto nopcie;
while (1) {}
}
nopcie: while (1) {}
return;
}
bool PciPresent() { return PciIsPresent; }
bool PciePresent() { return PciSupportsECM; }