summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 03:14:12 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 03:14:12 +0000
commit6aa22a177c32344ff1d5f765183d0da416fcc252 (patch)
tree7e7ee9408e4d8347573e1bafbd795cae58dc8bd9 /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint
parent589f16d2bf12d0ec08ab877361f624838edf0ebf (diff)
downloadedk2-platforms-6aa22a177c32344ff1d5f765183d0da416fcc252.tar.xz
1. Update Generic BDS part to use dynamic PCD to set console output mode instead of use L"ConOutMode" and gEfiGenericPlatformVariableGuid to set console output mode.
2. Drop the menu item of set Primary Video to PCI or AGP. If some platform wishes to set AGP video option, platform BDS code needs to add this item. 3. Minor update to use Raw String to performance logging git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7575 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c23
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c16
2 files changed, 13 insertions, 26 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
index da0a8389fa..5ab898959e 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
@@ -918,25 +918,20 @@ GetConsoleOutMode (
UINTN Mode;
UINTN MaxMode;
EFI_STATUS Status;
- CONSOLE_OUT_MODE *ModeInfo;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
ConOut = gST->ConOut;
MaxMode = (UINTN) (ConOut->Mode->MaxMode);
- ModeInfo = EfiLibGetVariable (VAR_CON_OUT_MODE, &gEfiGenericPlatformVariableGuid);
-
- if (ModeInfo != NULL) {
- CurrentCol = ModeInfo->Column;
- CurrentRow = ModeInfo->Row;
- for (Mode = 0; Mode < MaxMode; Mode++) {
- Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
- if (!EFI_ERROR(Status)) {
- if (CurrentCol == Col && CurrentRow == Row) {
- CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;
- break;
- }
+
+ CurrentCol = PcdGet32 (PcdConOutColumn);
+ CurrentRow = PcdGet32 (PcdConOutRow);
+ for (Mode = 0; Mode < MaxMode; Mode++) {
+ Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
+ if (!EFI_ERROR(Status)) {
+ if (CurrentCol == Col && CurrentRow == Row) {
+ CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;
+ break;
}
}
- FreePool (ModeInfo);
}
}
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
index d513da2ef3..489827f9de 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
@@ -1399,18 +1399,10 @@ Var_UpdateConMode (
Mode = CallbackData->BmmFakeNvData.ConsoleOutMode;
Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row));
- if (EFI_ERROR(Status)) {
- ModeInfo.Column = 80;
- ModeInfo.Row = 25;
+ if (!EFI_ERROR(Status)) {
+ PcdSet32 (PcdConOutColumn, (UINT32) ModeInfo.Column);
+ PcdSet32 (PcdConOutRow, (UINT32) ModeInfo.Row);
}
- Status = gRT->SetVariable (
- VAR_CON_OUT_MODE,
- &gEfiGenericPlatformVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- sizeof (CONSOLE_OUT_MODE),
- &ModeInfo
- );
-
- return Status;
+ return EFI_SUCCESS;
}