From 2e7230f1ba65e0ec9e6a3e191cca3a8b04e22ca8 Mon Sep 17 00:00:00 2001 From: Awiral Shrivastava Date: Fri, 5 Jul 2024 12:34:34 +0530 Subject: [PATCH] IntelFsp2WrapperPkg: FSP measurement based on PcdFspMeasurementConfig REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4725 ACM provides register to report TPM measurement status. If ACM has already measured FSP component, BIOS shoule be able to skip measurement. PcdFspMeasurementConfig should be DynamicEx to skip measurement. Signed-off-by: Awiral Shrivastava --- IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 34 ++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec index 922ccc063f71..6865ffaf1373 100644 --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec @@ -90,23 +90,6 @@ # @Prompt Skip FSP API from FSP wrapper. gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi|0x00000000|UINT32|0x40000009 - ## This PCD decides how FSP is measured - # 1) The BootGuard ACM may already measured the FSP component, such as FSPT/FSPM. - # We need a flag (PCD) to indicate if there is need to do such FSP measurement or NOT. - # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is considered - # as configuration block, and it may be updated by OEM by design. - # This flag (PCD) is to indicate if we need isolate the UPD region from the FSP code region. - # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2. - # BIT1: Need measure FSPT. (for FSP 2.x) - # BIT2: Need measure FSPM. (for FSP 2.x) - # BIT3: Need measure FSPS. (for FSP 2.x) - # BIT4~30: reserved. - # BIT31: Need isolate UPD region measurement. - #0: measure FSP[T|M|S] as one binary in one record (PCR0). - #1: measure FSP UPD region in one record (PCR1), the FSP code without UPD in another record (PCR0). - # - gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x00000000|UINT32|0x4000000B - [PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx] ## This PCD decides how Wrapper code utilizes FSP # 0: DISPATCH mode (FSP Wrapper will load PeiCore from FSP without calling FSP API) @@ -137,3 +120,20 @@ # Non-0 means PcdFspsUpdDataAddress will be ignored, otherwise PcdFspsUpdDataAddress will be used. # gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress64|0x00000000|UINT64|0x50000003 + + ## This PCD decides how FSP is measured + # 1) The BootGuard ACM may already measured the FSP component, such as FSPT/FSPM. + # We need a flag (PCD) to indicate if there is need to do such FSP measurement or NOT. + # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is considered + # as configuration block, and it may be updated by OEM by design. + # This flag (PCD) is to indicate if we need isolate the UPD region from the FSP code region. + # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2. + # BIT1: Need measure FSPT. (for FSP 2.x) + # BIT2: Need measure FSPM. (for FSP 2.x) + # BIT3: Need measure FSPS. (for FSP 2.x) + # BIT4~30: reserved. + # BIT31: Need isolate UPD region measurement. + #0: measure FSP[T|M|S] as one binary in one record (PCR0). + #1: measure FSP UPD region in one record (PCR1), the FSP code without UPD in another record (PCR0). + # + gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x00000000|UINT32|0x50000004