diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-02-02 13:15:44 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-02-02 13:15:44 +0000 |
commit | 9226efe5ebb83ad0d5882e3eb7a54f3d63f81e9d (patch) | |
tree | 9cc9cc6964c6ea0d510c1eceda6ee5e134ed6f84 /MdeModulePkg/Universal/BdsDxe | |
parent | e52c5a9fdcc1663f98e1a1090c424c1606990650 (diff) | |
download | edk2-platforms-9226efe5ebb83ad0d5882e3eb7a54f3d63f81e9d.tar.xz |
1) Cleanup HiiLib, IfrSupportLib.
2) Add ExtendedHiiLib and ExtendedIfrSupportLib which implement APIs that require the OPcode and Device Path which is specific to Intel's implementation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4662 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe')
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/Bds.h | 3 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c | 10 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/BootMngr/BootManager.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c | 16 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/FrontPage.c | 26 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/Language.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/String.c | 4 |
10 files changed, 45 insertions, 40 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/Bds.h b/MdeModulePkg/Universal/BdsDxe/Bds.h index fbfa9658da..7c76120fa7 100644 --- a/MdeModulePkg/Universal/BdsDxe/Bds.h +++ b/MdeModulePkg/Universal/BdsDxe/Bds.h @@ -70,6 +70,7 @@ Revision History #include <Library/PerformanceLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/IfrSupportLib.h>
+#include <Library/ExtendedIfrSupportLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/HobLib.h>
#include <Library/BaseLib.h>
@@ -77,6 +78,8 @@ Revision History #include <Library/PcdLib.h>
#include <Library/CapsuleLib.h>
#include <Library/HiiLib.h>
+#include <Library/ExtendedHiiLib.h>
+
#include <Library/GenericBdsLib.h>
#include <Library/PlatformBdsLib.h>
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf index c4c6b7fd8f..f7358f0d3d 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -88,6 +88,7 @@ HobLib
UefiRuntimeServicesTableLib
IfrSupportLib
+ ExtendedIfrSupportLib
GenericBdsLib
ReportStatusCodeLib
PerformanceLib
@@ -100,6 +101,7 @@ DebugLib
PrintLib
HiiLib
+ ExtendedHiiLib
UefiDriverEntryPoint
PlatformBdsLib
CapsuleLib
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c index 9cf2a9d09a..63724dc89e 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c @@ -68,7 +68,7 @@ Returns: for (Index = 0; Index < MenuOption->MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (MenuOption, Index);
- IfrLibNewString (
+ HiiLibNewString (
HiiHandle,
&NewMenuEntry->DisplayStringToken,
NewMenuEntry->DisplayString
@@ -77,7 +77,7 @@ Returns: if (NULL == NewMenuEntry->HelpString) {
NewMenuEntry->HelpStringToken = NewMenuEntry->DisplayStringToken;
} else {
- IfrLibNewString (
+ HiiLibNewString (
HiiHandle,
&NewMenuEntry->HelpStringToken,
NewMenuEntry->HelpString
@@ -885,7 +885,7 @@ Returns: //
// Post our Boot Maint VFR binnary to the HII database.
//
- PackageList = PreparePackageList (2, &mBootMaintGuid, BmBin, BdsStrings);
+ PackageList = HiiLibPreparePackageList (2, &mBootMaintGuid, BmBin, BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
@@ -899,7 +899,7 @@ Returns: //
// Post our File Explorer VFR binary to the HII database.
//
- PackageList = PreparePackageList (2, &mFileExplorerGuid, FEBin, BdsStrings);
+ PackageList = HiiLibPreparePackageList (2, &mFileExplorerGuid, FEBin, BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
@@ -1124,7 +1124,7 @@ Returns: //
NextListNode = EfiAllocateZeroPool (sizeof (STRING_LIST_NODE));
- IfrLibNewString (CallbackData->BmmHiiHandle, &(NextListNode->StringToken), L" ");
+ HiiLibNewString (CallbackData->BmmHiiHandle, &(NextListNode->StringToken), L" ");
ASSERT (NextListNode->StringToken != 0);
StringDepository->TotalNodeNumber++;
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c index d1608bf528..06a879a3ef 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c @@ -688,7 +688,7 @@ Returns: UnicodeValueToString (RowString, 0, Row, 0);
StrCat (ModeString, RowString);
- IfrLibNewString (CallbackData->BmmHiiHandle, &ModeToken[Index], ModeString);
+ HiiLibNewString (CallbackData->BmmHiiHandle, &ModeToken[Index], ModeString);
IfrOptionList[Index].StringToken = ModeToken[Index];
IfrOptionList[Index].Value.u16 = (UINT16) Mode;
@@ -1142,11 +1142,11 @@ UpdateSetLegacyDeviceOrderPage ( //
UnicodeSPrint (String, sizeof (String), TypeStr, Index);
StrRef = 0;
- IfrLibNewString (CallbackData->BmmHiiHandle, &StrRef, String);
+ HiiLibNewString (CallbackData->BmmHiiHandle, &StrRef, String);
UnicodeSPrint (String, sizeof (String), TypeStrHelp, Index);
StrRefHelp = 0;
- IfrLibNewString (CallbackData->BmmHiiHandle, &StrRefHelp, String);
+ HiiLibNewString (CallbackData->BmmHiiHandle, &StrRefHelp, String);
CreateOneOfOpCode (
(EFI_QUESTION_ID) (Key + Index),
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c index f5a1038b46..cd18c038d8 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c @@ -601,13 +601,13 @@ Var_UpdateDriverOption ( CallbackData,
DriverOptionStrDepository
);
- IfrLibNewString (HiiHandle, &NewMenuEntry->DisplayStringToken, NewMenuEntry->DisplayString);
+ HiiLibNewString (HiiHandle, &NewMenuEntry->DisplayStringToken, NewMenuEntry->DisplayString);
NewMenuEntry->HelpStringToken = GetStringTokenFromDepository (
CallbackData,
DriverOptionHelpStrDepository
);
- IfrLibNewString (HiiHandle, &NewMenuEntry->HelpStringToken, NewMenuEntry->HelpString);
+ HiiLibNewString (HiiHandle, &NewMenuEntry->HelpStringToken, NewMenuEntry->HelpString);
if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
@@ -759,13 +759,13 @@ Var_UpdateBootOption ( CallbackData,
BootOptionStrDepository
);
- IfrLibNewString (CallbackData->FeHiiHandle, &NewMenuEntry->DisplayStringToken, NewMenuEntry->DisplayString);
+ HiiLibNewString (CallbackData->FeHiiHandle, &NewMenuEntry->DisplayStringToken, NewMenuEntry->DisplayString);
NewMenuEntry->HelpStringToken = GetStringTokenFromDepository (
CallbackData,
BootOptionHelpStrDepository
);
- IfrLibNewString (CallbackData->FeHiiHandle, &NewMenuEntry->HelpStringToken, NewMenuEntry->HelpString);
+ HiiLibNewString (CallbackData->FeHiiHandle, &NewMenuEntry->HelpStringToken, NewMenuEntry->HelpString);
if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/MdeModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index fdf39cac98..fec87406ec 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -151,7 +151,7 @@ Returns: //
// Publish our HII data
//
- PackageList = PreparePackageList (2, &mBootManagerGuid, BootManagerVfrBin, BdsStrings);
+ PackageList = HiiLibPreparePackageList (2, &mBootManagerGuid, BootManagerVfrBin, BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
@@ -246,7 +246,7 @@ Returns: continue;
}
- IfrLibNewString (HiiHandle, &Token, Option->Description);
+ HiiLibNewString (HiiHandle, &Token, Option->Description);
TempStr = DevicePathToStr (Option->DevicePath);
TempSize = StrSize (TempStr);
@@ -254,7 +254,7 @@ Returns: StrCat (HelpString, L"Device Path : ");
StrCat (HelpString, TempStr);
- IfrLibNewString (HiiHandle, &HelpToken, HelpString);
+ HiiLibNewString (HiiHandle, &HelpToken, HelpString);
CreateActionOpCode (
mKeyInput,
diff --git a/MdeModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/MdeModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c index 0ec274d8ce..febde9567d 100644 --- a/MdeModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c +++ b/MdeModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c @@ -162,7 +162,7 @@ Returns: //
// Publish our HII data
//
- PackageList = PreparePackageList (2, &mDeviceManagerGuid, DeviceManagerVfrBin, BdsStrings);
+ PackageList = HiiLibPreparePackageList (2, &mDeviceManagerGuid, DeviceManagerVfrBin, BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
@@ -251,7 +251,7 @@ Returns: //
// Get all the Hii handles
//
- Status = GetHiiHandles (&HandleBufferLength, &HiiHandles);
+ Status = HiiLibGetHiiHandles (&HandleBufferLength, &HiiHandles);
ASSERT_EFI_ERROR (Status);
HiiHandle = gDeviceManagerPrivate.HiiHandle;
@@ -265,7 +265,7 @@ Returns: //
NumberOfHiiHandles = HandleBufferLength / sizeof (EFI_HII_HANDLE);
for (Index = 0; Index < NumberOfHiiHandles; Index++) {
- HiiLibExtractClassFromHiiHandle (HiiHandles[Index], &FormSetClass, &FormSetTitle, &FormSetHelp);
+ IfrLibExtractClassFromHiiHandle (HiiHandles[Index], &FormSetClass, &FormSetTitle, &FormSetHelp);
if (FormSetClass == EFI_NON_DEVICE_CLASS) {
continue;
@@ -274,14 +274,14 @@ Returns: Token = 0;
*String = 0;
StringLength = 0x1000;
- IfrLibGetString (HiiHandles[Index], FormSetTitle, String, &StringLength);
- IfrLibNewString (HiiHandle, &Token, String);
+ HiiLibGetString (HiiHandles[Index], FormSetTitle, String, &StringLength);
+ HiiLibNewString (HiiHandle, &Token, String);
TokenHelp = 0;
*String = 0;
StringLength = 0x1000;
- IfrLibGetString (HiiHandles[Index], FormSetHelp, String, &StringLength);
- IfrLibNewString (HiiHandle, &TokenHelp, String);
+ HiiLibGetString (HiiHandles[Index], FormSetHelp, String, &StringLength);
+ HiiLibNewString (HiiHandle, &TokenHelp, String);
for (Count = 0; Count < MENU_ITEM_NUM; Count++) {
if (FormSetClass & mDeviceManagerMenuItemTable[Count].Class) {
@@ -413,7 +413,7 @@ Returns: // Cleanup dynamic created strings in HII database by reinstall the packagelist
//
gHiiDatabase->RemovePackageList (gHiiDatabase, HiiHandle);
- PackageList = PreparePackageList (2, &mDeviceManagerGuid, DeviceManagerVfrBin, BdsStrings);
+ PackageList = HiiLibPreparePackageList (2, &mDeviceManagerGuid, DeviceManagerVfrBin, BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
gHiiDatabase,
diff --git a/MdeModulePkg/Universal/BdsDxe/FrontPage.c b/MdeModulePkg/Universal/BdsDxe/FrontPage.c index b82b40fbb7..1d364bf692 100644 --- a/MdeModulePkg/Universal/BdsDxe/FrontPage.c +++ b/MdeModulePkg/Universal/BdsDxe/FrontPage.c @@ -174,13 +174,13 @@ FrontPageCallback ( //
// Collect the languages from what our current Language support is based on our VFR
//
- LanguageString = GetSupportedLanguages (gFrontPagePrivate.HiiHandle);
+ LanguageString = HiiLibGetSupportedLanguages (gFrontPagePrivate.HiiHandle);
ASSERT (LanguageString != NULL);
Index = 0;
LangCode = LanguageString;
while (*LangCode != 0) {
- GetNextLanguage (&LangCode, Lang);
+ HiiLibGetNextLanguage (&LangCode, Lang);
if (Index == Value->u8) {
break;
@@ -335,7 +335,7 @@ Returns: //
// Publish our HII data
//
- PackageList = PreparePackageList (2, &mFrontPageGuid, FrontPageVfrBin, BdsStrings);
+ PackageList = HiiLibPreparePackageList (2, &mFrontPageGuid, FrontPageVfrBin, BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
@@ -353,7 +353,7 @@ Returns: //
// Get current language setting
//
- GetCurrentLanguage (CurrentLang);
+ HiiLibGetCurrentLanguage (CurrentLang);
//
// Allocate space for creation of UpdateData Buffer
@@ -369,13 +369,13 @@ Returns: // Collect the languages from what our current Language support is based on our VFR
//
HiiHandle = gFrontPagePrivate.HiiHandle;
- LanguageString = GetSupportedLanguages (HiiHandle);
+ LanguageString = HiiLibGetSupportedLanguages (HiiHandle);
ASSERT (LanguageString != NULL);
OptionCount = 0;
LangCode = LanguageString;
while (*LangCode != 0) {
- GetNextLanguage (&LangCode, Lang);
+ HiiLibGetNextLanguage (&LangCode, Lang);
if (gFrontPagePrivate.LanguageToken == NULL) {
//
@@ -409,7 +409,7 @@ Returns: ASSERT_EFI_ERROR (Status);
Token = 0;
- Status = IfrLibNewString (HiiHandle, &Token, StringBuffer);
+ Status = HiiLibNewString (HiiHandle, &Token, StringBuffer);
FreePool (StringBuffer);
} else {
Token = gFrontPagePrivate.LanguageToken[OptionCount];
@@ -542,7 +542,7 @@ Returns: {
EFI_STATUS Status;
- Status = GetStringFromToken (ProducerGuid, Token, String);
+ Status = HiiLibGetStringFromToken (ProducerGuid, Token, String);
if (EFI_ERROR (Status)) {
*String = GetStringById (STRING_TOKEN (STR_MISSING_STRING));
}
@@ -677,7 +677,7 @@ Returns: BiosVendor = (EFI_MISC_BIOS_VENDOR_DATA *) (DataHeader + 1);
GetProducerString (&Record->ProducerName, BiosVendor->BiosVersion, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
- IfrLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
+ HiiLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
FreePool (NewString);
Find[0] = TRUE;
}
@@ -688,7 +688,7 @@ Returns: SystemManufacturer = (EFI_MISC_SYSTEM_MANUFACTURER_DATA *) (DataHeader + 1);
GetProducerString (&Record->ProducerName, SystemManufacturer->SystemProductName, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
- IfrLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
+ HiiLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
FreePool (NewString);
Find[1] = TRUE;
}
@@ -699,7 +699,7 @@ Returns: ProcessorVersion = (EFI_PROCESSOR_VERSION_DATA *) (DataHeader + 1);
GetProducerString (&Record->ProducerName, *ProcessorVersion, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
- IfrLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
+ HiiLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
FreePool (NewString);
Find[2] = TRUE;
}
@@ -710,7 +710,7 @@ Returns: ProcessorFrequency = (EFI_PROCESSOR_CORE_FREQUENCY_DATA *) (DataHeader + 1);
ConvertProcessorToString (ProcessorFrequency, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_SPEED);
- IfrLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
+ HiiLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
FreePool (NewString);
Find[3] = TRUE;
}
@@ -724,7 +724,7 @@ Returns: &NewString
);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_MEMORY_SIZE);
- IfrLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
+ HiiLibSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString);
FreePool (NewString);
Find[4] = TRUE;
}
diff --git a/MdeModulePkg/Universal/BdsDxe/Language.c b/MdeModulePkg/Universal/BdsDxe/Language.c index 8a99e9bf82..907bb61e8b 100644 --- a/MdeModulePkg/Universal/BdsDxe/Language.c +++ b/MdeModulePkg/Universal/BdsDxe/Language.c @@ -33,7 +33,7 @@ EFI_GUID mFontPackageGuid = { typedef struct {
//
- // This 4-bytes total array length is required by PreparePackageList()
+ // This 4-bytes total array length is required by HiiLibPreparePackageList()
//
UINT32 Length;
@@ -288,7 +288,7 @@ Returns: return ;
}
- PackageList = PreparePackageList (1, &mFontPackageGuid, &mFontBin);
+ PackageList = HiiLibPreparePackageList (1, &mFontPackageGuid, &mFontBin);
ASSERT (PackageList != NULL);
gHiiDatabase->NewPackageList (gHiiDatabase, PackageList, DriverHandle, &HiiHandle);
diff --git a/MdeModulePkg/Universal/BdsDxe/String.c b/MdeModulePkg/Universal/BdsDxe/String.c index 84f9f96edf..6cb109d54e 100644 --- a/MdeModulePkg/Universal/BdsDxe/String.c +++ b/MdeModulePkg/Universal/BdsDxe/String.c @@ -63,7 +63,7 @@ Returns: return Status;
}
- PackageList = PreparePackageList (1, &mBdsStringPackGuid, &BdsStrings);
+ PackageList = HiiLibPreparePackageList (1, &mBdsStringPackGuid, &BdsStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
@@ -98,7 +98,7 @@ Returns: CHAR16 *String;
String = NULL;
- GetStringFromHandle (gStringPackHandle, Id, &String);
+ HiiLibGetStringFromHandle (gStringPackHandle, Id, &String);
return String;
}
|