From d1477e4d0d1454dfb748e8768289fb173016ccbe Mon Sep 17 00:00:00 2001 From: AJFISH Date: Wed, 11 Jul 2007 03:08:05 +0000 Subject: [PATCH] Cleanups in PlatformBds.c. BDS will get rewritten, but his makes it easier to look at the current BDS git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3187 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/PlatformBdsDxe/Generic/BdsString.h | 2 +- .../Generic/BootMaint/BootMaint.c | 5 +- .../Generic/BootMngr/BootManager.c | 20 +- .../Generic/DeviceMngr/DeviceManager.c | 45 ++- Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c | 39 ++- Nt32Pkg/PlatformBdsDxe/Generic/Language.c | 303 +----------------- Nt32Pkg/PlatformBdsDxe/Generic/String.c | 15 +- Nt32Pkg/PlatformBdsDxe/PlatformBds.inf | 3 +- 8 files changed, 63 insertions(+), 369 deletions(-) diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/BdsString.h b/Nt32Pkg/PlatformBdsDxe/Generic/BdsString.h index b475c37a30..1e8066537c 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/BdsString.h +++ b/Nt32Pkg/PlatformBdsDxe/Generic/BdsString.h @@ -33,7 +33,7 @@ Revision History } EFI_HII_HANDLE gStringPackHandle; -EFI_HII_PROTOCOL *Hii; +EFI_HII_PROTOCOL *gHii; CHAR16 * GetStringById ( diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/BootMaint/BootMaint.c b/Nt32Pkg/PlatformBdsDxe/Generic/BootMaint/BootMaint.c index f75cc44ca6..9054f134d6 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/BootMaint/BootMaint.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/BootMaint/BootMaint.c @@ -33,7 +33,6 @@ Abstract: // extern UINT8 bmBin[]; extern UINT8 FEBin[]; -extern EFI_GUID gBdsStringPackGuid; extern BOOLEAN gConnectAllHappened; EFI_GUID EfiLegacyDevOrderGuid = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID; @@ -851,13 +850,13 @@ Returns: // // Post our VFR to the HII database. // - PackageList = PreparePackages (1, &gBdsStringPackGuid, bmBin); + PackageList = PreparePackages (1, &gEfiCallerIdGuid, bmBin); Status = Hii->NewPack (Hii, PackageList, &HiiHandle); FreePool (PackageList); BmmCallbackInfo->BmmHiiHandle = HiiHandle; - PackageList = PreparePackages (1, &gBdsStringPackGuid, FEBin); + PackageList = PreparePackages (1, &gEfiCallerIdGuid, FEBin); Status = Hii->NewPack (Hii, PackageList, &HiiHandle); FreePool (PackageList); diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/BootMngr/BootManager.c b/Nt32Pkg/PlatformBdsDxe/Generic/BootMngr/BootManager.c index a3d8069136..cfe4ee4d7a 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/BootMngr/BootManager.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/BootMngr/BootManager.c @@ -173,7 +173,7 @@ Returns: // Post our VFR to the HII database // PackageList = PreparePackages (2, &BmGuid, BootManagerVfrBin, PlatformBdsStrings); - Status = Hii->NewPack (Hii, PackageList, &gBootManagerHandle); + Status = gHii->NewPack (gHii, PackageList, &gBootManagerHandle); FreePool (PackageList); // @@ -197,7 +197,7 @@ Returns: ASSERT_EFI_ERROR (Status); LastToken = 0; - Hii->NewString (Hii, NULL, gBootManagerHandle, &LastToken, L" "); + gHii->NewString (gHii, NULL, gBootManagerHandle, &LastToken, L" "); // // Allocate space for creation of UpdateData Buffer @@ -227,7 +227,7 @@ Returns: &UpdateData->Data // Buffer containing created op-code ); - Hii->UpdateForm (Hii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData); + gHii->UpdateForm (gHii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData); // // Create "Boot Option Menu" title @@ -237,7 +237,7 @@ Returns: &UpdateData->Data // Buffer containing created op-code ); - Hii->UpdateForm (Hii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData); + gHii->UpdateForm (gHii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData); Token = LastToken; mKeyInput = 0; @@ -254,7 +254,7 @@ Returns: mKeyInput++; Token++; - Status = Hii->NewString (Hii, NULL, gBootManagerHandle, &Token, Option->Description); + Status = gHii->NewString (gHii, NULL, gBootManagerHandle, &Token, Option->Description); // // If we got an error it is almost certainly due to the token value being invalid. @@ -262,7 +262,7 @@ Returns: // if (EFI_ERROR (Status)) { Token = 0; - Status = Hii->NewString (Hii, NULL, gBootManagerHandle, &Token, Option->Description); + Status = gHii->NewString (gHii, NULL, gBootManagerHandle, &Token, Option->Description); } Status = CreateGotoOpCode ( @@ -279,7 +279,7 @@ Returns: } - Hii->UpdateForm (Hii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0001, TRUE, UpdateData); + gHii->UpdateForm (gHii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0001, TRUE, UpdateData); UpdateData->DataCount = 1; @@ -291,14 +291,14 @@ Returns: &UpdateData->Data // Buffer containing created op-code ); - Hii->UpdateForm (Hii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData); + gHii->UpdateForm (gHii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData); Status = CreateSubTitleOpCode ( LastToken, // Token Value for the string &UpdateData->Data // Buffer containing created op-code ); - Hii->UpdateForm (Hii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData); + gHii->UpdateForm (gHii, gBootManagerHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData); FreePool (UpdateData); @@ -321,7 +321,7 @@ Returns: EnableResetRequired (); } - Hii->ResetStrings (Hii, gBootManagerHandle); + gHii->ResetStrings (gHii, gBootManagerHandle); if (gOption == NULL) { return ; diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/DeviceMngr/DeviceManager.c b/Nt32Pkg/PlatformBdsDxe/Generic/DeviceMngr/DeviceManager.c index ef72e79309..9cfb82db11 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/DeviceMngr/DeviceManager.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/DeviceMngr/DeviceManager.c @@ -28,7 +28,6 @@ STATIC UINT16 mTokenCount; EFI_FRONTPAGE_CALLBACK_INFO FPCallbackInfo; extern UINTN gCallbackKey; extern EFI_FORM_BROWSER_PROTOCOL *gBrowser; -extern EFI_GUID gBdsStringPackGuid; extern BOOLEAN gConnectAllHappened; STRING_REF gStringTokenTable[] = { @@ -122,8 +121,8 @@ Returns: UpdateData = AllocateZeroPool (0x1000); ASSERT (UpdateData != NULL); - PackageList = PreparePackages (1, &gBdsStringPackGuid, DeviceManagerVfrBin); - Status = Hii->NewPack (Hii, PackageList, &FPCallbackInfo.DevMgrHiiHandle); + PackageList = PreparePackages (1, &gEfiCallerIdGuid, DeviceManagerVfrBin); + Status = gHii->NewPack (gHii, PackageList, &FPCallbackInfo.DevMgrHiiHandle); FreePool (PackageList); // @@ -159,7 +158,7 @@ Returns: // // Simply registering the callback handle // - Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData); + gHii->UpdateForm (gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) 0x0000, TRUE, UpdateData); FreePool (UpdateData); return Status; @@ -226,7 +225,7 @@ Returns: FormSetData = NULL; gCallbackKey = 0; if (mTokenCount == 0) { - Hii->NewString (Hii, NULL, FPCallbackInfo.DevMgrHiiHandle, &mTokenCount, L" "); + gHii->NewString (gHii, NULL, FPCallbackInfo.DevMgrHiiHandle, &mTokenCount, L" "); } Token = mTokenCount; @@ -244,7 +243,7 @@ Returns: // // Erase entries on this label // - Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, FALSE, UpdateData); + gHii->UpdateForm (gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, FALSE, UpdateData); // // Did we reach the end of the Token Table? @@ -262,21 +261,21 @@ Returns: // // Add default title for this label // - Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, TRUE, UpdateData); + gHii->UpdateForm (gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, TRUE, UpdateData); } // // Add a space and an exit string. Remember since we add things at the label and push other things beyond the // label down, we add this in reverse order // CreateSubTitleOpCode (STRING_TOKEN (STR_EXIT_STRING), &UpdateData->Data); - Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, TRUE, UpdateData); + gHii->UpdateForm (gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, TRUE, UpdateData); CreateSubTitleOpCode (STR_EMPTY_STRING, &UpdateData->Data); - Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, TRUE, UpdateData); + gHii->UpdateForm (gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) Count, TRUE, UpdateData); // - // Get all the Hii handles + // Get all the gHii handles // - Status = BdsLibGetHiiHandles (Hii, &HandleBufferLength, &HiiHandles); + Status = BdsLibGetHiiHandles (gHii, &HandleBufferLength, &HiiHandles); ASSERT_EFI_ERROR (Status); for (Index = 1, BufferSize = 0; Index < HandleBufferLength; Index++) { @@ -284,7 +283,7 @@ Returns: // Am not initializing Buffer since the first thing checked is the size // this way I can get the real buffersize in the smallest code size // - Status = Hii->GetForms (Hii, Index, 0, &BufferSize, Buffer); + Status = gHii->GetForms (gHii, Index, 0, &BufferSize, Buffer); if (Status != EFI_NOT_FOUND) { // @@ -297,7 +296,7 @@ Returns: // Am not initializing Buffer since the first thing checked is the size // this way I can get the real buffersize in the smallest code size // - Status = Hii->GetForms (Hii, Index, 0, &BufferSize, Buffer); + Status = gHii->GetForms (gHii, Index, 0, &BufferSize, Buffer); // // Skip EFI_HII_PACK_HEADER, advance to EFI_IFR_FORM_SET data. @@ -313,8 +312,8 @@ Returns: String = AllocateZeroPool (StringLength); ASSERT (String != NULL); - Status = Hii->GetString (Hii, Index, FormSetData->FormSetTitle, TRUE, NULL, &StringLength, String); - Status = Hii->NewString (Hii, NULL, FPCallbackInfo.DevMgrHiiHandle, &Token, String); + Status = gHii->GetString (gHii, Index, FormSetData->FormSetTitle, TRUE, NULL, &StringLength, String); + Status = gHii->NewString (gHii, NULL, FPCallbackInfo.DevMgrHiiHandle, &Token, String); // // If token value exceeded real token value - we need to add a new token values @@ -322,21 +321,21 @@ Returns: if (Status == EFI_INVALID_PARAMETER) { Token = 0; TokenHelp = 0; - Status = Hii->NewString (Hii, NULL, FPCallbackInfo.DevMgrHiiHandle, &Token, String); + Status = gHii->NewString (gHii, NULL, FPCallbackInfo.DevMgrHiiHandle, &Token, String); } StringLength = 0x1000; if (FormSetData->Help == 0) { TokenHelp = 0; } else { - Status = Hii->GetString (Hii, Index, FormSetData->Help, TRUE, NULL, &StringLength, String); + Status = gHii->GetString (gHii, Index, FormSetData->Help, TRUE, NULL, &StringLength, String); if (StringLength == 0x02) { TokenHelp = 0; } else { - Status = Hii->NewString (Hii, NULL, FPCallbackInfo.DevMgrHiiHandle, &TokenHelp, String); + Status = gHii->NewString (gHii, NULL, FPCallbackInfo.DevMgrHiiHandle, &TokenHelp, String); if (Status == EFI_INVALID_PARAMETER) { TokenHelp = 0; - Status = Hii->NewString (Hii, NULL, FPCallbackInfo.DevMgrHiiHandle, &TokenHelp, String); + Status = gHii->NewString (gHii, NULL, FPCallbackInfo.DevMgrHiiHandle, &TokenHelp, String); } } } @@ -380,8 +379,8 @@ Returns: // This is an active bit, so update the form // if (FormSetData->Class & Count) { - Hii->UpdateForm ( - Hii, + gHii->UpdateForm ( + gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) (FormSetData->Class & Count), TRUE, @@ -440,7 +439,7 @@ Returns: ); UpdateData->DataCount = 4; - Hii->UpdateForm (Hii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) EFI_VBIOS_CLASS, TRUE, UpdateData); + gHii->UpdateForm (gHii, FPCallbackInfo.DevMgrHiiHandle, (EFI_FORM_LABEL) EFI_VBIOS_CLASS, TRUE, UpdateData); FreePool (IfrOptionList); } @@ -461,7 +460,7 @@ Returns: EnableResetRequired (); } - Hii->ResetStrings (Hii, FPCallbackInfo.DevMgrHiiHandle); + gHii->ResetStrings (gHii, FPCallbackInfo.DevMgrHiiHandle); // // We will have returned from processing a callback - user either hit ESC to exit, or selected diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c b/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c index 804b379051..9b8a805e46 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c @@ -42,7 +42,6 @@ UINTN gCallbackKey; BOOLEAN gConnectAllHappened = FALSE; extern EFI_HII_HANDLE gFrontPageHandle; -extern EFI_GUID gBdsStringPackGuid; EFI_STATUS EFIAPI @@ -106,7 +105,7 @@ Returns: // // Collect the languages from what our current Language support is based on our VFR // - Hii->GetPrimaryLanguages (Hii, gFrontPageHandle, &LanguageString); + gHii->GetPrimaryLanguages (gHii, gFrontPageHandle, &LanguageString); // // Based on the DataArray->Data->Data value, we can determine @@ -255,9 +254,9 @@ Returns: gCallbackKey = 0; - PackageList = PreparePackages (1, &gBdsStringPackGuid, FrontPageVfrBin); + PackageList = PreparePackages (1, &gEfiCallerIdGuid, FrontPageVfrBin); - Status = Hii->NewPack (Hii, PackageList, &gFrontPageHandle); + Status = gHii->NewPack (gHii, PackageList, &gFrontPageHandle); FreePool (PackageList); @@ -335,7 +334,7 @@ ReInitStrings: // // Collect the languages from what our current Language support is based on our VFR // - Hii->GetPrimaryLanguages (Hii, gFrontPageHandle, &LanguageString); + gHii->GetPrimaryLanguages (gHii, gFrontPageHandle, &LanguageString); OptionCount = 0; @@ -359,8 +358,8 @@ ReInitStrings: mLastSelection = (UINT16) OptionCount; } - Status = Hii->GetString (Hii, gStringPackHandle, 1, TRUE, Lang, &BufferSize, StringBuffer); - Hii->NewString (Hii, NULL, gStringPackHandle, &Token, StringBuffer); + Status = gHii->GetString (gHii, gStringPackHandle, 1, TRUE, Lang, &BufferSize, StringBuffer); + gHii->NewString (gHii, NULL, gStringPackHandle, &Token, StringBuffer); CopyMem (&OptionList[OptionCount].StringToken, &Token, sizeof (UINT16)); CopyMem (&OptionList[OptionCount].Value, &OptionCount, sizeof (UINT16)); Key = 0x1234; @@ -392,7 +391,7 @@ ReInitStrings: // UpdateData->DataCount = (UINT8) (OptionCount + 2); - Hii->UpdateForm (Hii, gFrontPageHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData); + gHii->UpdateForm (gHii, gFrontPageHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData); FreePool (UpdateData); // @@ -452,7 +451,7 @@ Returns: EnableResetRequired (); } - Hii->ResetStrings (Hii, gFrontPageHandle); + gHii->ResetStrings (gHii, gFrontPageHandle); return Status; } @@ -499,11 +498,11 @@ Returns: // // Get all the Hii handles // - Status = BdsLibGetHiiHandles (Hii, &HandleBufferLength, &HiiHandleBuffer); + Status = BdsLibGetHiiHandles (gHii, &HandleBufferLength, &HiiHandleBuffer); ASSERT_EFI_ERROR (Status); // - // Get the Hii Handle that matches the StructureNode->ProducerName + // Get the gHii Handle that matches the StructureNode->ProducerName // NumberOfHiiHandles = HandleBufferLength / sizeof (EFI_HII_HANDLE); for (Index = 0; Index < NumberOfHiiHandles; Index++) { @@ -523,8 +522,8 @@ Returns: // StringBufferLength = 0x100; *String = AllocateZeroPool (0x100); - Status = Hii->GetString ( - Hii, + Status = gHii->GetString ( + gHii, HiiHandleBuffer[Index], Token, FALSE, @@ -693,7 +692,7 @@ Returns: BiosVendor = (EFI_MISC_BIOS_VENDOR_DATA *) (DataHeader + 1); GetStringFromToken (&Record->ProducerName, BiosVendor->BiosVersion, &NewString); TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_BIOS_VERSION; - Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); + gHii->NewString (gHii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); FreePool (NewString); Find[0] = TRUE; } @@ -704,7 +703,7 @@ Returns: SystemManufacturer = (EFI_MISC_SYSTEM_MANUFACTURER_DATA *) (DataHeader + 1); GetStringFromToken (&Record->ProducerName, SystemManufacturer->SystemProductName, &NewString); TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_COMPUTER_MODEL; - Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); + gHii->NewString (gHii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); FreePool (NewString); Find[1] = TRUE; } @@ -715,7 +714,7 @@ Returns: ProcessorVersion = (EFI_PROCESSOR_VERSION_DATA *) (DataHeader + 1); GetStringFromToken (&Record->ProducerName, *ProcessorVersion, &NewString); TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_CPU_MODEL; - Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); + gHii->NewString (gHii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); FreePool (NewString); Find[2] = TRUE; } @@ -726,7 +725,7 @@ Returns: ProcessorFrequency = (EFI_PROCESSOR_CORE_FREQUENCY_DATA *) (DataHeader + 1); ConvertProcessorToString (ProcessorFrequency, &NewString); TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_CPU_SPEED; - Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); + gHii->NewString (gHii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); FreePool (NewString); Find[3] = TRUE; } @@ -739,7 +738,7 @@ Returns: MemoryArray->MemoryArrayStartAddress + 1), 20)), &NewString); TokenToUpdate = (STRING_REF) STR_FRONT_PAGE_MEMORY_SIZE; - Hii->NewString (Hii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); + gHii->NewString (gHii, Lang, gFrontPageHandle, &TokenToUpdate, NewString); FreePool (NewString); Find[4] = TRUE; } @@ -797,7 +796,7 @@ Returns: // // Remove Banner Op-code if any at this label // - Hii->UpdateForm (Hii, gFrontPageHandle, (EFI_FORM_LABEL) 0xFFFF, FALSE, UpdateData); + gHii->UpdateForm (gHii, gFrontPageHandle, (EFI_FORM_LABEL) 0xFFFF, FALSE, UpdateData); // // Create Banner Op-code which reflects correct timeout value @@ -812,7 +811,7 @@ Returns: // // Add Banner Op-code at this label // - Hii->UpdateForm (Hii, gFrontPageHandle, (EFI_FORM_LABEL) 0xFFFF, TRUE, UpdateData); + gHii->UpdateForm (gHii, gFrontPageHandle, (EFI_FORM_LABEL) 0xFFFF, TRUE, UpdateData); do { diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/Language.c b/Nt32Pkg/PlatformBdsDxe/Generic/Language.c index 01277d7cf4..60b92f0c7e 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/Language.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/Language.c @@ -29,310 +29,11 @@ Revision History #include "BdsString.h" #include "Language.h" -#define NARROW_GLYPH_NUMBER 8 -#define WIDE_GLYPH_NUMBER 75 - // // Default language code, currently is English // CHAR8 *mDefaultLangCode = "eng"; -typedef struct { - EFI_HII_FONT_PACK FixedLength; - EFI_NARROW_GLYPH NarrowArray[NARROW_GLYPH_NUMBER]; - EFI_WIDE_GLYPH WideArray[WIDE_GLYPH_NUMBER]; -} FONT_PACK; - -FONT_PACK mFontPack = { - sizeof (EFI_HII_FONT_PACK) + (NARROW_GLYPH_NUMBER * sizeof (EFI_NARROW_GLYPH)) + (WIDE_GLYPH_NUMBER * sizeof (EFI_WIDE_GLYPH)), - EFI_HII_FONT, - NARROW_GLYPH_NUMBER, - WIDE_GLYPH_NUMBER, - { // Narrow Glyphs - { - 0x05d0, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x4E, - 0x6E, - 0x62, - 0x32, - 0x32, - 0x3C, - 0x68, - 0x4C, - 0x4C, - 0x46, - 0x76, - 0x72, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x05d1, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x78, - 0x7C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x7E, - 0x7E, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x05d2, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x78, - 0x7C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x1C, - 0x3E, - 0x66, - 0x66, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x05d3, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x7E, - 0x7E, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x05d4, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x7C, - 0x7E, - 0x06, - 0x06, - 0x06, - 0x06, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x05d5, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x3C, - 0x3C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x0C, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x05d6, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x38, - 0x38, - 0x1E, - 0x1E, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x00, - 0x00, - 0x00, - 0x00 - } - }, - { - 0x0000, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00 - } - } - }, - { // Wide Glyphs - { - 0x0020, - 0x00, - { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00 - }, - { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00 - }, - { - 0x00, - 0x00, - 0x00 - } - }, // - } -}; - -VOID -ExportFonts ( - VOID - ) -/*++ - -Routine Description: - Routine to export glyphs to the HII database. This is in addition to whatever is defined in the Graphics Console driver. - -Arguments: - None - -Returns: - ---*/ -{ - EFI_HII_HANDLE HiiHandle; - EFI_HII_PACKAGES *PackageList; - - PackageList = PreparePackages (1, NULL, &mFontPack); - // - // Register our Fonts into the global database - // - HiiHandle = 0; - Hii->NewPack (Hii, PackageList, &HiiHandle); - - FreePool (PackageList); -} VOID InitializeLanguage ( @@ -361,12 +62,10 @@ Returns: LanguageString = NULL; LangCodes = NULL; - ExportFonts (); - // // Collect the languages from what our current Language support is based on our VFR // - Hii->GetPrimaryLanguages (Hii, gStringPackHandle, &LanguageString); + gHii->GetPrimaryLanguages (gHii, gStringPackHandle, &LanguageString); LangCodes = AllocatePool (StrLen (LanguageString)); ASSERT (LangCodes); diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/String.c b/Nt32Pkg/PlatformBdsDxe/Generic/String.c index dc4ed3b6ea..cbb35d027b 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/String.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/String.c @@ -30,9 +30,6 @@ Revision History #include "BdsString.h" #include "Language.h" -EFI_GUID gBdsStringPackGuid = { 0x7bac95d3, 0xddf, 0x42f3, 0x9e, 0x24, 0x7c, 0x64, 0x49, 0x40, 0x37, 0x9a }; -extern UINT8 PlatformBdsStrings[]; - EFI_STATUS InitializeStringSupport ( VOID @@ -40,7 +37,7 @@ InitializeStringSupport ( /*++ Routine Description: - + reset Initialize HII global accessor for string support Arguments: @@ -59,11 +56,11 @@ Returns: Status = gBS->LocateProtocol ( &gEfiHiiProtocolGuid, NULL, - &Hii + &gHii ); if (!EFI_ERROR (Status)) { - PackageList = PreparePackages (1, &gBdsStringPackGuid, PlatformBdsStrings); - Status = Hii->NewPack (Hii, PackageList, &gStringPackHandle); + PackageList = PreparePackages (1, &gEfiCallerIdGuid, PlatformBdsStrings); + Status = gHii->NewPack (gHii, PackageList, &gStringPackHandle); FreePool (PackageList); } @@ -110,7 +107,7 @@ Returns: // // Get the current string for the current Language // - Status = Hii->GetString (Hii, gStringPackHandle, Id, FALSE, NULL, &StringLength, String); + Status = gHii->GetString (gHii, gStringPackHandle, Id, FALSE, NULL, &StringLength, String); if (EFI_ERROR (Status)) { if (Status == EFI_BUFFER_TOO_SMALL) { // @@ -124,7 +121,7 @@ Returns: String = AllocatePool (StringLength); ASSERT (String != NULL); - Status = Hii->GetString (Hii, gStringPackHandle, Id, FALSE, NULL, &StringLength, String); + Status = gHii->GetString (gHii, gStringPackHandle, Id, FALSE, NULL, &StringLength, String); if (!EFI_ERROR (Status)) { return String; } diff --git a/Nt32Pkg/PlatformBdsDxe/PlatformBds.inf b/Nt32Pkg/PlatformBdsDxe/PlatformBds.inf index 9ea3d4dde7..7e2442365b 100644 --- a/Nt32Pkg/PlatformBdsDxe/PlatformBds.inf +++ b/Nt32Pkg/PlatformBdsDxe/PlatformBds.inf @@ -173,4 +173,5 @@ gEfiBdsArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED [depex] - gEfiHiiProtocolGuid \ No newline at end of file + gEfiHiiProtocolGuid + \ No newline at end of file -- 2.39.2