summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2019-05-10 10:19:36 +0800
committerJian J Wang <jian.j.wang@intel.com>2019-06-26 21:18:43 +0800
commit3743e71a0621eff88be6c5f84a1614fb34ea1564 (patch)
treea71f33d5746a98263304c32ce667cab2a8ac1128 /SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni
parentbeda3f76af9cac46e5491296a60463576989f16e (diff)
downloadedk2-3743e71a0621eff88be6c5f84a1614fb34ea1564.tar.gz
edk2-3743e71a0621eff88be6c5f84a1614fb34ea1564.tar.bz2
edk2-3743e71a0621eff88be6c5f84a1614fb34ea1564.zip
SecurityPkg/FvReportPei: implement a common FV verifier and reporter
https://bugzilla.tianocore.org/show_bug.cgi?id=1617 This driver implements a common checker, verifier and reporter which is independent of hardware based root-of-trust. Usually the hardware based root-of-trust will not verify all BIOS but part of it. For example, Boot Guard will only verify IBB segment. The IBB needs to verify other part of BIOS, i.e. other FVs to transfer control to from IBB. This driver plays the role in IBB to verify FVs not covered by hardware root-of-trust to make sure integrity of the chain of trust. To be hardware/platform independent, PPI gEdkiiPeiFirmwareVolumeInfoStoredHashFvPpiGuid is introduced for platform to pass digest information to this driver. This PPI should include all information needed to verify required FVs in required boot mode. struct _EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI { FV_HASH_INFO HashInfo; UINTN FvNumber; HASHED_FV_INFO FvInfo[1]; }; To avoid TOCTOU issue, all FVs to be verified will be copied to memory before hash calculation. That also means this driver has to be run after permanent memory has been discovered. For a measured boot, this driver will install gEdkiiPeiFirmwareVolumeInfoPrehashedFvPpiGuid to report digest of each FV to TCG driver. For a verified boot, this driver will verify the final hash value (calculated from the concatenation of each FV's hash) for indicated FVs against the hash got from platform/hardware. If pass, it will build EFI_HOB_TYPE_FV (consumed by DXE core) and/or install gEfiPeiFirmwareVolumeInfoPpiGuid (consumed by PEI core), and then report status code PcdStatusCodeFvVerificationPass. If fail, it just report status code PcdStatusCodeFvVerificationFail and go to dead loop if status report returns. The platform can register customized handler to process pass and fail cases differently. Currently, this driver only supports hash (sha256/384/512) verification for the performance consideration. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: "Hernandez Beltran, Jorge" <jorge.hernandez.beltran@intel.com> Cc: Harry Han <harry.han@intel.com> Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Diffstat (limited to 'SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni')
-rw-r--r--SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni12
1 files changed, 12 insertions, 0 deletions
diff --git a/SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni b/SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni
new file mode 100644
index 0000000000..6214bbdaa9
--- /dev/null
+++ b/SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni
@@ -0,0 +1,12 @@
+// /** @file
+// FV Verify/Report PEI Driver.
+//
+// Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US "FV Verify/Report PEI Driver"
+
+