/** @file\r
- Obsolete library.\r
+ Obsolete library interfaces.\r
+\r
+ This file contains part of obsolete library interfaces in EDK.\r
+ User is recommended to follow the porting Guide in R8Lib.c to elimante them.\r
\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
\r
**/\r
\r
-////\r
+////#UefiBootServicesTableLib\r
EFI_STATUS\r
R8_EfiLibInstallDriverBinding (\r
IN EFI_HANDLE ImageHandle,\r
\r
Arguments:\r
\r
- ImageHandle - The image handle of the driver\r
-\r
+ ImageHandle - The image handle of the driver.\r
SystemTable - The EFI System Table that was passed to the driver's entry point\r
-\r
DriverBinding - A Driver Binding Protocol instance that this driver is producing\r
-\r
DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this\r
parameter is NULL, then a new handle is created.\r
\r
Returns: \r
\r
- EFI_SUCCESS is DriverBinding is installed onto DriverBindingHandle\r
-\r
- Otherwise, then return status from gBS->InstallProtocolInterface()\r
+ EFI_SUCCESS - DriverBinding is installed onto DriverBindingHandle\r
+ Others - Some error occurs when executing gBS->InstallProtocolInterface()\r
\r
--*/\r
{\r
//\r
// Porting Guide:\r
// This obsolete Edk library interface installs driver binding protocol.\r
- // If the entry point of that module only invoke this function, it can\r
+ // If the entry point of that module ONLY invokes this function, it can\r
// use UefiDriverModuleLib in MdePkg and expose "DriverBinding" protocol interface\r
// at the <Externs> tag, build tool will auto generate code to handle it.\r
// For example:\r
// </Externs>\r
//\r
DriverBinding->ImageHandle = ImageHandle;\r
-\r
DriverBinding->DriverBindingHandle = DriverBindingHandle;\r
\r
return gBS->InstallProtocolInterface (\r
}\r
////~\r
\r
-////\r
+////#UefiBootServicesTableLib\r
EFI_STATUS\r
R8_EfiLibInstallAllDriverProtocols (\r
IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE * SystemTable,\r
- IN EFI_DRIVER_BINDING_PROTOCOL * DriverBinding,\r
+ IN EFI_SYSTEM_TABLE *SystemTable,\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
IN EFI_HANDLE DriverBindingHandle,\r
- IN EFI_COMPONENT_NAME_PROTOCOL * ComponentName, OPTIONAL\r
- IN EFI_DRIVER_CONFIGURATION_PROTOCOL * DriverConfiguration, OPTIONAL\r
- IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL * DriverDiagnostics OPTIONAL\r
+ IN EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r
+ IN EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r
+ IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL\r
)\r
/*++\r
\r
Arguments:\r
\r
ImageHandle - The image handle of the driver\r
-\r
SystemTable - The EFI System Table that was passed to the driver's entry point\r
-\r
DriverBinding - A Driver Binding Protocol instance that this driver is producing\r
-\r
DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this\r
parameter is NULL, then a new handle is created.\r
-\r
ComponentName - A Component Name Protocol instance that this driver is producing\r
-\r
DriverConfiguration - A Driver Configuration Protocol instance that this driver is producing\r
- \r
DriverDiagnostics - A Driver Diagnostics Protocol instance that this driver is producing\r
\r
Returns: \r
\r
- EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle\r
-\r
- Otherwise, then return status from gBS->InstallProtocolInterface()\r
+ EFI_SUCCESS - DriverBinding is installed onto DriverBindingHandle\r
+ Others - Some error occurs when executing gBS->InstallProtocolInterface()\r
\r
--*/\r
{\r
// Porting Guide:\r
// This obsolete Edk library interface installs driver binding protocol\r
// with optional component name, driver configuration & driver diagnotics protocols.\r
- // If the entry point of that module only invoke this function, it can\r
+ // If the entry point of that module ONLY invokes this function, it can\r
// use UefiDriverModuleLib in MdePkg and expose "DriverBinding", "ComponentName",\r
// "DriverConfiguration" and "DriverDiagnostics" protocol interfaces.\r
// at the <Externs> tag, build tool will auto generate code to handle it.\r
//\r
EFI_STATUS Status;\r
\r
- Status = R8_EfiLibInstallDriverBinding (ImageHandle, SystemTable, DriverBinding, DriverBindingHandle);\r
+ DriverBinding->ImageHandle = ImageHandle;\r
+ DriverBinding->DriverBindingHandle = DriverBindingHandle;\r
+\r
+ Status = gBS->InstallProtocolInterface (\r
+ &DriverBinding->DriverBindingHandle,\r
+ &gEfiDriverBindingProtocolGuid,\r
+ EFI_NATIVE_INTERFACE,\r
+ DriverBinding\r
+ );\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
At a minimum, any blob of data could be represented as a hex string.\r
\r
Arguments:\r
- Str - Pointer to the string.\r
+ Str - Pointer to the string.\r
HexStringBufferLength - Length in bytes of buffer to hold the hex string. Includes tailing '\0' character.\r
- If routine return with EFI_SUCCESS, containing length of hex string buffer.\r
- If routine return with EFI_BUFFER_TOO_SMALL, containg length of hex string buffer desired.\r
- Buf - Buffer to be converted from.\r
- Len - Length in bytes of the buffer to be converted.\r
+ If routine return with EFI_SUCCESS, containing length of hex string buffer.\r
+ If routine return with EFI_BUFFER_TOO_SMALL, containg length of hex string buffer desired.\r
+ Buf - Buffer to be converted from.\r
+ Len - Length in bytes of the buffer to be converted.\r
\r
Returns:\r
- EFI_SUCCESS: Routine success.\r
- EFI_BUFFER_TOO_SMALL: The hex string buffer is too small.\r
+ EFI_SUCCESS - Routine success.\r
+ EFI_BUFFER_TOO_SMALL - The hex string buffer is too small.\r
\r
--*/\r
{\r
\r
str - Pointer to the null-terminated string to be trimmed. On return, \r
str will hold the trimmed string. \r
- CharC - Character will be trimmed from str.\r
+ CharC - Character will be trimmed from str.\r
\r
-Returns:\r
-\r
--*/\r
{\r
//\r
Arguments:\r
\r
Buffer - Location to place ascii hex string of Value.\r
-\r
Value - Hex value to convert to a string in Buffer.\r
-\r
Flags - Flags to use in printing Hex string, see file header for details.\r
-\r
Width - Width of hex value.\r
\r
Returns: \r
ConvertedStrLen - Length of the Hex String consumed.\r
\r
Returns:\r
- EFI_SUCCESS: Routine Success.\r
- EFI_BUFFER_TOO_SMALL: The buffer is too small to hold converted data.\r
- EFI_\r
+ EFI_SUCCESS - Routine Success.\r
+ EFI_BUFFER_TOO_SMALL - The buffer is too small to hold converted data.\r
\r
--*/\r
{\r
\r
Arguments:\r
\r
- Type The HOB type to return.\r
- HobStart The first HOB in the HOB list.\r
+ Type - The HOB type to return.\r
+ HobStart - The first HOB in the HOB list.\r
\r
Returns:\r
\r
- HobStart There were no HOBs found with the requested type.\r
- else Returns the first HOB with the matching type.\r
+ HobStart - There were no HOBs found with the requested type.\r
+ Other - The first HOB with the matching type.\r
\r
--*/\r
{\r
Arguments:\r
\r
HobStart - Start pointer of hob list\r
- \r
BootMode - Current boot mode recorded in PHIT hob\r
\r
Returns:\r
\r
EFI_NOT_FOUND - Invalid hob header\r
- \r
EFI_SUCCESS - Boot mode found\r
\r
--*/\r
// EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;\r
//\r
// HandOffHob = GetHobList (); \r
- // ASSERT (HandOffHob->Header.HobType = EFI_HOB_TYPE_HANDOFF);\r
+ // ASSERT (HandOffHob->Header.HobType == EFI_HOB_TYPE_HANDOFF);\r
// \r
// BootMode = HandOffHob->BootMode;\r
//\r
Arguments:\r
\r
HobStart - Start pointer of hob list\r
- \r
SizeOfMemorySpace - Size of memory size\r
- \r
SizeOfIoSpace - Size of IO size\r
\r
Returns:\r
\r
EFI_NOT_FOUND - CPU hob not found\r
- \r
EFI_SUCCESS - CPU hob found and information got.\r
\r
--*/\r
Arguments:\r
\r
HobStart - Start pointer of hob list\r
- \r
BaseAddress - Start address of next firmware volume\r
- \r
Length - Length of next firmware volume\r
\r
Returns:\r
\r
EFI_NOT_FOUND - Next firmware volume not found\r
- \r
EFI_SUCCESS - Next firmware volume found with address information\r
\r
--*/\r
Get the next guid hob.\r
\r
Arguments:\r
- HobStart A pointer to the start hob.\r
- Guid A pointer to a guid.\r
- Buffer A pointer to the buffer.\r
- BufferSize Buffer size.\r
+ HobStart - A pointer to the start hob.\r
+ Guid - A pointer to a guid.\r
+ Buffer - A pointer to the buffer.\r
+ BufferSize - Buffer size.\r
\r
Returns:\r
- Status code.\r
-\r
EFI_NOT_FOUND - Next Guid hob not found\r
- \r
EFI_SUCCESS - Next Guid hob found and data for this Guid got\r
- \r
EFI_INVALID_PARAMETER - invalid parameter\r
\r
--*/\r
Arguments:\r
\r
HobStart - Start pointer of hob list\r
- \r
PalEntry - Pointer to PAL entry\r
\r
Returns:\r
Arguments:\r
\r
HobStart - Start pointer of hob list\r
- \r
IoPortSpaceAddress - IO port space address\r
\r
Returns:\r