| 21 | } |
| 22 | |
| 23 | int XHCIController::Initialize(){ |
| 24 | if(!PCI::FindGenericDevice(xhciClassCode, xhciSubclass)){ |
| 25 | Log::Warning("[XHCI] No XHCI Controllers Found!"); |
| 26 | return 1; |
| 27 | } |
| 28 | |
| 29 | List<PCIDevice*> devices = PCI::GetGenericPCIDevices(xhciClassCode, xhciSubclass); |
| 30 | for(PCIDevice* device : devices){ |
| 31 | if(device->GetProgIF() == xhciProgIF){ |
| 32 | xhciControllers.add_back(new XHCIController(device)); |
| 33 | } |
| 34 | } |
| 35 | return 0; |
| 36 | } |
| 37 | |
| 38 | XHCIController::XHCIController(PCIDevice* dev) : pciDevice(*dev){ |
| 39 | xhciBaseAddress = pciDevice.GetBaseAddressRegister(0); |
nothing calls this directly
no test coverage detected