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
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user