Hi, Sami Please see my comments inline. +**/ +EFI_STATUS +EFIAPI +CcMeasureAndLogData ( + IN UINT32 PcrIndex, + IN UINT32 EventType, + IN VOID *EventLog, + IN UINT32 LogLen, + IN VOID *HashData, + IN UINT64 HashDataLen + ) +{ + EFI_STATUS Status; + EFI_CC_MEASUREMENT_PROTOCOL *CcProtocol; + EFI_CC_EVENT *EfiCcEvent; + UINT32 MrIndex; [SAMI] Same comment as in patch 2/3. Is it possible to use the typedef for the measurment register index here, please? [Min] Thanks for reminder. It will be fixed. + + Status = gBS->LocateProtocol (&gEfiCcMeasurementProtocolGuid, NULL, (VOID **) &CcProtocol); + if (EFI_ERROR (Status)) { + return Status; + } + + Status = CcProtocol->MapPcrToMrIndex (CcProtocol, PcrIndex, &MrIndex); + if (EFI_ERROR (Status)) { + return EFI_INVALID_PARAMETER; [SAMI] Is it possible to return the error code returned by CcProtocol->MapPcrToMrIndex(), please? [Min] Sure. It will be updated in the next version. Thanks Min_._,_._,_