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.web11.3634.1660200854871999493 for ; Wed, 10 Aug 2022 23:54:16 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=kt9Vt2Ev; 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=1660200856; x=1691736856; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z5I26bgwQM2Q1tG69oCzVmBn6LL6LdT9JeWxEPDwjPg=; b=kt9Vt2EvopdyM9BaXfUIZc1iG2DEnD4O0BASAMbU6kJYtWa3e+kTotOe u3zSV8uOsR9smSNk42ORuOfQYOAvNaerqnnj44YUMxVJ8N2LvxRpZznHE Mlp95OKq2yhWQMk7vCKOUNkZO/VjNdvsV9kGn1VwSE51/PJTtw98T3Y2Q JAHvv++sUlYjBLbZeuBcA39sXMIID5eWiwWxfmTKRH2RvnGUXBP3mVG7t ZjOyMLttAMY8BMU3cwUW++Iqv9DMtT+mafkX9xeBPyU5/alNYgbj/A0f0 fY3VSoQG8FX6g2e2BMjOJK3Kj/ha/hhIrRi1QiHGyKVGI+7Eldx/txcsz A==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="377565812" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="377565812" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 23:54:15 -0700 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="673586372" Received: from moisespe-mobl.amr.corp.intel.com (HELO jvang-mobl.amr.corp.intel.com) ([10.212.171.64]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 23:54:15 -0700 From: "Judah Vang" To: devel@edk2.groups.io Cc: Jian J Wang , Jiewen Yao , Nishant C Mistry Subject: [PATCH v4 13/28] SecurityPkg: Update RPMC APIs with index Date: Wed, 10 Aug 2022 23:53:22 -0700 Message-Id: <20220811065337.2068-14-judah.vang@intel.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20220811065337.2068-1-judah.vang@intel.com> References: <20220811065337.2068-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