mirror of https://github.com/acidanthera/audk.git
Update BdsDxe to use HiiLib and UefiHiiServicesLib APIs to eliminate the symbol collision.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9210 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ab8cc80b8a
commit
33bb632657
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Head file for BDS Architectural Protocol implementation
|
Head file for BDS Architectural Protocol implementation
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. <BR>
|
Copyright (c) 2004 - 2009, Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -61,6 +61,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/HiiLib.h>
|
#include <Library/HiiLib.h>
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Library/UefiHiiServicesLib.h>
|
||||||
|
|
||||||
#include <Library/GenericBdsLib.h>
|
#include <Library/GenericBdsLib.h>
|
||||||
#include <Library/PlatformBdsLib.h>
|
#include <Library/PlatformBdsLib.h>
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
PlatformBdsLib
|
PlatformBdsLib
|
||||||
CapsuleLib
|
CapsuleLib
|
||||||
PcdLib
|
PcdLib
|
||||||
|
UefiHiiServicesLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiGlobalVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"BootNext" (The number of next boot option)
|
gEfiGlobalVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"BootNext" (The number of next boot option)
|
||||||
|
@ -137,19 +138,16 @@
|
||||||
gEfiIfrTianoGuid ## CONSUMES ## GUID (Extended IFR Guid Opcode)
|
gEfiIfrTianoGuid ## CONSUMES ## GUID (Extended IFR Guid Opcode)
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiHiiStringProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
|
||||||
gEfiSimpleFileSystemProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiSimpleFileSystemProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiLoadFileProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiLoadFileProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiBdsArchProtocolGuid # PROTOCOL ALWAYS_PRODUCES
|
gEfiBdsArchProtocolGuid # PROTOCOL ALWAYS_PRODUCES
|
||||||
gEfiDataHubProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiDataHubProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiGenericMemTestProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiGenericMemTestProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiLegacyBiosProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiLegacyBiosProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiHiiDatabaseProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
|
||||||
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport # PROTOCOL SOMETIMES_CONSUMES
|
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport # PROTOCOL SOMETIMES_CONSUMES
|
||||||
gEfiBlockIoProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiBlockIoProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiGraphicsOutputProtocolGuid # PROTOCOL SOMETIMES_CONSUMES
|
gEfiGraphicsOutputProtocolGuid # PROTOCOL SOMETIMES_CONSUMES
|
||||||
gEfiSimpleTextInputExProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiSimpleTextInputExProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiHiiConfigRoutingProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
|
||||||
gEfiHiiConfigAccessProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiHiiConfigAccessProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiFormBrowser2ProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiFormBrowser2ProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
gEfiSerialIoProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
gEfiSerialIoProtocolGuid # PROTOCOL ALWAYS_CONSUMES
|
||||||
|
|
|
@ -21,10 +21,7 @@ EFI_GUID mFrontPageGuid = FRONT_PAGE_FORMSET_GUID;
|
||||||
BOOLEAN gConnectAllHappened = FALSE;
|
BOOLEAN gConnectAllHappened = FALSE;
|
||||||
UINTN gCallbackKey;
|
UINTN gCallbackKey;
|
||||||
|
|
||||||
EFI_HII_DATABASE_PROTOCOL *gHiiDatabase;
|
|
||||||
EFI_HII_STRING_PROTOCOL *gHiiString;
|
|
||||||
EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
|
EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
|
||||||
EFI_HII_CONFIG_ROUTING_PROTOCOL *gHiiConfigRouting;
|
|
||||||
|
|
||||||
FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate = {
|
FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate = {
|
||||||
FRONT_PAGE_CALLBACK_DATA_SIGNATURE,
|
FRONT_PAGE_CALLBACK_DATA_SIGNATURE,
|
||||||
|
@ -306,7 +303,6 @@ InitializeFrontPage (
|
||||||
CHAR8 *BestLanguage;
|
CHAR8 *BestLanguage;
|
||||||
UINTN OptionCount;
|
UINTN OptionCount;
|
||||||
CHAR16 *StringBuffer;
|
CHAR16 *StringBuffer;
|
||||||
UINTN BufferSize;
|
|
||||||
EFI_HII_HANDLE HiiHandle;
|
EFI_HII_HANDLE HiiHandle;
|
||||||
VOID *OptionsOpCodeHandle;
|
VOID *OptionsOpCodeHandle;
|
||||||
VOID *StartOpCodeHandle;
|
VOID *StartOpCodeHandle;
|
||||||
|
@ -331,26 +327,11 @@ InitializeFrontPage (
|
||||||
//
|
//
|
||||||
// Locate Hii relative protocols
|
// Locate Hii relative protocols
|
||||||
//
|
//
|
||||||
Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gHiiString);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFormBrowser2);
|
Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFormBrowser2);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **) &gHiiConfigRouting);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install Device Path Protocol and Config Access protocol to driver handle
|
// Install Device Path Protocol and Config Access protocol to driver handle
|
||||||
//
|
//
|
||||||
|
@ -454,35 +435,8 @@ InitializeFrontPage (
|
||||||
GetNextLanguage (&LangCode, Lang);
|
GetNextLanguage (&LangCode, Lang);
|
||||||
|
|
||||||
if (FirstFlag) {
|
if (FirstFlag) {
|
||||||
//
|
StringBuffer = HiiGetString (HiiHandle, PRINTABLE_LANGUAGE_NAME_STRING_ID, Lang);
|
||||||
// Get Language Name from String Package. The StringId of Printable Language
|
ASSERT_EFI_ERROR (StringBuffer != NULL);
|
||||||
// Name is always 1 which is generated by StringGather Tool.
|
|
||||||
//
|
|
||||||
BufferSize = 0x100;
|
|
||||||
StringBuffer = AllocatePool (BufferSize);
|
|
||||||
Status = gHiiString->GetString (
|
|
||||||
gHiiString,
|
|
||||||
Lang,
|
|
||||||
HiiHandle,
|
|
||||||
PRINTABLE_LANGUAGE_NAME_STRING_ID,
|
|
||||||
StringBuffer,
|
|
||||||
&BufferSize,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
|
||||||
FreePool (StringBuffer);
|
|
||||||
StringBuffer = AllocatePool (BufferSize);
|
|
||||||
Status = gHiiString->GetString (
|
|
||||||
gHiiString,
|
|
||||||
Lang,
|
|
||||||
HiiHandle,
|
|
||||||
PRINTABLE_LANGUAGE_NAME_STRING_ID,
|
|
||||||
StringBuffer,
|
|
||||||
&BufferSize,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Save the string Id for each language
|
// Save the string Id for each language
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
FrontPage routines to handle the callbacks and browser calls
|
FrontPage routines to handle the callbacks and browser calls
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. <BR>
|
Copyright (c) 2004 - 2009, Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -26,10 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
extern UINT8 FrontPageVfrBin[];
|
extern UINT8 FrontPageVfrBin[];
|
||||||
|
|
||||||
extern EFI_HII_DATABASE_PROTOCOL *gHiiDatabase;
|
|
||||||
extern EFI_HII_STRING_PROTOCOL *gHiiString;
|
|
||||||
extern EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
|
extern EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
|
||||||
extern EFI_HII_CONFIG_ROUTING_PROTOCOL *gHiiConfigRouting;
|
|
||||||
|
|
||||||
extern UINTN gCallbackKey;
|
extern UINTN gCallbackKey;
|
||||||
extern BOOLEAN gConnectAllHappened;
|
extern BOOLEAN gConnectAllHappened;
|
||||||
|
|
Loading…
Reference in New Issue