diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 03:20:54 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 03:20:54 +0000 |
commit | c71b65973b59d4eb4bf9b79c5fa59bb511c464ce (patch) | |
tree | 87ceda282b798a9f25d41a349e9549d3676ab8b8 /UnixPkg/Library/UnixBdsLib/BdsPlatform.c | |
parent | fcf24bad4a7b0e7acb540caaa618f53547033d85 (diff) | |
download | edk2-platforms-c71b65973b59d4eb4bf9b79c5fa59bb511c464ce.tar.xz |
Update Unix platform to use dynamic HII pcd to save console output mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7580 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/Library/UnixBdsLib/BdsPlatform.c')
-rw-r--r-- | UnixPkg/Library/UnixBdsLib/BdsPlatform.c | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/UnixPkg/Library/UnixBdsLib/BdsPlatform.c b/UnixPkg/Library/UnixBdsLib/BdsPlatform.c index 42882ca1f3..f4d32f1a57 100644 --- a/UnixPkg/Library/UnixBdsLib/BdsPlatform.c +++ b/UnixPkg/Library/UnixBdsLib/BdsPlatform.c @@ -23,6 +23,44 @@ Abstract: #include "BdsPlatform.h"
CHAR16 mFirmwareVendor[] = L"TianoCore.org";
+UNIX_SYSTEM_CONFIGURATION mSystemConfigData;
+
+VOID
+SetupVariableInit (
+ VOID
+ )
+{
+ EFI_STATUS Status;
+ UINTN Size;
+
+ Size = sizeof (mSystemConfigData);
+ Status = gRT->GetVariable (
+ L"Setup",
+ &gEfiUnixSystemConfigGuid,
+ NULL,
+ &Size,
+ (VOID *) &mSystemConfigData
+ );
+
+ if (EFI_ERROR (Status)) {
+ //
+ // SetupVariable is corrupt
+ //
+ mSystemConfigData.ConOutRow = PcdGet32 (PcdConOutColumn);
+ mSystemConfigData.ConOutColumn = PcdGet32 (PcdConOutRow);
+
+ Status = gRT->SetVariable (
+ L"Setup",
+ &gEfiUnixSystemConfigGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ sizeof (mSystemConfigData),
+ (VOID *) &mSystemConfigData
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_ERROR, "Failed to save Setup Variable to non-volatile storage, Status = %r\n", Status));
+ }
+ }
+}
//
// BDS Platform Functions
@@ -35,7 +73,7 @@ PlatformBdsInit ( Routine Description:
- Platform Bds init. Incude the platform firmware vendor, revision
+ Platform Bds init. Include the platform firmware vendor, revision
and so crc check.
Arguments:
|