summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-02 01:37:48 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-02 01:37:48 +0000
commit158bb28ae03d85a513c49aec6539f159489700a0 (patch)
tree793de818f725f8295264b284d4aa7741643f2013 /IntelFrameworkModulePkg
parentd10a41e634cad5230e6ec53ebb3d22f636eeaa8a (diff)
downloadedk2-158bb28ae03d85a513c49aec6539f159489700a0.zip
edk2-158bb28ae03d85a513c49aec6539f159489700a0.tar.gz
edk2-158bb28ae03d85a513c49aec6539f159489700a0.tar.bz2
Add support to original EFI_IFR_FORM_SET in initial UEFI2.1 spec. Now, it has been updated to new one in UEFI2.1D.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9905 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
index 8170f11..7dbbe85 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
@@ -294,18 +294,25 @@ ExtractDisplayedHiiFormFromHiiHandle (
OpCodeData = Package + Offset2;
if (((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_FORM_SET_OP) {
- //
- // Find FormSet OpCode
- //
- ClassGuidNum = ((EFI_IFR_FORM_SET *) OpCodeData)->Flags;
- ClassGuid = (EFI_GUID *) (VOID *)(OpCodeData + sizeof (EFI_IFR_FORM_SET));
- while (ClassGuidNum-- > 0) {
- if (CompareGuid (SetupClassGuid, ClassGuid)) {
- CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
- CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
- FreePool (HiiPackageList);
- return TRUE;
+ if (((EFI_IFR_OP_HEADER *) OpCodeData)->Length > OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
+ //
+ // Find FormSet OpCode
+ //
+ ClassGuidNum = ((EFI_IFR_FORM_SET *) OpCodeData)->Flags;
+ ClassGuid = (EFI_GUID *) (VOID *)(OpCodeData + sizeof (EFI_IFR_FORM_SET));
+ while (ClassGuidNum-- > 0) {
+ if (CompareGuid (SetupClassGuid, ClassGuid)) {
+ CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
+ CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
+ FreePool (HiiPackageList);
+ return TRUE;
+ }
}
+ } else {
+ CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
+ CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
+ FreePool (HiiPackageList);
+ return TRUE;
}
}