]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg PeiCore: Don't cache GUIDED section with AUTH_NOT_TESTED
authorLiming Gao <liming.gao@intel.com>
Sat, 4 Feb 2017 06:41:50 +0000 (14:41 +0800)
committerLiming Gao <liming.gao@intel.com>
Fri, 10 Feb 2017 03:17:41 +0000 (11:17 +0800)
If GUIDED section authentication has EFI_AUTH_STATUS_NOT_TESTED, its
matched extraction ppi may not be installed. So, don't cache its data.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
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