| 38 | } |
| 39 | |
| 40 | uint8_t ConfigReadByte(uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset){ |
| 41 | uint32_t address = (uint32_t)((bus << 16) | (slot << 11) | (func << 8) | (offset & 0xfc) | 0x80000000); |
| 42 | |
| 43 | outportl(0xCF8, address); |
| 44 | |
| 45 | uint8_t data; |
| 46 | data = (uint8_t)((inportl(0xCFC) >> ((offset & 3) * 8)) & 0xff); |
| 47 | |
| 48 | return data; |
| 49 | } |
| 50 | |
| 51 | void ConfigWriteDword(uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset, uint16_t data){ |
| 52 | uint32_t address = (uint32_t)((bus << 16) | (slot << 11) | (func << 8) | (offset & 0xfc) | 0x80000000); |
no test coverage detected