diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-17 05:31:38 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-17 05:31:38 +0000 |
commit | 75bf9d0ecca38dfec9b645a6eb1119c025892304 (patch) | |
tree | 924fa418342708f8bc5cf14be1a1e622c5b9dd79 /IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr | |
parent | d91c7bf9e42e8be23bb67bf7c189348b4ec11797 (diff) | |
download | edk2-platforms-75bf9d0ecca38dfec9b645a6eb1119c025892304.tar.xz |
Update BdsDxe to use new designed HiiLib, remove the referrence to the original IfrSupportLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8115 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr')
3 files changed, 40 insertions, 19 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index 4918b25b13..7a727b8675 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -186,7 +186,6 @@ CallBootManager ( EFI_STATUS Status;
BDS_COMMON_OPTION *Option;
LIST_ENTRY *Link;
- EFI_HII_UPDATE_DATA UpdateData;
CHAR16 *ExitData;
UINTN ExitDataSize;
EFI_STRING_ID Token;
@@ -198,6 +197,10 @@ CallBootManager ( EFI_HII_HANDLE HiiHandle;
EFI_BROWSER_ACTION_REQUEST ActionRequest;
UINTN TempSize;
+ VOID *StartOpCodeHandle;
+ VOID *EndOpCodeHandle;
+ EFI_IFR_GUID_LABEL *StartLabel;
+ EFI_IFR_GUID_LABEL *EndLabel;
gOption = NULL;
InitializeListHead (&BdsBootOptionList);
@@ -223,10 +226,25 @@ CallBootManager ( //
// Allocate space for creation of UpdateData Buffer
//
- UpdateData.BufferSize = 0x1000;
- UpdateData.Offset = 0;
- UpdateData.Data = AllocateZeroPool (0x1000);
- ASSERT (UpdateData.Data != NULL);
+ StartOpCodeHandle = HiiAllocateOpCodeHandle ();
+ ASSERT (StartOpCodeHandle != NULL);
+
+ EndOpCodeHandle = HiiAllocateOpCodeHandle ();
+ ASSERT (EndOpCodeHandle != NULL);
+
+ //
+ // Create Hii Extend Label OpCode as the start opcode
+ //
+ StartLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (StartOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL));
+ StartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
+ StartLabel->Number = LABEL_BOOT_OPTION;
+
+ //
+ // Create Hii Extend Label OpCode as the end opcode
+ //
+ EndLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (EndOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL));
+ EndLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
+ EndLabel->Number = LABEL_BOOT_OPTION_END;
mKeyInput = 0;
@@ -256,32 +274,33 @@ CallBootManager ( HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL);
- CreateActionOpCode (
+ HiiCreateActionOpCode (
+ StartOpCodeHandle,
mKeyInput,
Token,
HelpToken,
EFI_IFR_FLAG_CALLBACK,
- 0,
- &UpdateData
+ 0
);
}
- IfrLibUpdateForm (
+ HiiUpdateForm (
HiiHandle,
&mBootManagerGuid,
BOOT_MANAGER_FORM_ID,
- LABEL_BOOT_OPTION,
- FALSE,
- &UpdateData
+ StartOpCodeHandle,
+ EndOpCodeHandle
);
- FreePool (UpdateData.Data);
+
+ HiiFreeOpCodeHandle (StartOpCodeHandle);
+ HiiFreeOpCodeHandle (EndOpCodeHandle);
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
Status = gFormBrowser2->SendForm (
gFormBrowser2,
&HiiHandle,
1,
- NULL,
+ &mBootManagerGuid,
0,
NULL,
&ActionRequest
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h index 90b7b2850d..00307b6ba3 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h @@ -29,6 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define BOOT_MANAGER_FORM_ID 0x1000
#define LABEL_BOOT_OPTION 0x00
+#define LABEL_BOOT_OPTION_END 0x01
//
// These are the VFR compiler generated data representing our VFR data.
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManagerVfr.Vfr b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManagerVfr.Vfr index a70966cf3c..c23c84fcf3 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManagerVfr.Vfr +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManagerVfr.Vfr @@ -24,11 +24,12 @@ #define BOOT_MANAGER_SUBCLASS 0x00
formset
- guid = FORMSET_GUID,
- title = STRING_TOKEN(STR_BM_BANNER),
- help = STRING_TOKEN(STR_LAST_STRING),
- class = BOOT_MANAGER_CLASS,
- subclass = BOOT_MANAGER_SUBCLASS,
+ guid = FORMSET_GUID,
+ title = STRING_TOKEN(STR_BM_BANNER),
+ help = STRING_TOKEN(STR_LAST_STRING),
+ classguid = FORMSET_GUID,
+ class = BOOT_MANAGER_CLASS,
+ subclass = BOOT_MANAGER_SUBCLASS,
form formid = BOOT_MANAGER_FORM_ID,
title = STRING_TOKEN(STR_BM_BANNER);
|