MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Initialize

Method Initialize

Kernel/src/usb/xhci.cpp:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 5

FindGenericDeviceFunction · 0.85
WarningFunction · 0.85
GetGenericPCIDevicesFunction · 0.85
GetProgIFMethod · 0.80
add_backMethod · 0.45

Tested by

no test coverage detected