From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.85]) by mx.groups.io with SMTP id smtpd.web12.45180.1636381088417790863 for ; Mon, 08 Nov 2021 06:18:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=3UhweJOo; spf=pass (domain: arm.com, ip: 40.107.21.85, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FJ+zV3IdMS7sxFDSIi+HRXvVfXW9TXbq1FOLsfRnh3E=; b=3UhweJOoOfiZ4dlhkQNA+oOA7Z70j6Ygiig0+miLYI866lMQuprnsIjAUD4ESk5RPkIRHVdFkt4CqB+LWyRDlC5OSQcMY6S9ie/01RPqwU0pL7eeWbvESt+o46F9alJpfCK0+DWqOCyDz62am+7tn4V8YxR82UjfQLTTF3aBr+4= Received: from AM5PR0502CA0007.eurprd05.prod.outlook.com (2603:10a6:203:91::17) by PAXPR08MB6719.eurprd08.prod.outlook.com (2603:10a6:102:137::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Mon, 8 Nov 2021 14:18:04 +0000 Received: from AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:91:cafe::ea) by AM5PR0502CA0007.outlook.office365.com (2603:10a6:203:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Mon, 8 Nov 2021 14:18:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT007.mail.protection.outlook.com (10.152.16.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Mon, 8 Nov 2021 14:18:03 +0000 Received: ("Tessian outbound 7b0bcc4a550a:v108"); Mon, 08 Nov 2021 14:18:03 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3b935bbafa702766 X-CR-MTA-TID: 64aa7808 Received: from 4c91f0f60c16.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FE454E8B-CB15-4DB8-925A-CFDA38636D5D.1; Mon, 08 Nov 2021 14:17:57 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4c91f0f60c16.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 08 Nov 2021 14:17:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OdB08xJ2DoscQTYoH0Wuj8DV+zOsHr6lugaCvsvxK819ytjh8ePr+Nj6knjSZOoZGa+IVIl+kac/vfY9F40hQ3KbiDg7ZbNvqnSiEqNxPz3KBiw8grp1kKSEg+/i2zhrssr4l+mZjTCfoPjPxgXGFcLY5qFNzIYrkAQ2wTMwnc+gnTxesQ49SSExgOAiDymgyC0Ct8t24dbu/YqMSRAhXTLmaX00XEBgRK4dN7AkflHCgeRBwbmRDV339vji3RGaTTK0J3//Us1roxiuoX3JaUdIWx5cepbBTViegfOOAcVk6JV1y2/u4pFiea8slXgLlGYDjMT5nkqJzKxKEyq//w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FJ+zV3IdMS7sxFDSIi+HRXvVfXW9TXbq1FOLsfRnh3E=; b=hFjYJuE2hvROAQupJrTnaGpLHpA5ahkEgZQ82YqN0PyiiVkQ/HQhcbwrH+EIcNIWHiwLkpZL/rp3U4tcvo/qcrvCN3Kqramasy0XUlY0vT3q0sB3XD5Ygys0XbkVVyt1liBem7HOZ+NhfCk8AkyYw9eiyR+S8RlIktWRhBjRZ439692ge5vInK8JwkLZs5IvqNxmerTjxrmGbyyW59u71sUKk9MXyYmOBY/85Hfm1MjwgRikYzySmGmiPfb5LUgnRcoPuQBP1QKR10bdHQLY7vk/K3vVM9MsOFXyq6GWqCQg9omn4u1UIEEoBXM46CeTXGs4sLrjn5xYbXMfGoSDwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FJ+zV3IdMS7sxFDSIi+HRXvVfXW9TXbq1FOLsfRnh3E=; b=3UhweJOoOfiZ4dlhkQNA+oOA7Z70j6Ygiig0+miLYI866lMQuprnsIjAUD4ESk5RPkIRHVdFkt4CqB+LWyRDlC5OSQcMY6S9ie/01RPqwU0pL7eeWbvESt+o46F9alJpfCK0+DWqOCyDz62am+7tn4V8YxR82UjfQLTTF3aBr+4= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB3286.eurprd08.prod.outlook.com (2603:10a6:209:40::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Mon, 8 Nov 2021 14:17:49 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65%4]) with mapi id 15.20.4669.010; Mon, 8 Nov 2021 14:17:49 +0000 Subject: Re: [PATCH V5 3/3] SecurityPkg: Support CcMeasurementProtocol in DxeTpmMeasurementLib To: Min Xu , devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Gerd Hoffmann , nd References: <444db13fb4f53970b2d812f23fb72810fedcb9db.1636268927.git.min.m.xu@intel.com> From: "Sami Mujawar" Message-ID: <4fa3076a-1520-65b0-b9fd-6032cb0ca9f8@arm.com> Date: Mon, 8 Nov 2021 14:17:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <444db13fb4f53970b2d812f23fb72810fedcb9db.1636268927.git.min.m.xu@intel.com> X-ClientProxiedBy: LO4P123CA0038.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::7) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO4P123CA0038.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Mon, 8 Nov 2021 14:17:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c5f224b-d136-43a0-1a9a-08d9a2c2940a X-MS-TrafficTypeDiagnostic: AM6PR08MB3286:|PAXPR08MB6719: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4125;OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: MoZQLKy1q0NpKQCgK7GidlJ3xaRhlPo6oTNpok6PuhYofWr+8GexEgkf6vLXQjG/moApDtW+QuoG4JMso6IZNMuVMUvERZxWStFA056D11quxrS8R1PkV+IDOoy3FMgwkGeA/ulhVX4X26qgaAe3Q6/95FcC/rRnPkaGMOQirNAdRI6pxPRU1bIdKjSk42Gc10bNdy4yVJCFCQ6wC8nWhz2gNHuOfchQ92XVyyiuw/jrbRe208d6rivpkyy/6bwyCKV4AN+ZNzB/Q6K+VqtIB7tNY+yuov2c//KH2ez9RcxVWzMfMLMo3ZuiVOPm916AzZFpG+WMNuTnaGsYuHSZFsRGIEm63mx0dDiT/7Rcs+4Cr+8Syf529GOxpgtxR/bzaiYD0PSDlCVnqyvOag5VWT4lqPtXL1R8AC9J7Q1dLva79VXwn/fPwtjU3CV3t4GwQwDLwXgCJ6aAUkX9uzFF1oBk1AArz4qlDJBxxxybrBtaXOBzWMJmYnqw77EKf5ieQRMcDd4Wt7k+h8RYZLb0oO28QtIG1jgwbyiLKa9++RlyJSeyPJGhXoWc5w1vNlrW6Us87BAFj3ZbMWR1d8VZ+uA/yxcE6aDxA4jfTjfAq8kYnRSzAcxeFRDb+CI64nwT138YBm3Uzchd06m0M4CSJqRUTuw8HGxNtnnIA3AC+JOY/KIibuXltqHfB6cbkBbYqJphR9ZiSTumfSEG1/BcEij37UXqQbcloIkQmTVmiu6XSl0YjpeSP0SW9XC3gw+zW1OJ+7Oyox9nRuGEDUk12jtHoqTXfIr3R5yv/TO4dagVpIznzAXq1qlpzsp9dulJMRNcyoRzbOtsfhkEjmaWY86JNxpdxP97qSo5qgH5D3E= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(2616005)(66556008)(66476007)(186003)(6666004)(8676002)(54906003)(956004)(31696002)(966005)(2906002)(44832011)(5660300002)(53546011)(19627235002)(316002)(66946007)(38350700002)(508600001)(16576012)(26005)(36756003)(83380400001)(86362001)(4326008)(15650500001)(31686004)(6486002)(52116002)(8936002)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3286 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: cd347189-923f-41eb-cb8c-08d9a2c28b73 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /UwtAoC5dLr9S4Z+PlRogqZ7B4sn1ZAj5NEAHD97w7+WWPVX2nEIErl3a4AXx7De1VAKzMuXVgZXnzEmT1Gi8vWuxQLFBeTARzt61aG2WmkUIy9rM3S8jbJLbqnAG17HoQcUzQEM2MfHMGvUQkD/fL7s5ucW1DaRpCZl2BjikvWxPP+mQnQ/PNBNMk3V2Uj604AS6j8jPGnKz444HHLOD8jqJPHBTcnrZnISwmSn2zzCjlwOGKIwiCfoIH0xIiv5yvi/+rvpa466AE5watmzqMzD00KfgBmE+nbO0heiUnfKPWb2P3c/Ezk21xC6lVGPUfeX788zSVXTNNYLEQV81N5XKyvHSeHYwTg3gKT9G9SUub33MjisWoc0Np/s9fZ6Kb8c11D8qd3yPfy4NR3Iqj0GPvqfVMIrKNcXcDWAqYLV+h9QQ9RD/OrMPgBUlua0PrzkDX1k3WLDDubcY3gxRNixQNk9UjMPnOxkgG1SO4x7dqwjvwMLfk3RO4jwAoJBJTcKl5WVgPRstgl3zuPJsIbhP4d2baYviFiEiYfoMd0WDnZ9jg5Rjmo22IccZRc3I5N4VqwPEammF7jPPHA67EOtIIPsS26MZzagv6CWJG2mmQbUzZUxRfH9xE8vlCUP7pZiBYfcRDjmhExQiNrjRoyc2nJQx3G4KBBfSOGmKqwHdZbFClHh9Vh7McyqAbiT6bx+uiutR2NZNutd6bq2G80Zdtou59W39Wv1GH0XAowUGXiBQ38W+EcyFwkXVW+NXxuaIWVaMNc0s3/sy7rGocmYrvo4pCGnWIh6Ht0KLqL6luWacVwF+eUVUB5YI6iZ X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(36840700001)(46966006)(2616005)(966005)(82310400003)(5660300002)(8936002)(336012)(31686004)(316002)(508600001)(186003)(54906003)(47076005)(26005)(8676002)(6486002)(956004)(53546011)(6666004)(36756003)(4326008)(86362001)(16576012)(83380400001)(15650500001)(70586007)(31696002)(2906002)(36860700001)(81166007)(70206006)(19627235002)(356005)(44832011)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2021 14:18:03.9961 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c5f224b-d136-43a0-1a9a-08d9a2c2940a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6719 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Min, Thank you for the updated patch. I have a minor suggestion marked inline as [SAMI]. Otherwise, these changes look good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 07/11/2021 12:35 PM, Min Xu wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3625 > > DxeTpmMeasurementLib supports TPM based measurement in DXE phase. > After CcMeasurementProtocol is introduced, CC based measurement needs > to be supported in DxeTpmMeasurementLib as well. > > A platform should have only one RTS/RTR. Only one of (virtual)TPM1.2, > (virtual)TPM2.0 and CC MR exists. Then only one TCG_SERVICE_PROTOCOL, > TCG2_PROTOCOL, CC_MEASUREMENT_PROTOCOL is exposed. > > In this library when do measurement only one of above 3 protocols will > be called. > > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Sami Mujawar > Cc: Gerd Hoffmann > Signed-off-by: Min Xu > --- > .../DxeTpmMeasurementLib.c | 120 +++++++++++++++--- > .../DxeTpmMeasurementLib.inf | 9 +- > 2 files changed, 107 insertions(+), 22 deletions(-) > > diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c > index 061136ee7860..a626d0f6ec38 100644 > --- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c > +++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c > @@ -1,5 +1,6 @@ > /** @file > - This library is used by other modules to measure data to TPM. > + This library is used by other modules to measure data to TPM and Confidential > + Computing (CC) measure registers. > > Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -19,8 +20,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > #include > #include > - > - > +#include > > /** > Tpm12 measure and log data, and extend the measurement result into a specific PCR. > @@ -149,6 +149,72 @@ Tpm20MeasureAndLogData ( > return Status; > } > > +/** > + Cc measure and log data, and extend the measurement result into a > + specific CC MR. > + > + @param[in] PcrIndex PCR Index. > + @param[in] EventType Event type. > + @param[in] EventLog Measurement event log. > + @param[in] LogLen Event log length in bytes. > + @param[in] HashData The start of the data buffer to be hashed, extended. > + @param[in] HashDataLen The length, in bytes, of the buffer referenced by HashData > + > + @retval EFI_SUCCESS Operation completed successfully. > + @retval EFI_UNSUPPORTED CC guest not available. > + @retval EFI_OUT_OF_RESOURCES Out of memory. > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > +**/ > +EFI_STATUS > +CcMeasureAndLogData ( > + IN UINT32 PcrIndex, > + IN UINT32 EventType, > + IN VOID *EventLog, > + IN UINT32 LogLen, > + IN VOID *HashData, > + IN UINT64 HashDataLen > + ) [SAMI] I think this function can be made static and the CcProtocol pointer could be passed as the first argument. Similarly, the other functions Tpm20MeasureAndLogData() and Tpm12MeasureAndLogDat() could also be made static. [/SAMI] > +{ > + EFI_STATUS Status; > + EFI_CC_MEASUREMENT_PROTOCOL *CcProtocol; > + EFI_CC_EVENT *EfiCcEvent; > + EFI_CC_MR_INDEX MrIndex; > + > + Status = gBS->LocateProtocol (&gEfiCcMeasurementProtocolGuid, NULL, (VOID **) &CcProtocol); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + Status = CcProtocol->MapPcrToMrIndex (CcProtocol, PcrIndex, &MrIndex); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + EfiCcEvent = (EFI_CC_EVENT *) AllocateZeroPool (LogLen + sizeof (EFI_CC_EVENT)); > + if(EfiCcEvent == NULL) { > + return EFI_OUT_OF_RESOURCES; > + } > + > + EfiCcEvent->Size = (UINT32) LogLen + sizeof (EFI_CC_EVENT) - sizeof (EfiCcEvent->Event); > + EfiCcEvent->Header.HeaderSize = sizeof (EFI_CC_EVENT_HEADER); > + EfiCcEvent->Header.HeaderVersion = EFI_CC_EVENT_HEADER_VERSION; > + EfiCcEvent->Header.MrIndex = MrIndex; > + EfiCcEvent->Header.EventType = EventType; > + CopyMem (&EfiCcEvent->Event[0], EventLog, LogLen); > + > + Status = CcProtocol->HashLogExtendEvent ( > + CcProtocol, > + 0, > + (EFI_PHYSICAL_ADDRESS) (UINTN) HashData, > + HashDataLen, > + EfiCcEvent > + ); > + FreePool (EfiCcEvent); > + > + return Status; > +} > + > + > /** > Tpm measure and log data, and extend the measurement result into a specific PCR. > > @@ -175,25 +241,15 @@ TpmMeasureAndLogData ( > IN UINT64 HashDataLen > ) > { > - EFI_STATUS Status; > + EFI_STATUS Status; > + EFI_CC_MEASUREMENT_PROTOCOL *CcProtocol; > > - // > - // Try to measure using Tpm20 protocol > - // > - Status = Tpm20MeasureAndLogData( > - PcrIndex, > - EventType, > - EventLog, > - LogLen, > - HashData, > - HashDataLen > - ); > - > - if (EFI_ERROR (Status)) { > + Status = gBS->LocateProtocol (&gEfiCcMeasurementProtocolGuid, NULL, (VOID **) &CcProtocol); > + if (!EFI_ERROR (Status)) { > // > - // Try to measure using Tpm1.2 protocol > + // Try to measure using Cc measurement protocol > // > - Status = Tpm12MeasureAndLogData( > + Status = CcMeasureAndLogData ( > PcrIndex, > EventType, > EventLog, > @@ -201,6 +257,32 @@ TpmMeasureAndLogData ( > HashData, > HashDataLen > ); > + } else { > + // > + // Try to measure using Tpm20 protocol > + // > + Status = Tpm20MeasureAndLogData ( > + PcrIndex, > + EventType, > + EventLog, > + LogLen, > + HashData, > + HashDataLen > + ); > + > + if (EFI_ERROR (Status)) { > + // > + // Try to measure using Tpm1.2 protocol > + // > + Status = Tpm12MeasureAndLogData( > + PcrIndex, > + EventType, > + EventLog, > + LogLen, > + HashData, > + HashDataLen > + ); > + } > } > > return Status; > diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf > index 7d41bc41f95d..3af3d4e33b25 100644 > --- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf > +++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf > @@ -1,5 +1,7 @@ > ## @file > -# Provides TPM measurement functions for TPM1.2 and TPM 2.0 > +# Provides below measurement functions: > +# 1. TPM measurement functions for TPM1.2 and TPM 2.0 > +# 2. Confidential Computing (CC) measurement functions > # > # This library provides TpmMeasureAndLogData() to measure and log data, and > # extend the measurement result into a specific PCR. > @@ -40,5 +42,6 @@ > UefiBootServicesTableLib > > [Protocols] > - gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES > - gEfiTcg2ProtocolGuid ## SOMETIMES_CONSUMES > + gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES > + gEfiTcg2ProtocolGuid ## SOMETIMES_CONSUMES > + gEfiCcMeasurementProtocolGuid ## SOMETIMES_CONSUMES