/** The entry point for SD host controller driver, used to install this driver on the ImageHandle. @param[in] ImageHandle The firmware allocated handle for this driver image. @param[in] SystemTable Pointer to the EFI system table. @retval EFI_SUCCESS Driver loaded. @retval other Driver not loaded. **/ EFI_STATUS EFIAPI InitializeSdMmcPciHcDxe ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gSdMmcPciHcDriverBinding, ImageHandle, &gSdMmcPciHcComponentName, &gSdMmcPciHcComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; }
/** Entrypoint of USB Keyboard Driver. This function is the entrypoint of USB Keyboard Driver. It installs Driver Binding Protocols together with Component Name Protocols. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The entry point is executed successfully. **/ EFI_STATUS EFIAPI USBKeyboardDriverBindingEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gUsbKeyboardDriverBinding, ImageHandle, &gUsbKeyboardComponentName, &gUsbKeyboardComponentName2 ); ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }
/** The user Entry Point for module EmuSimpleFileSystem. The user code starts with this function. @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 occurs when executing this entry point. **/ EFI_STATUS EFIAPI InitializeEmuSimpleFileSystem( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gEmuSimpleFileSystemDriverBinding, ImageHandle, &gEmuSimpleFileSystemComponentName, &gEmuSimpleFileSystemComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; }
/** The entry point for UFS host controller driver, used to install this driver on the ImageHandle. @param[in] ImageHandle The firmware allocated handle for this driver image. @param[in] SystemTable Pointer to the EFI system table. @retval EFI_SUCCESS Driver loaded. @retval other Driver not loaded. **/ EFI_STATUS EFIAPI UfsHcDriverEntry ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gUfsHcDriverBinding, ImageHandle, &gUfsHcComponentName, &gUfsHcComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; }
/** Entry point of this driver. @param ImageHandle Image handle this driver. @param SystemTable Pointer to the System Table. @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurred when executing this entry point. **/ EFI_STATUS EFIAPI NonDiscoverablePciDeviceDxeEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&mCpu); ASSERT_EFI_ERROR(Status); return EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gDriverBinding, ImageHandle, &gComponentName, &gComponentName2 ); }
/** Ax88772 driver entry point. @param [in] ImageHandle Handle for the image. @param [in] pSystemTable Address of the system table. @retval EFI_SUCCESS Image successfully loaded. **/ EFI_STATUS EFIAPI EntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE * pSystemTable ) { EFI_STATUS Status; DBG_ENTER ( ); // // Add the driver to the list of drivers // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, pSystemTable, &gDriverBinding, ImageHandle, &gComponentName, &gComponentName2 ); ASSERT_EFI_ERROR (Status); if ( !EFI_ERROR ( Status )) { DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO, "Installed: gEfiDriverBindingProtocolGuid on 0x%08x\r\n", ImageHandle )); DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO, "Installed: gEfiComponentNameProtocolGuid on 0x%08x\r\n", ImageHandle )); DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO, "Installed: gEfiComponentName2ProtocolGuid on 0x%08x\r\n", ImageHandle )); } DBG_EXIT_STATUS ( Status ); return Status; }
/** The user Entry Point for module PciSioSerial. The user code starts with this function. @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 occurs when executing this entry point. **/ EFI_STATUS EFIAPI InitializePciSioSerial ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; // // Install driver model protocol(s). // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gSerialControllerDriver, ImageHandle, &gPciSioSerialComponentName, &gPciSioSerialComponentName2 ); ASSERT_EFI_ERROR (Status); // // Initialize UART default setting in gSerialDevTempate // gSerialDevTemplate.SerialMode.BaudRate = PcdGet64 (PcdUartDefaultBaudRate); gSerialDevTemplate.SerialMode.DataBits = PcdGet8 (PcdUartDefaultDataBits); gSerialDevTemplate.SerialMode.Parity = PcdGet8 (PcdUartDefaultParity); gSerialDevTemplate.SerialMode.StopBits = PcdGet8 (PcdUartDefaultStopBits); gSerialDevTemplate.UartDevicePath.BaudRate = PcdGet64 (PcdUartDefaultBaudRate); gSerialDevTemplate.UartDevicePath.DataBits = PcdGet8 (PcdUartDefaultDataBits); gSerialDevTemplate.UartDevicePath.Parity = PcdGet8 (PcdUartDefaultParity); gSerialDevTemplate.UartDevicePath.StopBits = PcdGet8 (PcdUartDefaultStopBits); gSerialDevTemplate.ClockRate = PcdGet32 (PcdSerialClockRate); return Status; }
/** The main entry point for the IsaIo driver. @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 EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols. **/ EFI_STATUS EFIAPI InitializeIsaIo ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; // // Install driver model protocol(s). // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gIsaIoDriver, ImageHandle, &gIsaIoComponentName, &gIsaIoComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; }
/** Entrypoint of USB Mass Storage Driver. This function is the entrypoint of USB Mass Storage Driver. It installs Driver Binding Protocol together with Component Name Protocols. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The entry point is executed successfully. **/ EFI_STATUS EFIAPI USBMassStorageEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; // // Install driver binding protocol // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gUSBMassDriverBinding, ImageHandle, &gUsbMassStorageComponentName, &gUsbMassStorageComponentName2 ); ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }
/** This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers. @param ImageHandle The firmware allocated handle for the UEFI image. @param SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The operation completed successfully. @retval Others An unexpected error occurred. **/ EFI_STATUS EFIAPI XenPvBlkDxeDriverEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; // // Install UEFI Driver Model protocol(s). // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gXenPvBlkDxeDriverBinding, ImageHandle, &gXenPvBlkDxeComponentName, &gXenPvBlkDxeComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; }
/** Debug Port Driver entry point. Reads DebugPort variable to determine what device and settings to use as the debug port. Binds exclusively to SerialIo. Reverts to defaults if no variable is found. @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 EFI_OUT_OF_RESOURCES Fails to allocate memory for device. @retval other Some error occurs when executing this entry point. **/ EFI_STATUS EFIAPI InitializeDebugPortDriver ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; // // Install driver model protocol(s). // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gDebugPortDriverBinding, ImageHandle, &gDebugPortComponentName, &gDebugPortComponentName2 ); ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }
/** This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers. @param ImageHandle The firmware allocated handle for the UEFI image. @param SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The operation completed successfully. @retval Others An unexpected error occurred. **/ EFI_STATUS EFIAPI DnsDriverEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; Status = EFI_SUCCESS; // // Install the Dns4 Driver Binding Protocol. // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gDns4DriverBinding, ImageHandle, &gDnsComponentName, &gDnsComponentName2 ); if (EFI_ERROR (Status)) { return Status; } // // Install the Dns6 Driver Binding Protocol. // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gDns6DriverBinding, NULL, &gDnsComponentName, &gDnsComponentName2 ); if (EFI_ERROR (Status)) { goto Error1; } // // Create the driver data structures. // mDriverData = AllocateZeroPool (sizeof (DNS_DRIVER_DATA)); if (mDriverData == NULL) { Status = EFI_OUT_OF_RESOURCES; goto Error2; } // // Create the timer event to update DNS cache list. // Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL | EVT_TIMER, TPL_CALLBACK, DnsOnTimerUpdate, NULL, &mDriverData->Timer ); if (EFI_ERROR (Status)) { goto Error3; } Status = gBS->SetTimer (mDriverData->Timer, TimerPeriodic, TICKS_PER_SECOND); if (EFI_ERROR (Status)) { goto Error4; } InitializeListHead (&mDriverData->Dns4CacheList); InitializeListHead (&mDriverData->Dns4ServerList); InitializeListHead (&mDriverData->Dns6CacheList); InitializeListHead (&mDriverData->Dns6ServerList); return Status; Error4: gBS->CloseEvent (mDriverData->Timer); Error3: FreePool (mDriverData); Error2: gBS->UninstallMultipleProtocolInterfaces ( gDns6DriverBinding.DriverBindingHandle, &gEfiDriverBindingProtocolGuid, &gDns6DriverBinding, &gEfiComponentName2ProtocolGuid, &gDnsComponentName2, &gEfiComponentNameProtocolGuid, &gDnsComponentName, NULL ); Error1: gBS->UninstallMultipleProtocolInterfaces ( ImageHandle, &gEfiDriverBindingProtocolGuid, &gDns4DriverBinding, &gEfiComponentName2ProtocolGuid, &gDnsComponentName2, &gEfiComponentNameProtocolGuid, &gDnsComponentName, NULL ); return Status; }
/** This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers. @param ImageHandle The firmware allocated handle for the UEFI image. @param SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The operation completed successfully. @retval Others An unexpected error occurred. **/ EFI_STATUS EFIAPI HttpDxeDriverEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; VOID *Registration; gBS->LocateProtocol ( &gEfiHttpUtilitiesProtocolGuid, NULL, (VOID **) &mHttpUtilities ); if (mHttpUtilities == NULL) { // // No Http utilities protocol, register a notify. // EfiCreateProtocolNotifyEvent ( &gEfiHttpUtilitiesProtocolGuid, TPL_CALLBACK, HttpUtilitiesInstalledCallback, NULL, &Registration ); } // // Install UEFI Driver Model protocol(s). // Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gHttpDxeIp4DriverBinding, ImageHandle, &gHttpDxeComponentName, &gHttpDxeComponentName2 ); if (EFI_ERROR (Status)) { return Status; } Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gHttpDxeIp6DriverBinding, NULL, &gHttpDxeComponentName, &gHttpDxeComponentName2 ); if (EFI_ERROR (Status)) { gBS->UninstallMultipleProtocolInterfaces ( ImageHandle, &gEfiDriverBindingProtocolGuid, &gHttpDxeIp4DriverBinding, &gEfiComponentName2ProtocolGuid, &gHttpDxeComponentName2, &gEfiComponentNameProtocolGuid, &gHttpDxeComponentName, NULL ); } return Status; }