From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.13470.1651255520033914775 for ; Fri, 29 Apr 2022 11:05:20 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Vl1OsJgj; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: judah.vang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651255520; x=1682791520; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=m+2g2n5TraY9sr2fGJ/dyhpZ71RRkZWnCyTRQq6aE2A=; b=Vl1OsJgj7rADsve+qH8CKJuYYOaidjbE0bFQDd+7PgGXITAjp2PblwDA pydYA8o8XtwxUuff/RffQ8ma43TYmrCj8E/eVAzBr0QmBJUMQIaldoQpc +eZ4Zs17cimhwA9yWxm7eCRB+7APvcXYfb094RrtjdIoCqpd39BdcWu2+ /on3fLkv9xo6B2hpdz3UrXpYZWNi1rrsOJ2EDGrPTx8U3MDJO3UUaSOf+ wCPqzpZ46sEYI/QRqHMcmCgw0qdBrubdGSxslSPy1fndHUnNP1vgBO93d LiXCOdc0Opb1CpPUzzh2vtn+Z2G+uPxkQTCzDjEkJhBqYz49fpWVL3TjK w==; X-IronPort-AV: E=McAfee;i="6400,9594,10332"; a="327227220" X-IronPort-AV: E=Sophos;i="5.91,186,1647327600"; d="scan'208";a="327227220" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 11:05:18 -0700 X-IronPort-AV: E=Sophos;i="5.91,186,1647327600"; d="scan'208";a="514955707" Received: from jvang-mobl.amr.corp.intel.com ([10.212.198.238]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 11:05:17 -0700 From: "Judah Vang" To: devel@edk2.groups.io Cc: Jian J Wang , Jiewen Yao , Nishant C Mistry Subject: [Patch v2 11/28] SecurityPkg: Update RPMC APIs with index Date: Fri, 29 Apr 2022 11:04:13 -0700 Message-Id: <20220429180430.3292-12-judah.vang@intel.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20220429180430.3292-1-judah.vang@intel.com> References: <20220429180430.3292-1-judah.vang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594 Update RPMC APIs with index parameter because sometimes there are more than 1 RPMC counter on the platform. Cc: Jian J Wang Cc: Jiewen Yao Cc: Nishant C Mistry Signed-off-by: Jian J Wang Signed-off-by: Nishant C Mistry Signed-off-by: Judah Vang --- SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c b/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c index 792e48250e5d..557aeb6abf09 100644 --- a/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c +++ b/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c @@ -1,7 +1,7 @@ /** @file NULL RpmcLib instance for build purpose. -Copyright (c) 2020, Intel Corporation. All rights reserved.
+Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -12,6 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /** Requests the monotonic counter from the designated RPMC counter. + @param[in] CounterIndex The RPMC index @param[out] CounterValue A pointer to a buffer to store the RPMC value. @retval EFI_SUCCESS The operation completed successfully. @@ -21,6 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI RequestMonotonicCounter ( + IN UINT8 CounterIndex, OUT UINT32 *CounterValue ) { @@ -31,6 +33,8 @@ RequestMonotonicCounter ( /** Increments the monotonic counter in the SPI flash device by 1. + @param[in] CounterIndex The RPMC index + @retval EFI_SUCCESS The operation completed successfully. @retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter. @retval EFI_UNSUPPORTED The operation is un-supported. @@ -38,7 +42,7 @@ RequestMonotonicCounter ( EFI_STATUS EFIAPI IncrementMonotonicCounter ( - VOID + IN UINT8 CounterIndex ) { ASSERT (FALSE); -- 2.35.1.windows.2