From: "Min Xu" <min.m.xu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"sami.mujawar@arm.com" <sami.mujawar@arm.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>,
"Yao, Jiewen" <jiewen.yao@intel.com>,
"Wang, Jian J" <jian.j.wang@intel.com>,
"Gerd Hoffmann" <kraxel@redhat.com>, nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH V4 2/3] SecurityPkg: Support CcMeasurementProtocol in DxeTpm2MeasureBootLib
Date: Fri, 5 Nov 2021 02:12:07 +0000 [thread overview]
Message-ID: <CO1PR11MB5058BFD618F2A7D29A74EE44C58E9@CO1PR11MB5058.namprd11.prod.outlook.com> (raw)
In-Reply-To: <712c34bd-e3a8-1f00-7051-7a53629661af@arm.com>
[-- Attachment #1: Type: text/plain, Size: 2497 bytes --]
Hi, Sami
Please see my comments inline.
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sami Mujawar
Sent: Tuesday, November 2, 2021 5:43 PM
To: Xu, Min M <min.m.xu@intel.com>; devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH V4 2/3] SecurityPkg: Support CcMeasurementProtocol in DxeTpm2MeasureBootLib
+/**
+ Create CcEvent from Tcg2Event.
+
+ CcEvent is similar to Tcg2Event except the MrIndex.
+
+ @param CcProtocol Pointer to the located Cc Measurement protocol instance.
+ @param Tcg2Event Pointer to the Tcg2Event.
+ @param EventSize Size of the Event.
+ @param EfiCcEvent The created CcEvent
+
+ @retval EFI_SUCCESS Successfully create the CcEvent
+ @retval EFI_INVALID_PARAMETER The input parameter is invalid
+ @retval EFI_UNSUPPORTED The input PCRIndex cannot be mapped to Cc MR
+ @retval EFI_OUT_OF_RESOURCES Out of resource
+**/
+EFI_STATUS
[SAMI] Is EFIAPI needed here?
[Min] EFIAPI is not needed here. From the EDKII C Coding Standards Spec (https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/56_declarations_and_types)
“The EFIAPI modifier must be used for all UEFI defined API functions, as well as for any function that takes a variable number of arguments. All protocol functions as well as public functions exposed by drivers must also be declared EFIAPI. This establishes a common calling convention for functions that could be referenced by other code that has potentially been built using a different compiler, with a different native calling convention”
CreateCcEventFromTcg2Event is only called internally and it will not be exposed outside. So EFIAPI is not needed.
+CreateCcEventFromTcg2Event (
+ IN EFI_CC_MEASUREMENT_PROTOCOL *CcProtocol,
+ IN EFI_TCG2_EVENT *Tcg2Event,
+ IN UINT32 EventSize,
+ IN OUT EFI_CC_EVENT **EfiCcEvent
+ )
+{
+ UINT32 MrIndex;
[SAMI] I think it may be good to use the typedef for the measurment register index here i.e. EFI_CC_MR_INDEX.
[Min] Thanks for reminder. It will be fixed in the next version.
Thanks
Min_._,_._,_
[-- Attachment #2: Type: text/html, Size: 7273 bytes --]
next prev parent reply other threads:[~2021-11-05 2:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 2:50 [PATCH V4 0/3] Introduce CcMeasurementProtocol into EDK2 Min Xu
2021-11-02 2:50 ` [PATCH V4 1/3] MdePkg: Introduce CcMeasurementProtocol for CC Guest firmware Min Xu
2021-11-02 6:24 ` Yao, Jiewen
2021-11-02 9:41 ` Sami Mujawar
2021-11-04 5:51 ` 回复: " gaoliming
2021-11-04 12:35 ` [edk2-devel] " Min Xu
2021-11-05 5:20 ` 回复: " gaoliming
2021-11-05 6:22 ` Min Xu
2021-11-02 2:50 ` [PATCH V4 2/3] SecurityPkg: Support CcMeasurementProtocol in DxeTpm2MeasureBootLib Min Xu
2021-11-02 6:24 ` Yao, Jiewen
2021-11-03 2:59 ` Min Xu
2021-11-02 9:43 ` Sami Mujawar
2021-11-05 2:12 ` Min Xu [this message]
2021-11-02 2:50 ` [PATCH V4 3/3] SecurityPkg: Support CcMeasurementProtocol in DxeTpmMeasurementLib Min Xu
2021-11-02 6:24 ` Yao, Jiewen
2021-11-03 3:01 ` Min Xu
2021-11-02 9:45 ` Sami Mujawar
2021-11-04 8:20 ` Gerd Hoffmann
2021-11-04 13:35 ` [edk2-devel] " Min Xu
2021-11-04 13:49 ` Min Xu
2021-11-04 14:18 ` Sami Mujawar
2021-11-04 14:25 ` Yao, Jiewen
2021-11-05 2:15 ` Min Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO1PR11MB5058BFD618F2A7D29A74EE44C58E9@CO1PR11MB5058.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox