]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
MdeModulePkg/ResetSystemRuntimeDxe: Add platform filter and handler
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Presentation.c
index 0c5d1b40184980feaf9f3a68b720afbcdb675158..97713ebb603910dc20e612f97dc324be5e9fb854 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Utility functions for UI presentation.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -70,22 +70,6 @@ EvaluateFormExpressions (
   return EFI_SUCCESS;\r
 }\r
 \r
-/**\r
-  Add empty function for event process function.\r
-\r
-  @param Event    The Event need to be process\r
-  @param Context  The context of the event.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SetupBrowserEmptyFunction (\r
-  IN  EFI_EVENT    Event,\r
-  IN  VOID         *Context\r
-  )\r
-{\r
-}\r
-\r
 /**\r
   Base on the opcode buffer info to get the display statement.\r
 \r
@@ -718,7 +702,7 @@ InitializeDisplayFormData (
   Status = gBS->CreateEvent (\r
         EVT_NOTIFY_WAIT, \r
         TPL_CALLBACK,\r
-        SetupBrowserEmptyFunction,\r
+        EfiEventEmptyFunction,\r
         NULL,\r
         &mValueChangedEvent\r
         );\r
@@ -1013,7 +997,8 @@ ProcessAction (
   }\r
 \r
   if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) {\r
-    gResetRequired = TRUE;\r
+    gResetRequiredFormLevel = TRUE;\r
+    gResetRequiredSystemLevel = TRUE;\r
   }\r
 \r
   if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) {\r
@@ -1616,6 +1601,7 @@ ProcessUserInput (
         DeleteString(Statement->HiiValue.Value.string, gCurrentSelection->FormSet->HiiHandle);\r
         Statement->HiiValue.Value.string = UserInput->InputValue.Value.string;\r
         CopyMem (Statement->BufferValue, UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);\r
+        ZeroMem (UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);\r
         FreePool (UserInput->InputValue.Buffer);\r
         //\r
         // Two password match, send it to Configuration Driver\r
@@ -2060,7 +2046,8 @@ ProcessCallBackFunction (
         switch (ActionRequest) {\r
         case EFI_BROWSER_ACTION_REQUEST_RESET:\r
           DiscardFormIsRequired = TRUE;\r
-          gResetRequired = TRUE;\r
+          gResetRequiredFormLevel = TRUE;\r
+          gResetRequiredSystemLevel = TRUE;\r
           NeedExit              = TRUE;\r
           break;\r
 \r
@@ -2559,7 +2546,8 @@ SetupBrowser (
       if ((Status == EFI_SUCCESS) && \r
           (Statement->Storage == NULL)) { \r
         if ((Statement->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {\r
-          gResetRequired = TRUE;\r
+          gResetRequiredFormLevel = TRUE;\r
+          gResetRequiredSystemLevel = TRUE;\r
         }\r
 \r
         if ((Statement->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {\r