From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.14178.1667720143243526126 for ; Sun, 06 Nov 2022 00:35:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KG3LwFBx; spf=pass (domain: intel.com, ip: 192.55.52.43, 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=1667720143; x=1699256143; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z5I26bgwQM2Q1tG69oCzVmBn6LL6LdT9JeWxEPDwjPg=; b=KG3LwFBxhDCn+ccddsX0sEMJW0LVLmaHZLqhZgJOOqD+3zfMdvU+azC+ ffHasRLEkWRAfOsFBWjZw2ZzezxCHiKSXlwjbvdD27qOmwuopBC0I9y39 j1XhXNC/pHuqQboREfnS1RzR3VKtnAY5K/70TasWxZtntXH/T/JHUFJ5b eYJQQxf5AieWRqsy7chkhpiOhhOPkkS2k53nC5Z47uf8SLenwrY5jCmq8 Ed61bl5lQm4Ej7tK3ILIebgrq0KTWtYXba/aPRZQK0AlIq7eznrPZeCUl 6ESTF3BBrvePUW7aJLuzlDJVJCe+TtzB0piLaucCOW7rIok8r8Xx/w3OY g==; X-IronPort-AV: E=McAfee;i="6500,9779,10522"; a="396534276" X-IronPort-AV: E=Sophos;i="5.96,142,1665471600"; d="scan'208";a="396534276" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2022 00:35:31 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10522"; a="810513473" X-IronPort-AV: E=Sophos;i="5.96,142,1665471600"; d="scan'208";a="810513473" Received: from jvang-mobl.amr.corp.intel.com ([10.209.139.244]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2022 00:35:30 -0700 From: "Judah Vang" To: devel@edk2.groups.io Cc: Jian J Wang , Jiewen Yao , Nishant C Mistry Subject: [PATCH v5 13/19] SecurityPkg: Update RPMC APIs with index Date: Sun, 6 Nov 2022 00:35:03 -0700 Message-Id: <20221106073509.3071-14-judah.vang@intel.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20221106073509.3071-1-judah.vang@intel.com> References: <20221106073509.3071-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 Reviewed-by: Jian J Wang --- 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