Lines Matching refs:func

12 uint8_t PCICfgRead8(uint32_t bus, uint32_t slot, uint32_t func, uint32_t reg);
13 uint16_t PCICfgRead16(uint32_t bus, uint32_t slot, uint32_t func, uint32_t reg);
14 uint32_t PCICfgRead32(uint32_t bus, uint32_t slot, uint32_t func, uint32_t reg);
15 void PCICfgWrite8(uint32_t bus, uint32_t slot, uint32_t func,
17 void PCICfgWrite16(uint32_t bus, uint32_t slot, uint32_t func,
19 void PCICfgWrite32(uint32_t bus, uint32_t slot, uint32_t func,
23 void AHCI_Init(uint32_t bus, uint32_t device, uint32_t func);
24 void E1000_Init(uint32_t bus, uint32_t device, uint32_t func);
35 PCIGetDeviceID(uint32_t bus, uint32_t device, uint32_t func)
37 return PCICfgRead16(bus, device, func, PCI_OFFSET_DEVICEID);
41 PCIGetVendorID(uint32_t bus, uint32_t device, uint32_t func)
43 return PCICfgRead16(bus, device, func, PCI_OFFSET_VENDORID);
47 PCIGetBaseClass(uint32_t bus, uint32_t device, uint32_t func)
49 return PCICfgRead8(bus, device, func, PCI_OFFSET_CLASS);
53 PCIGetSubClass(uint32_t bus, uint32_t device, uint32_t func)
55 return PCICfgRead8(bus, device, func, PCI_OFFSET_SUBCLASS);
59 PCIGetHeaderType(uint32_t bus, uint32_t device, uint32_t func)
61 return PCICfgRead8(bus, device, func, PCI_OFFSET_HEADERTYPE);
67 return PCICfgRead8(dev->bus, dev->slot, dev->func, reg);
73 return PCICfgRead16(dev->bus, dev->slot, dev->func, reg);
79 return PCICfgRead32(dev->bus, dev->slot, dev->func, reg);
85 return PCICfgWrite8(dev->bus, dev->slot, dev->func, reg, data);
91 return PCICfgWrite16(dev->bus, dev->slot, dev->func, reg, data);
97 return PCICfgWrite32(dev->bus, dev->slot, dev->func, reg, data);
136 PCICheckFunction(uint32_t bus, uint32_t device, uint32_t func)
141 baseClass = PCIGetBaseClass(bus, device, func);
142 subClass = PCIGetSubClass(bus, device, func);
143 vendorId = PCIGetVendorID(bus, device, func);
144 deviceId = PCIGetDeviceID(bus, device, func);
149 bus, device, func, vendorId, deviceId);
152 bus, device, func, vendorId, deviceId);
155 bus, device, func, vendorId, deviceId);
159 bus, device, func, vendorId, deviceId);
164 bus, device, func, vendorId, deviceId);
166 AHCI_Init(bus, device, func);
169 bus, device, func, vendorId, deviceId);
173 bus, device, func, vendorId, deviceId);
174 E1000_Init(bus, device, func);
177 bus, device, func, vendorId, deviceId);
180 bus, device, func, vendorId, deviceId);
183 bus, device, func, vendorId, deviceId, baseClass, subClass);
201 uint8_t func;
202 for (func = 0; func < 8; func++) {
203 if (PCIGetVendorID(bus, device, func) != 0xFFFF) {
204 PCICheckFunction(bus, device, func);
299 DebugPCICheckFunction(uint32_t bus, uint32_t device, uint32_t func)
304 baseClass = PCIGetBaseClass(bus, device, func);
305 subClass = PCIGetSubClass(bus, device, func);
306 vendorId = PCIGetVendorID(bus, device, func);
307 deviceId = PCIGetDeviceID(bus, device, func);
312 bus, device, func, vendorId, deviceId);
315 bus, device, func, vendorId, deviceId);
318 bus, device, func, vendorId, deviceId);
322 bus, device, func, vendorId, deviceId);
327 bus, device, func, vendorId, deviceId);
330 bus, device, func, vendorId, deviceId);
334 bus, device, func, vendorId, deviceId);
337 bus, device, func, vendorId, deviceId);
340 bus, device, func, vendorId, deviceId);
343 bus, device, func, vendorId, deviceId, baseClass, subClass);
363 uint8_t func;
364 for (func = 0; func < 8; func++) {
365 if (PCIGetVendorID(bus, device, func) != 0xFFFF) {
366 DebugPCICheckFunction(bus, device, func);
396 uint32_t bus, device, func;
406 func = Debug_StrToInt(argv[3]);
408 kprintf("Vendor ID: %04x\n", PCIGetVendorID(bus, device, func));
409 kprintf("Device ID: %04x\n", PCIGetDeviceID(bus, device, func));
410 kprintf("Class: %d\n", PCIGetBaseClass(bus, device, func));
411 kprintf("Subclass: %d\n", PCIGetSubClass(bus, device, func));
412 kprintf("Header Type: %d\n", PCIGetHeaderType(bus, device, func));
418 kprintf("BAR%d: %016llx\n", bar, PCICfgRead32(bus, device, func, barReg));