summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Library/UefiLib.h
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-22 16:22:26 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-22 16:22:26 +0000
commitc7d265a94a3ee2517430e4f19f5b24482e5e7132 (patch)
tree6f74331af15f965bc99f56652cfa75db9794e743 /MdePkg/Include/Library/UefiLib.h
parent1a5589a183b11fcfa54a0c4b5496d80f233b1ceb (diff)
downloadedk2-platforms-c7d265a94a3ee2517430e4f19f5b24482e5e7132.tar.xz
Checked in part of MDE library instances following PI and UEFI. It includes:
1) UefiLib adds features of RFC 3066/Iso639 language string and driver model protocols installation. 2) PeiCoreEntryPoint following PI. 3) UefiDriverEntryPoint following UEFI/EFI. 4) PeiServicesTablePointerLib following PI for IPF and x86. 5) Remove many CommonHeader.h. If there is only one C file in module, we should add the common headers in C file instead of creating a new CommonHeader.h. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2723 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Library/UefiLib.h')
-rw-r--r--MdePkg/Include/Library/UefiLib.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index 9eaf48cace..ef231f1774 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -15,6 +15,13 @@
#ifndef __UEFI_LIB_H__
#define __UEFI_LIB_H__
+#include <Protocol/DriverBinding.h>
+#include <Protocol/DriverConfiguration.h>
+#include <Protocol/ComponentName.h>
+#include <Protocol/ComponentName2.h>
+#include <Protocol/DriverDiagnostics.h>
+#include <Protocol/DriverDiagnostics2.h>
+
//
// Unicode String Table
//
@@ -708,4 +715,125 @@ AsciiErrorPrint (
...
);
+/**
+ Intialize a driver by installing the Driver Binding Protocol onto the
+ driver's DriverBindingHandle. This is typically the same as the driver's
+ ImageHandle, but it can be different if the driver produces multiple
+ DriverBinding Protocols. This function also initializes the EFI Driver
+ Library that initializes the global variables gST, gBS, gRT.
+
+ @param ImageHandle The image handle of the driver
+ @param SystemTable The EFI System Table that was passed to the driver's entry point
+ @param DriverBinding A Driver Binding Protocol instance that this driver is producing
+ @param DriverBindingHandle The handle that DriverBinding is to be installe onto. If this
+ parameter is NULL, then a new handle is created.
+
+ @retval EFI_SUCCESS DriverBinding is installed onto DriverBindingHandle
+ @retval Other Status from gBS->InstallProtocolInterface()
+
+**/
+EFI_STATUS
+EFIAPI
+EfiLibInstallDriverBinding (
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle
+ );
+
+/**
+ Intialize a driver by installing the Driver Binding Protocol onto the
+ driver's DriverBindingHandle. This is typically the same as the driver's
+ ImageHandle, but it can be different if the driver produces multiple
+ DriverBinding Protocols. This function also initializes the EFI Driver
+ Library that initializes the global variables gST, gBS, gRT.
+
+ @ImageHandle The image handle of the driver
+ @SystemTable The EFI System Table that was passed to the driver's entry point
+ @DriverBinding A Driver Binding Protocol instance that this driver is producing
+ @DriverBindingHandle The handle that DriverBinding is to be installe onto. If this
+ parameter is NULL, then a new handle is created.
+ @ComponentName A Component Name Protocol instance that this driver is producing
+ @DriverConfiguration A Driver Configuration Protocol instance that this driver is producing
+ @DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing
+
+ @retval EFI_SUCCESS DriverBinding is installed onto DriverBindingHandle
+ @retval Other Status from gBS->InstallProtocolInterface()
+
+**/
+EFI_STATUS
+EFIAPI
+EfiLibInstallAllDriverProtocols (
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle,
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL
+ );
+
+
+/**
+ Intialize a driver by installing the Driver Binding Protocol
+ onto the driver's DriverBindingHandle. This is typically the
+ same as the driver's ImageHandle, but it can be different if
+ the driver produces multiple DriverBinding Protocols. This
+ function also initializes the EFI Driver Library that
+ initializes the global variables gST, gBS, gRT.
+
+ @ImageHandle The image handle of the driver
+
+ @SystemTable The EFI System Table that was
+ passed to the driver's entry
+ point
+
+ @DriverBinding A Driver Binding Protocol
+ instance that this driver is
+ producing
+
+ @DriverBindingHandle The handle that DriverBinding is
+ to be installe onto. If this
+ parameter is NULL, then a new
+ handle is created.
+
+ @ComponentName A Component Name Protocol
+ instance that this driver is
+ producing
+
+ @ComponentName2 A Component Name 2 Protocol
+ instance that this driver is
+ producing
+
+ @DriverConfiguration A Driver Configuration Protocol
+ instance that this driver is
+ producing
+
+ @DriverDiagnostics A Driver Diagnostics Protocol
+ instance that this driver is
+ producing
+
+ @DriverDiagnostics2 A Driver Diagnostics 2 Protocol
+ instance that this driver is
+ producing
+
+ @retval EFI_SUCCESS DriverBinding is installed onto DriverBindingHandle
+ @retval Other Status from gBS->InstallProtocolInterface()
+
+**/
+EFI_STATUS
+EFIAPI
+EfiLibInstallAllDriverProtocols2 (
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle,
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL
+ IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
+ );
+
+
#endif