#include #include #include 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: Panic("Failed to initialize PCI"); return; } bool PciPresent() { return PciIsPresent; } bool PciePresent() { return PciSupportsECM; }