MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / GetPciDevice

Function GetPciDevice

rEFIt_UEFI/Platform/FixBiosDsdt.cpp:1622–1659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1620}
1621
1622UINT32 GetPciDevice(UINT8 *dsdt, UINT32 len)
1623{
1624 UINT32 i;
1625 UINT32 PCIADR = 0, PCISIZE = 0;
1626 for (i=20; i<len; i++) {
1627 // Find Device PCI0 // PNP0A03
1628 if (CmpPNP(dsdt, i, 0x0A03)) {
1629 PCIADR = devFind(dsdt, i);
1630 if (!PCIADR) {
1631 continue;
1632 }
1633
1634 PCISIZE = get_size(dsdt, PCIADR);
1635 if (PCISIZE) {
1636 break;
1637 }
1638 } // End find
1639 }
1640 if (!PCISIZE) {
1641 for (i=20; i<len; i++) {
1642 // Find Device PCIE // PNP0A08
1643 if (CmpPNP(dsdt, i, 0x0A08)) {
1644 PCIADR = devFind(dsdt, i);
1645 if (!PCIADR) {
1646 continue;
1647 }
1648
1649 PCISIZE = get_size(dsdt, PCIADR);
1650 if (PCISIZE) {
1651 break;
1652 }
1653 } // End find
1654 }
1655 }
1656 if (PCISIZE)
1657 return PCIADR;
1658 return 0;
1659}
1660
1661
1662// Find PCIRootUID and all need Fix Device

Callers 10

findPciRootFunction · 0.85
FIXDisplayFunction · 0.85
AddHDMIFunction · 0.85
FIXNetworkFunction · 0.85
FIXAirportFunction · 0.85
FIXSBUSFunction · 0.85
AddMCHCFunction · 0.85
AddIMEIFunction · 0.85
FIXFirewireFunction · 0.85
AddHDEFFunction · 0.85

Calls 3

CmpPNPFunction · 0.85
devFindFunction · 0.85
get_sizeFunction · 0.85

Tested by

no test coverage detected