summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-26 12:01:22 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-26 12:01:22 +0000
commitfb42e02bb4715793e73ad543700f2c252a4dd962 (patch)
tree34b26af4e4feb2dbc3f1dfe5a53b00d695c7da95
parent9b8a6c2edca552546a3d72b6176344d32ada287a (diff)
downloadedk2-platforms-fb42e02bb4715793e73ad543700f2c252a4dd962.tar.xz
Skip locating Terminal driver Protocol Guid to determine the terminal options. It is better that BDS does not hardcode a special driver GUID.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4761 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c87
1 files changed, 37 insertions, 50 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index 06a879a3ef..01b547ec45 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -21,10 +21,6 @@ Abstract:
#include "BootMaint.h"
-EFI_GUID gTerminalDriverGuid = {
- 0x10634d8e, 0x1c05, 0x46cb, {0xbb, 0xc, 0x5a, 0xfd, 0xc8, 0x29, 0xa8, 0xc8}
-};
-
VOID
RefreshUpdateData (
VOID
@@ -179,27 +175,23 @@ UpdateConCOMPage (
{
BM_MENU_ENTRY *NewMenuEntry;
UINT16 Index;
- EFI_STATUS Status;
- VOID *Interface;
CallbackData->BmmAskSaveOrNot = FALSE;
UpdatePageStart (CallbackData);
- Status = EfiLibLocateProtocol (&gTerminalDriverGuid, (VOID **) &Interface);
- if (!EFI_ERROR (Status)) {
- for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
- NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
- CreateGotoOpCode (
- FORM_CON_COM_SETUP_ID,
- NewMenuEntry->DisplayStringToken,
- STRING_TOKEN (STR_NULL_STRING),
- EFI_IFR_FLAG_CALLBACK,
- (UINT16) (TERMINAL_OPTION_OFFSET + Index),
- &gUpdateData
- );
- }
+ for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
+ NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
+
+ CreateGotoOpCode (
+ FORM_CON_COM_SETUP_ID,
+ NewMenuEntry->DisplayStringToken,
+ STRING_TOKEN (STR_NULL_STRING),
+ EFI_IFR_FLAG_CALLBACK,
+ (UINT16) (TERMINAL_OPTION_OFFSET + Index),
+ &gUpdateData
+ );
}
UpdatePageEnd (CallbackData);
@@ -384,9 +376,7 @@ UpdateConsolePage (
UINT16 Index;
UINT16 Index2;
UINT8 CheckFlags;
- EFI_STATUS Status;
- VOID *Interface;
-
+
CallbackData->BmmAskSaveOrNot = TRUE;
UpdatePageStart (CallbackData);
@@ -414,36 +404,33 @@ UpdateConsolePage (
);
}
- Status = EfiLibLocateProtocol (&gTerminalDriverGuid, (VOID **) &Interface);
- if (!EFI_ERROR (Status)) {
- for (Index2 = 0; Index2 < TerminalMenu.MenuNumber; Index2++) {
- CheckFlags = 0;
- NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index2);
- NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
-
- if ((NewTerminalContext->IsConIn && (UpdatePageId == FORM_CON_IN_ID)) ||
- (NewTerminalContext->IsConOut && (UpdatePageId == FORM_CON_OUT_ID)) ||
- (NewTerminalContext->IsStdErr && (UpdatePageId == FORM_CON_ERR_ID))
- ) {
- CheckFlags |= EFI_IFR_CHECKBOX_DEFAULT;
- CallbackData->BmmFakeNvData.ConsoleCheck[Index] = TRUE;
- } else {
- CallbackData->BmmFakeNvData.ConsoleCheck[Index] = FALSE;
- }
-
- CreateCheckBoxOpCode (
- (EFI_QUESTION_ID) (CON_DEVICE_QUESTION_ID + Index),
- VARSTORE_ID_BOOT_MAINT,
- (UINT16) (CON_DEVICE_VAR_OFFSET + Index),
- NewMenuEntry->DisplayStringToken,
- NewMenuEntry->HelpStringToken,
- 0,
- CheckFlags,
- &gUpdateData
- );
+ for (Index2 = 0; Index2 < TerminalMenu.MenuNumber; Index2++) {
+ CheckFlags = 0;
+ NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index2);
+ NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- Index++;
+ if ((NewTerminalContext->IsConIn && (UpdatePageId == FORM_CON_IN_ID)) ||
+ (NewTerminalContext->IsConOut && (UpdatePageId == FORM_CON_OUT_ID)) ||
+ (NewTerminalContext->IsStdErr && (UpdatePageId == FORM_CON_ERR_ID))
+ ) {
+ CheckFlags |= EFI_IFR_CHECKBOX_DEFAULT;
+ CallbackData->BmmFakeNvData.ConsoleCheck[Index] = TRUE;
+ } else {
+ CallbackData->BmmFakeNvData.ConsoleCheck[Index] = FALSE;
}
+
+ CreateCheckBoxOpCode (
+ (EFI_QUESTION_ID) (CON_DEVICE_QUESTION_ID + Index),
+ VARSTORE_ID_BOOT_MAINT,
+ (UINT16) (CON_DEVICE_VAR_OFFSET + Index),
+ NewMenuEntry->DisplayStringToken,
+ NewMenuEntry->HelpStringToken,
+ 0,
+ CheckFlags,
+ &gUpdateData
+ );
+
+ Index++;
}
UpdatePageEnd (CallbackData);