diff --git a/OvmfPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c b/OvmfPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c index 0a23bff5a1..6d2de0e838 100644 --- a/OvmfPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c +++ b/OvmfPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c @@ -2160,11 +2160,17 @@ OnReadyToBoot ( // // 2. Draw a line between pre-boot env and entering post-boot env. - // PCR[7] (is RTMR[0]) is already done. // - Status = MeasureSeparatorEvent (1); + // According to UEFI Spec 2.10 Section 38.4.1 the mapping between MrIndex and Intel + // TDX Measurement Register is: + // MrIndex 0 <--> MRTD + // MrIndex 1-3 <--> RTMR[0-2] + // RTMR[0] (i.e. MrIndex 1) is already done. So SepartorEvent shall be extended to + // RTMR[1] (i.e. MrIndex 2) as well. + // + Status = MeasureSeparatorEvent (CC_MR_INDEX_2_RTMR1); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Separator Event not Measured. Error!\n")); + DEBUG ((DEBUG_ERROR, "Separator Event not Measured to RTMR[1]. Error!\n")); } //