]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/FwVol/FwVol.c
MdeModulePkg PeiCore: Don't cache GUIDED section with AUTH_NOT_TESTED
[mirror_edk2.git] / MdeModulePkg / Core / Pei / FwVol / FwVol.c
index 8d07bd0747ef26b31f43ba4e21a08c528ca47cef..0bbb86d958194082fa2fd4edcfe80cd5e36f7163 100644 (file)
@@ -2,7 +2,7 @@
   Pei Core Firmware File System service routines.\r
   \r
 Copyright (c) 2015 HP Development Company, L.P.\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -913,17 +913,19 @@ ProcessSection (
         }\r
 \r
         if (!EFI_ERROR (Status)) {\r
-          //\r
-          // Update cache section data.\r
-          //\r
-          if (PrivateData->CacheSection.AllSectionCount < CACHE_SETION_MAX_NUMBER) {\r
-            PrivateData->CacheSection.AllSectionCount ++;\r
+          if ((Authentication & EFI_AUTH_STATUS_NOT_TESTED) == 0) {\r
+            //\r
+            // Update cache section data.\r
+            //\r
+            if (PrivateData->CacheSection.AllSectionCount < CACHE_SETION_MAX_NUMBER) {\r
+              PrivateData->CacheSection.AllSectionCount ++;\r
+            }\r
+            PrivateData->CacheSection.Section [PrivateData->CacheSection.SectionIndex]     = Section;\r
+            PrivateData->CacheSection.SectionData [PrivateData->CacheSection.SectionIndex] = PpiOutput;\r
+            PrivateData->CacheSection.SectionSize [PrivateData->CacheSection.SectionIndex] = PpiOutputSize;\r
+            PrivateData->CacheSection.AuthenticationStatus [PrivateData->CacheSection.SectionIndex] = Authentication;\r
+            PrivateData->CacheSection.SectionIndex = (PrivateData->CacheSection.SectionIndex + 1)%CACHE_SETION_MAX_NUMBER;\r
           }\r
-          PrivateData->CacheSection.Section [PrivateData->CacheSection.SectionIndex]     = Section;\r
-          PrivateData->CacheSection.SectionData [PrivateData->CacheSection.SectionIndex] = PpiOutput;\r
-          PrivateData->CacheSection.SectionSize [PrivateData->CacheSection.SectionIndex] = PpiOutputSize;\r
-          PrivateData->CacheSection.AuthenticationStatus [PrivateData->CacheSection.SectionIndex] = Authentication;\r
-          PrivateData->CacheSection.SectionIndex = (PrivateData->CacheSection.SectionIndex + 1)%CACHE_SETION_MAX_NUMBER;\r
 \r
           TempAuthenticationStatus = 0;\r
           Status = ProcessSection (\r