| 1620 | } |
| 1621 | |
| 1622 | UINT32 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 |
no test coverage detected