]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Update SetupBrowser to pass correct buffer value for OrderedList Callback
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Nov 2009 04:58:19 +0000 (04:58 +0000)
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Nov 2009 04:58:19 +0000 (04:58 +0000)
2. Fix UI hang issue in SuppressIf Form support checkin
3. Update DriverSample to demo storage width of OrderedList could be defined to types other than UINT8. (Note: this requires BaseTools >= r9397 for updated VfrCompiler.exe)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9418 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
MdeModulePkg/Universal/SetupBrowserDxe/Ui.c

index 0a5d46bc96fb9e63248e605dae91ab49939a2c2d..bdc4a46147d3ffb82ebad3bbda946fbbc8ce9663 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation\r
+Copyright (c) 2007 - 2009, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -57,7 +57,7 @@ typedef struct {
   UINT8   ChooseToActivateNuclearWeaponry;\r
   UINT8   SuppressGrayOutSomething;\r
   UINT8   OrderedList[8];\r
-  UINT  BootOrder[8];\r
+  UINT16  BootOrder[8];\r
   UINT8   BootOrderLarge;\r
   UINT8   DynamicRefresh;\r
   UINT8   DynamicOneof;\r
index b7c07e8d7ceb0d695fe479c9ad4dde51c16473b7..1a8af2e2890ec3b443be206520b4093481271c06 100644 (file)
@@ -729,6 +729,7 @@ GetSelectionInputPopUp (
   Question = MenuOption->ThisTag;\r
   if (Question->Operand == EFI_IFR_ORDERED_LIST_OP) {\r
     ValueArray = Question->BufferValue;\r
+    ValueType = Question->ValueType;\r
     OrderedList = TRUE;\r
   } else {\r
     OrderedList = FALSE;\r
index 9fd08c55292f16b58f359a64bbd5b68580e7d486..c880c8afbb6da09eb44f2d0994e19524008d3d39 100644 (file)
@@ -857,6 +857,7 @@ SetupBrowser (
   EFI_BROWSER_ACTION_REQUEST      ActionRequest;\r
   EFI_HANDLE                      NotifyHandle;\r
   EFI_HII_VALUE                   *HiiValue;\r
+  EFI_IFR_TYPE_VALUE              *TypeValue;\r
   FORM_BROWSER_STATEMENT          *Statement;\r
   EFI_HII_CONFIG_ACCESS_PROTOCOL  *ConfigAccess;\r
   FORM_BROWSER_FORMSET            *FormSet;\r
@@ -1019,23 +1020,30 @@ SetupBrowser (
       if (((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) && (Statement->Operand != EFI_IFR_PASSWORD_OP)) {\r
         ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
 \r
+        if (ConfigAccess == NULL) {\r
+          return EFI_UNSUPPORTED;\r
+        }\r
+\r
         HiiValue = &Statement->HiiValue;\r
+        TypeValue = &HiiValue->Value;\r
         if (HiiValue->Type == EFI_IFR_TYPE_STRING) {\r
           //\r
           // Create String in HII database for Configuration Driver to retrieve\r
           //\r
           HiiValue->Value.string = NewString ((CHAR16 *) Statement->BufferValue, Selection->FormSet->HiiHandle);\r
+        } else if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {\r
+          //\r
+          // For OrderedList, passing in the value buffer to Callback()\r
+          //\r
+          TypeValue = (EFI_IFR_TYPE_VALUE *) Statement->BufferValue;\r
         }\r
 \r
-        if (ConfigAccess == NULL) {\r
-          return EFI_UNSUPPORTED;\r
-        }\r
         Status = ConfigAccess->Callback (\r
                                  ConfigAccess,\r
                                  EFI_BROWSER_ACTION_CHANGING,\r
                                  Statement->QuestionId,\r
                                  HiiValue->Type,\r
-                                 &HiiValue->Value,\r
+                                 TypeValue,\r
                                  &ActionRequest\r
                                  );\r
 \r
index db2bd27df3284d41ddd3295d39533c597205f0a3..5deb3019bc8a8649cb8a40769cac43000749922f 100644 (file)
@@ -2557,11 +2557,11 @@ UiDisplayMenu (
           Selection->QuestionId = Statement->RefQuestionId;\r
         } else if (Statement->RefFormId != 0) {\r
           //\r
-          // Check Ref From is suppressed.\r
+          // Check whether target From is suppressed.\r
           //\r
           RefForm = IdToForm (Selection->FormSet, Statement->RefFormId);\r
 \r
-          if (RefForm->SuppressExpression != NULL) {\r
+          if ((RefForm != NULL) && (RefForm->SuppressExpression != NULL)) {\r
             Status = EvaluateExpression (Selection->FormSet, RefForm, RefForm->SuppressExpression);\r
             if (EFI_ERROR (Status)) {\r
               return Status;\r