diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 03:11:13 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 03:11:13 +0000 |
commit | 589f16d2bf12d0ec08ab877361f624838edf0ebf (patch) | |
tree | d94a8128eeecc9c735076960e83ffa292d6a9f93 /MdeModulePkg/Universal/Console/ConSplitterDxe | |
parent | 2db4a77e609a2dbe9ea53bcdd9dcb884f10bc6b8 (diff) | |
download | edk2-platforms-589f16d2bf12d0ec08ab877361f624838edf0ebf.tar.xz |
Update consplitter driver to use dynamic PCD to set console output mode instead of use L"ConOutMode" and gEfiGenericPlatformVariableGuid to set console output mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7574 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConSplitterDxe')
3 files changed, 10 insertions, 44 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 153974a051..e189b7d5c9 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -2918,7 +2918,6 @@ ConsplitterSetConsoleOutMode ( UINTN MaxMode;
EFI_STATUS Status;
CONSOLE_OUT_MODE ModeInfo;
- UINTN ModeInfoSize;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
PreferMode = 0xFF;
@@ -2926,31 +2925,8 @@ ConsplitterSetConsoleOutMode ( TextOut = &Private->TextOut;
MaxMode = (UINTN) (TextOut->Mode->MaxMode);
- ModeInfoSize = sizeof (CONSOLE_OUT_MODE);
- Status = gRT->GetVariable (
- VARCONOUTMODE,
- &gEfiGenericPlatformVariableGuid,
- NULL,
- &ModeInfoSize,
- &ModeInfo
- );
-
- if (EFI_ERROR(Status)) {
- //
- // If fail to get variable, set variable to the default mode 80 x 25
- // required by UEFI spec;
- //
- ModeInfo.Column = 80;
- ModeInfo.Row = 25;
-
- gRT->SetVariable (
- VARCONOUTMODE,
- &gEfiGenericPlatformVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- sizeof (CONSOLE_OUT_MODE),
- &ModeInfo
- );
- }
+ ModeInfo.Column = PcdGet32 (PcdConOutColumn);
+ ModeInfo.Row = PcdGet32 (PcdConOutRow);
//
// To find the prefer mode and basic mode from Text Out mode list
@@ -2968,7 +2944,7 @@ ConsplitterSetConsoleOutMode ( }
//
- // Set perfer mode to Text Out devices.
+ // Set prefer mode to Text Out devices.
//
Status = TextOut->SetMode (TextOut, PreferMode);
if (EFI_ERROR(Status)) {
@@ -2977,20 +2953,9 @@ ConsplitterSetConsoleOutMode ( //
Status = TextOut->SetMode (TextOut, BaseMode);
ASSERT(!EFI_ERROR(Status));
-
- ModeInfo.Column = 80;
- ModeInfo.Row = 25;
-
- //
- // Update ConOutMode variable
- //
- gRT->SetVariable (
- VARCONOUTMODE,
- &gEfiGenericPlatformVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- sizeof (CONSOLE_OUT_MODE),
- &ModeInfo
- );
+
+ PcdSet32 (PcdConOutColumn, 80);
+ PcdSet32 (PcdConOutRow, 25);
}
return ;
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index 4e37213b34..b4b8f1d322 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -33,7 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Guid/PrimaryStandardErrorDevice.h>
#include <Guid/PrimaryConsoleOutDevice.h>
#include <Guid/PrimaryConsoleInDevice.h>
-#include <Guid/GenericPlatformVariable.h>
#include <Guid/ConsoleInDevice.h>
#include <Guid/StandardErrorDevice.h>
#include <Guid/ConsoleOutDevice.h>
@@ -84,7 +83,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2; #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
#define MAX_STD_IN_PASSWORD 80
-#define VARCONOUTMODE L"ConOutMode"
typedef struct {
UINTN Column;
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf index b4248fe27f..f33b26af41 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf @@ -77,7 +77,6 @@ gEfiPrimaryConsoleOutDeviceGuid ## PRODUCES
gEfiPrimaryConsoleInDeviceGuid ## PRODUCES
gEfiPrimaryStandardErrorDeviceGuid ## PRODUCES
- gEfiGenericPlatformVariableGuid ## SOMETIMES_CONSUMES ## Variable:L"ConOutMode"
[Protocols]
gEfiConsoleControlProtocolGuid ## PRODUCES
@@ -96,6 +95,10 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
+[Pcd.common]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
+
# [Event]
# ##
# # mConIn.LockEvent, used to record and check key sequence on StdIn. Periodic is 25ms.
|