From: qwang12 Date: Sun, 21 Sep 2008 08:51:15 +0000 (+0000) Subject: HiiLibGetCurrentLanguage returns the current UEFI variable "PlatformLang" (if this... X-Git-Tag: edk2-stable201903~20285 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=c27eb3586138b96a6ff187952ab835d093c8fcb1 HiiLibGetCurrentLanguage returns the current UEFI variable "PlatformLang" (if this variable does not exist, a default value is returned). This function is called by HiiDatabase itself. Now, HiiLibGetCurrentLanguage is in HiiLib. Because of this, we can't add location of Hii protoocol in the library constructor of HiiLib. This cause Hii Database driver never get loaded (circular dependency). By moving HiiLibGetCurrentLanguage to UefiLib, library constructor (depex) can be added back to HiiLib to make sure the execution order is correct. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5939 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/BdsDxe/FrontPage.c b/MdeModulePkg/Universal/BdsDxe/FrontPage.c index 3eb4a53ff1..570dcd8754 100644 --- a/MdeModulePkg/Universal/BdsDxe/FrontPage.c +++ b/MdeModulePkg/Universal/BdsDxe/FrontPage.c @@ -332,7 +332,7 @@ InitializeFrontPage ( // // Get current language setting // - HiiLibGetCurrentLanguage (CurrentLang); + GetCurrentLanguage (CurrentLang); // // Allocate space for creation of UpdateData Buffer diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c index 23b15475da..e3444148d9 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c @@ -2086,7 +2086,7 @@ HiiStringIdToImage ( if (Language != NULL) { AsciiStrCpy (CurrentLang, (CHAR8 *) Language); } else { - HiiLibGetCurrentLanguage (CurrentLang); + GetCurrentLanguage (CurrentLang); } // diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h index 4b53e8762d..bbddd0369d 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h @@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include +#include #include #define HII_DATABASE_NOTIFY_GUID \ diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf index 29cd5b4cc7..d64a3f22cb 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf @@ -58,7 +58,7 @@ BaseMemoryLib DebugLib IfrSupportLib - HiiLib + UefiLib [Protocols] gEfiConsoleControlProtocolGuid