// // PCI Bus Driver Support Functions // EFI_STATUS EFIAPI PciBusEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) /*++ Routine Description: Initialize the global variables publish the driver binding protocol Arguments: IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable Returns: EFI_SUCCESS EFI_DEVICE_ERROR --*/ { EFI_STATUS Status; // // Initialize the EFI Driver Library // Status = INSTALL_ALL_DRIVER_PROTOCOLS_OR_PROTOCOLS2 ( ImageHandle, SystemTable, &gPciBusDriverBinding, ImageHandle, &gPciBusComponentName, NULL, NULL ); InitializePciDevicePool (); gFullEnumeration = TRUE; gPciHostBridgeNumber = 0; InstallHotPlugRequestProtocol (&Status); return Status; }
// // PCI Bus Driver Support Functions // EFI_STATUS EFIAPI PciBusEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) /*++ Routine Description: Initialize the global variables publish the driver binding protocol Arguments: IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable Returns: EFI_SUCCESS EFI_DEVICE_ERROR --*/ { EFI_STATUS Status; // // Initialize the EFI Driver Library // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gPciBusDriverBinding, ImageHandle, &gPciBusComponentName, &gPciBusComponentName2 ); ASSERT_EFI_ERROR (Status); InitializePciDevicePool (); gFullEnumeration = TRUE; return Status; }
/** The Entry Point for PCI Bus module. The user code starts with this function. Installs driver module protocols and. Creates virtual device handles for ConIn, ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol, Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers. Installs Graphics Output protocol and/or UGA Draw protocol if needed. @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurred when executing this entry point. **/ EFI_STATUS EFIAPI PciBusEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; EFI_HANDLE Handle; // // Initializes PCI devices pool // InitializePciDevicePool (); // // Install driver model protocol(s). // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gPciBusDriverBinding, ImageHandle, &gPciBusComponentName, &gPciBusComponentName2 ); ASSERT_EFI_ERROR (Status); if (FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) { // // If Hot Plug is supported, install EFI PCI Hot Plug Request protocol. // Handle = NULL; Status = gBS->InstallProtocolInterface ( &Handle, &gEfiPciHotPlugRequestProtocolGuid, EFI_NATIVE_INTERFACE, &mPciHotPlugRequest ); } return Status; }