/** * Creates/installs the BlackBox Interface and eminating Entry Point node list. * @param ImageHandle The test driver image handle * @param SystemTable Pointer to System Table * @return EFI_SUCCESS Indicates the interface was installed * @return EFI_OUT_OF_RESOURCES Indicates space for the new handle could not be allocated * @return EFI_INVALID_PARAMETER: One of the parameters has an invalid value. */ EFI_STATUS InitializeBBTestPxeBCProtocol ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); EfiInitializeDriverLib (ImageHandle, SystemTable); Status = gtBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent); if (EFI_ERROR(Status)) { return Status; } Status = GetSystemDevicePathAndFilePath (ImageHandle); if (EFI_ERROR(Status)) { return Status; } return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gEfiPxeBcTestProtField, gPxeTestEntryField, BBTestPxeBcUnload, &gBBTestProtocolInterface ); }
/** * Creates/installs the BlackBox Interface and eminating Entry Point * node list. * @param ImageHandle The test driver image handle * @param SystemTable Pointer to System Table * @return EFI_SUCCESS Indicates the interface was installed * @return EFI_OUT_OF_RESOURCES Indicates space for the new handle could not be allocated * @return EFI_INVALID_PARAMETER: One of the parameters has an invalid value. */ EFI_STATUS InitializeBBTestProtocolHandlerBootServices ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; EfiInitializeTestLib (ImageHandle, SystemTable); // // initialize test utility lib // InitializeLib (ImageHandle, SystemTable); mImageHandle = ImageHandle; Status = InitializeGlobalData (); if (EFI_ERROR (Status)) { return Status; } return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestProtocolHandlerBootServicesUnload, &gBBTestProtocolInterface ); }
/********************************************************************************* * Creates/installs the BlackBox Interface and eminating Entry Point node list. * @param ImageHandle The test driver image handle * @param SystemTable Pointer to System Table * @return EFI_SUCCESS Indicates the interface was installed * @return EFI_OUT_OF_RESOURCES Indicates space for the new handle could not be allocated * @return EFI_INVALID_PARAMETER: One of the parameters has an invalid value. ********************************************************************************/ EFI_STATUS InitializeTapeTest ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); EfiInitializeDriverLib (ImageHandle, SystemTable); // // Make sure the Protocol is not already installed in the system // //ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiTapeIoProtocolGuid); Status = gtBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent); if (EFI_ERROR(Status)) { return Status; } Status = EfiInitAndInstallBBTestInterface ( &ImageHandle, &gEfiTapeTestProtField, gTapeTestEntryField, UnloadTapeTest, &gTapeTestProtocol ); return Status; }
EFI_STATUS InitializeBBTestDeviceIo ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) /*++ Routine Description: Creates/installs the BlackBox Interface and eminating Entry Point node list. Arguments: ImageHandle: NULL *SystemTable: Pointer to System Table Returns: EFI_SUCCESS: Indicates the interface was installed. EFI_OUT_OF_RESOURCES: Indicates space for the new handle could not be allocated EFI_INVALID_PARAMETER: One of the parameters has an invalid value. --*/ { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); GetSystemDevicePathAndFilePath (ImageHandle); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestDeviceIoUnload, &gBBTestProtocolInterface ); }
/** * UGA Draw Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestUgaDraw ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); EfiInitializeDriverLib (ImageHandle, SystemTable); // // Initialize Demo Data // DemoResolutionMax = sizeof (DemoResolution) / sizeof (DEMO_RESOLUTION_TYPE); DemoRefreshRateMax = sizeof (DemoRefreshRate) / sizeof (DEMO_REFRESH_RATE_TYPE); DemoColorDepthMax = sizeof (DemoColorDepth) / sizeof (DEMO_COLOR_DEPTH_TYPE); gtBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestUgaDrawProtocolUnload, &gBBTestProtocolInterface ); }
EFI_STATUS InitializeEfiCompliantBbTest ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, EfiCompliantBbTestUnload, &gBBTestProtocolInterface ); }
/** * Efi Driver Supported Efi Version Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestDriverSupportedEfiVersion ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestDriverSupportedEfiVersionProtocolUnload, &gBBTestProtocolInterface ); }
/** * Scsi Pass Through Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestScsiPassThru ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestScsiPassThruProtocolUnload, &gBBTestProtocolInterface ); }
/** * Platform Driver Override Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestPlatformDriverOverride ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); DriverImageHandle = ImageHandle; return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestPlatformDriverOverrideProtocolUnload, &gBBTestProtocolInterface ); }
/** * Creates/installs the BlackBox Interface and the Entry Point list. * @param ImageHandle The image handle. * @param SystemTable The system table. * @return EFI_SUCCESS The interface was installed successfully. * @return EFI_OUT_OF_RESOURCES Failed due to the lack of resources. * @return EFI_INVALID_PARAMETER One of parameters is invalid. */ EFI_STATUS InitializeBBTestUsbHc ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); gtBS->CreateEvent(EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestUsbHcUnload, &gBBTestProtocolInterface ); }
/** * Unicode Collation Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestUnicodeCollation ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); InitCharMapping(); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestUnicodeCollationProtocolUnload, &gBBTestProtocolInterface ); }
/** * SimpleNetwork Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestSimpleNetworkProtocol ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { // // Initialize library // EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); EfiInitializeDriverLib (ImageHandle, SystemTable); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestSimpleNetworkUnload, &gBBTestProtocolInterface ); }
EFI_STATUS InitializeBBTestPciRootBridgeIo ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { // //initialize all the library to be used in this driver. // EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); GetSystemDevicePathAndFilePath (ImageHandle); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestPciRootBridgeIoUnload, &gBBTestProtocolInterface ); }
/** * Creates/installs the BlackBox Interface and eminating Entry Point * node list. * @param ImageHandle The test driver image handle * @param SystemTable Pointer to System Table * @return EFI_SUCCESS Indicates the interface was installed * @return EFI_OUT_OF_RESOURCES Indicates space for the new handle could not be allocated * @return EFI_INVALID_PARAMETER: One of the parameters has an invalid value. */ EFI_STATUS InitializeBBTestComponentName ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EfiInitializeTestLib (ImageHandle, SystemTable); // // initialize test utility lib // InitializeLib (ImageHandle, SystemTable); mImageHandle = ImageHandle; return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestComponentNameUnload, &gBBTestProtocolInterface ); }
/** * Disk I/O Protocol Test Driver Entry point. * @param ImageHandle the driver image handle. * @param SystemTable the system table. * @return EFI_SUCCESS the driver is loaded successfully. */ EFI_STATUS InitializeBBTestDiskIo ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; EfiInitializeTestLib (ImageHandle, SystemTable); InitializeLib (ImageHandle, SystemTable); Status = gtBS->CreateEvent(EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent); ASSERT_EFI_ERROR(Status); return EfiInitAndInstallBBTestInterface ( &ImageHandle, &gBBTestProtocolField, gBBTestEntryField, BBTestDiskIoProtocolUnload, &gBBTestProtocolInterface ); }