/* * This is the entry routine for all system bus drivers,it is called by DeviceManager when * it is initializing. * This routine checks if there is(are) PCI bus(es) in system,if not,returns FALSE,else,scan * all PCI buses,configure all devices reside on the PCI buses,and returns TRUE. */ BOOL PciBusDriver(__DEVICE_MANAGER* lpDevMgr) { BOOL bResult = FALSE; BUG_ON(NULL == lpDevMgr); /* Only available in process of system initialization. */ BUG_ON(!IN_SYSINITIALIZATION()); /* Probe if there is PCI bus present. */ bResult = PciBusProbe(); if (!bResult) { /* No PCI bus presents. */ return FALSE; } /* Scan all PCI device(s) attaching on the PCI bus system. */ PciScanBus(lpDevMgr,NULL,0); return TRUE; }
// //The implementation of PciBusDriver routine. //This is the entry routine for all system bus drivers,it is called by DeviceManager when //this object is initializing. //This routine checks if there is(are) PCI bus(es) in system,if not,returns FALSE,else,scan //all PCI buses,configure all devices reside on the PCI buses,and returns TRUE. // BOOL PciBusDriver(__DEVICE_MANAGER* lpDevMgr) { BOOL bResult = FALSE; if(NULL == lpDevMgr) return FALSE; // //First,probe if there is PCI bus present. // bResult = PciBusProbe(); if(!bResult) //No PCI bus. return FALSE; // //Now,should scan all PCI devices. // PciScanBus(lpDevMgr,NULL,0); return TRUE; }