From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by mx.groups.io with SMTP id smtpd.web08.2670.1633977295606399778 for ; Mon, 11 Oct 2021 11:34:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@corthon-com.20210112.gappssmtp.com header.s=20210112 header.b=QK79WueF; spf=pass (domain: gmail.com, ip: 209.85.219.180, mailfrom: debtech@gmail.com) Received: by mail-yb1-f180.google.com with SMTP id a7so41155330yba.6 for ; Mon, 11 Oct 2021 11:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corthon-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+yOoDiC4okAQR73MeGHQRtfHdUY075jPtW6SajlqBw0=; b=QK79WueFLcG50GJS0neT7FP9VG1rKB3T51n0dzy6kiep7lOjEseKpewVuD7kbkLC3s fpnOW3OS8bR+cm2GAC2eSX1EL03up6uI+uDB/cP+jQvI41LhuhJ2TfExFmzaDFxnbAfH msaCghmbZzMAOBSF9EB5/4fadYaI1CL4A5TSbtm1bI9Yee7bnXOXFCM8K7PQWgPB9pkK pS5hU7ecAndW1UJaa5wLjpTCnHDKUerGVZXIxhr+iNXoWh3PUZILRhP4CYC3dgU/yhwR MvBP/Bz8UD8uq4qEK0l1Wkl2x9dX81fOQR8n26Cvx3Ka+drLfmLeocwiOi7dx4W6PRXR 5mqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+yOoDiC4okAQR73MeGHQRtfHdUY075jPtW6SajlqBw0=; b=X9I/LGRJtMq1ACATYthWkL8FOyUYtWl4GZnc6Xgctra0vPIt1OCVIha4OoCEwPzQSC UX+OJ4mZ4VwnqSKsXcvFI+HlgjhJOCoXVnDV5x3F7ZkkD8jWkU8mnPKtMqoA4UNzFGxI 48uevoML0qhIheplHD5QzjUL9SIoTmaq0GRpIdd97sxq0gUA4iFfOwPyysRNBP3PIjqF Nwz0T/xkD5nBmTsxgDQqz8wmlTFeaITbkWd5Lgnez5hLr9+A2MO+oKF9f0gFKwq0qA2k q0yGEa1iO3LIRvSgiVrAAW7xob3lTBA1KcxO7PlE7tyA0P1zs3mJrxOe/aT7X8+wUvrw fxow== X-Gm-Message-State: AOAM5312mVm6jLuB11XnwO/E1oewK4wJxQXvHVPNSpn0F/q13fAGps6Q 9Y53mbNsrS1BxUtmtV58FtjoG27GybXLp2cCUpOqQo3N X-Google-Smtp-Source: ABdhPJyBI8cVPN8Da5SNTxiMj15li0BQE2zYS84AQBLYhrE0TN2Hg6pTuHUTLjOZbtHIkDgMkKd3pZD/ZClATFwR/uI= X-Received: by 2002:a5b:381:: with SMTP id k1mr25501834ybp.271.1633977294526; Mon, 11 Oct 2021 11:34:54 -0700 (PDT) MIME-Version: 1.0 References: <20210730175517.2445-1-brbarkel@microsoft.com> <1696A3E2DE5C4DCB.1941@groups.io> <169A57BB10BEC566.13770@groups.io> <013f01d78fe3$cb33b270$619b1750$@byosoft.com.cn> <169ABCD073787695.13770@groups.io> In-Reply-To: From: "Bret Barkelew" Date: Mon, 11 Oct 2021 11:34:43 -0700 Message-ID: Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib To: "Yao, Jiewen" Cc: Bret Barkelew , "devel@edk2.groups.io" , "gaoliming@byosoft.com.cn" , "Kinney, Michael D" , "Wang, Jian J" , "Zhang, Qi1" , "Kumar, Rahul1" Content-Type: multipart/alternative; boundary="000000000000361ef105ce17fc96" --000000000000361ef105ce17fc96 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Good question! I had a kid in September and then everything fell off my radar. I think I can find this branch and knock out a second patch, though. On Fri, Oct 8, 2021 at 7:31 PM Yao, Jiewen wrote: > Hey > > Is that any update for this patch? > > > > I did not see the v2 patch. Just want to ensure I did not miss that by > mistake. > > > > Thank you > > Yao Jiewen > > > > *From:* Bret Barkelew > *Sent:* Friday, August 13, 2021 11:22 AM > *To:* Yao, Jiewen ; devel@edk2.groups.io; > gaoliming@byosoft.com.cn; bret@corthon.com; Kinney, Michael D < > michael.d.kinney@intel.com> > *Cc:* Wang, Jian J ; Zhang, Qi1 < > qi1.zhang@intel.com>; Kumar, Rahul1 > *Subject:* Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] > SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib > > > > Thanks, Jiewen! I=E2=80=99ll make those changes! > > > > - Bret > ------------------------------ > > *From:* Yao, Jiewen > *Sent:* Thursday, August 12, 2021 7:47:04 PM > *To:* devel@edk2.groups.io ; Yao, Jiewen < > jiewen.yao@intel.com>; gaoliming@byosoft.com.cn ; > Bret Barkelew ; bret@corthon.com < > bret@corthon.com>; Kinney, Michael D > *Cc:* Wang, Jian J ; Zhang, Qi1 < > qi1.zhang@intel.com>; Kumar, Rahul1 > *Subject:* RE: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] > SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib > > > > Hi Bret > > Since it took much long time to get ECC feedback than I expected, I would > give feedback on code while we are waiting. > > > > 1) Please confirm how you test the code, such as Microsoft platform ? > > 2) Please remove =E2=80=9C+} // Tpm2NvUndefineSpaceSpecial()=E2=80=9D at = the end of the > function. We do not use that style in other code. > > 3) Please copy the definition from TPM spec =E2=80=9CThis command allows = removal > of a platform-created NV Index that has TPMA_NV_POLICY_DELETE SET=E2=80= =9D to the > function header description. The current one =E2=80=9CThis command remove= s an index > from the TPM.=E2=80=9D is for TPM2_NV_UndefineSpace instead of > TPM2_NV_UndefineSpaceSpecial. > > > > Since above comment does not impact any function, I would like to give RB= . > > > > With about change, reviewed-by: Jiewen Yao > > > > Thank you > > Yao Jiewen > > > > *From: *Bret Barkelew via groups.io > > *Sent: *Friday, July 30, 2021 11:08 AM > *To: *devel@edk2.groups.io; bret@corthon.com > *Cc: *Yao, Jiewen ; Jian J Wang > ; Qi Zhang ; Rahul Kumar > > *Subject: *Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] > SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib > > > > Note, even though this keeps with the style of the rest of the file, it > breaks ECC: > > SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by > corthon =C2=B7 Pull Request #1848 =C2=B7 tianocore/edk2 (github.com) > > > > > PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET -- > > ERROR - > > ERROR - > > ERROR - EFI coding style error > > ERROR - *Error code: 8001 > > ERROR - *Only capital letters are allowed to be used for #define > declarations > > ERROR - *file: > //home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c > > ERROR - *Line number: 27 > > ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no > > > > Thoughts? > > > > - Bret > > > > *From: *Bret Barkelew via groups.io > *Sent: *Friday, July 30, 2021 10:55 AM > *To: *devel@edk2.groups.io > *Cc: *Yao, Jiewen ; Jian J Wang > ; Qi Zhang ; Rahul Kumar > > *Subject: *[EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: > Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib > > > > Used to provision and maintain certain HW-defined NV spaces. > > REF: > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzi= lla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994&data=3D04%7C01%7CBret.Bark= elew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af9= 1ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJWIj= oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sda= ta=3Ds96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3D&reserved=3D0 > > > Signed-off-by: Bret Barkelew > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Qi Zhang > Cc: Rahul Kumar > --- > SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 > ++++++++++++++++++++ > SecurityPkg/Include/Library/Tpm2CommandLib.h | 22 ++++ > 2 files changed, 144 insertions(+) > > diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c > b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c > index 87572de20164..7931fade9190 100644 > --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c > +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c > @@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #define RC_NV_UndefineSpace_authHandle (TPM_RC_H + TPM_RC_1) > > #define RC_NV_UndefineSpace_nvIndex (TPM_RC_H + TPM_RC_2) > > > > +#define RC_NV_UndefineSpaceSpecial_nvIndex (TPM_RC_H + TPM_RC_1) > > + > > #define RC_NV_Read_authHandle (TPM_RC_H + TPM_RC_1) > > #define RC_NV_Read_nvIndex (TPM_RC_H + TPM_RC_2) > > #define RC_NV_Read_size (TPM_RC_P + TPM_RC_1) > > @@ -74,6 +76,20 @@ typedef struct { > TPMS_AUTH_RESPONSE AuthSession; > > } TPM2_NV_UNDEFINESPACE_RESPONSE; > > > > +typedef struct { > > + TPM2_COMMAND_HEADER Header; > > + TPMI_RH_NV_INDEX NvIndex; > > + TPMI_RH_PLATFORM Platform; > > + UINT32 AuthSessionSize; > > + TPMS_AUTH_COMMAND AuthSession; > > +} TPM2_NV_UNDEFINESPACESPECIAL_COMMAND; > > + > > +typedef struct { > > + TPM2_RESPONSE_HEADER Header; > > + UINT32 AuthSessionSize; > > + TPMS_AUTH_RESPONSE AuthSession; > > +} TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE; > > + > > typedef struct { > > TPM2_COMMAND_HEADER Header; > > TPMI_RH_NV_AUTH AuthHandle; > > @@ -506,6 +522,112 @@ Done: > return Status; > > } > > > > +/** > > + This command removes an index from the TPM. > > + > > + @param[in] NvIndex The NV Index. > > + @param[in] IndexAuthSession Auth session context for the Index > auth/policy > > + @param[in] PlatAuthSession Auth session context for the Platform > auth/policy > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_NOT_FOUND The command was returned successfully, > but NvIndex is not found. > > + @retval EFI_UNSUPPORTED Selected NvIndex does not support > deletion through this call. > > + @retval EFI_SECURITY_VIOLATION Deletion is not authorized by current > policy session. > > + @retval EFI_INVALID_PARAMETER The command was unsuccessful. > > + @retval EFI_DEVICE_ERROR The command was unsuccessful. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +Tpm2NvUndefineSpaceSpecial ( > > + IN TPMI_RH_NV_INDEX NvIndex, > > + IN TPMS_AUTH_COMMAND *IndexAuthSession OPTIONAL, > > + IN TPMS_AUTH_COMMAND *PlatAuthSession OPTIONAL > > + ) > > +{ > > + EFI_STATUS Status; > > + TPM2_NV_UNDEFINESPACESPECIAL_COMMAND SendBuffer; > > + TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE RecvBuffer; > > + UINT32 SendBufferSize; > > + UINT32 RecvBufferSize; > > + UINT8 *Buffer; > > + UINT32 IndexAuthSize, PlatAuthSize; > > + TPM_RC ResponseCode; > > + > > + // > > + // Construct command > > + // > > + SendBuffer.Header.tag =3D SwapBytes16(TPM_ST_SESSIONS); > > + SendBuffer.Header.commandCode =3D > SwapBytes32(TPM_CC_NV_UndefineSpaceSpecial); > > + > > + SendBuffer.NvIndex =3D SwapBytes32 (NvIndex); > > + SendBuffer.Platform =3D SwapBytes32 (TPM_RH_PLATFORM); > > + > > + // > > + // Marshall the Auth Sessions for the two handles. > > + Buffer =3D (UINT8 *)&SendBuffer.AuthSession; > > + // IndexAuthSession > > + IndexAuthSize =3D CopyAuthSessionCommand (IndexAuthSession, Buffer); > > + Buffer +=3D IndexAuthSize; > > + // PlatAuthSession > > + PlatAuthSize =3D CopyAuthSessionCommand (PlatAuthSession, Buffer); > > + Buffer +=3D PlatAuthSize; > > + // AuthSessionSize > > + SendBuffer.AuthSessionSize =3D SwapBytes32(IndexAuthSize + PlatAuthSiz= e); > > + > > + // Update total command size. > > + SendBufferSize =3D (UINT32)(Buffer - (UINT8 *)&SendBuffer); > > + SendBuffer.Header.paramSize =3D SwapBytes32 (SendBufferSize); > > + > > + // > > + // send Tpm command > > + // > > + RecvBufferSize =3D sizeof (RecvBuffer); > > + Status =3D Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, > &RecvBufferSize, (UINT8 *)&RecvBuffer); > > + if (EFI_ERROR (Status)) { > > + goto Done; > > + } > > + > > + if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { > > + DEBUG ((EFI_D_ERROR, "Tpm2NvUndefineSpaceSpecial - RecvBufferSize > Error - %x\n", RecvBufferSize)); > > + Status =3D EFI_DEVICE_ERROR; > > + goto Done; > > + } > > + > > + ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); > > + if (ResponseCode !=3D TPM_RC_SUCCESS) { > > + DEBUG ((EFI_D_ERROR, "Tpm2NvUndefineSpaceSpecial - responseCode - > %x\n", SwapBytes32(RecvBuffer.Header.responseCode))); > > + } > > + switch (ResponseCode) { > > + case TPM_RC_SUCCESS: > > + // return data > > + break; > > + case TPM_RC_ATTRIBUTES: > > + case TPM_RC_ATTRIBUTES + RC_NV_UndefineSpaceSpecial_nvIndex: > > + Status =3D EFI_UNSUPPORTED; > > + break; > > + case TPM_RC_NV_AUTHORIZATION: > > + Status =3D EFI_SECURITY_VIOLATION; > > + break; > > + case TPM_RC_HANDLE + RC_NV_UndefineSpaceSpecial_nvIndex: // > TPM_RC_NV_DEFINED: > > + Status =3D EFI_NOT_FOUND; > > + break; > > + case TPM_RC_VALUE + RC_NV_UndefineSpace_nvIndex: > > + Status =3D EFI_INVALID_PARAMETER; > > + break; > > + default: > > + Status =3D EFI_DEVICE_ERROR; > > + break; > > + } > > + > > +Done: > > + // > > + // Clear AuthSession Content > > + // > > + ZeroMem (&SendBuffer, sizeof(SendBuffer)); > > + ZeroMem (&RecvBuffer, sizeof(RecvBuffer)); > > + return Status; > > +} // Tpm2NvUndefineSpaceSpecial() > > + > > /** > > This command reads a value from an area in NV memory previously define= d > by TPM2_NV_DefineSpace(). > > > > diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h > b/SecurityPkg/Include/Library/Tpm2CommandLib.h > index ee8eb622951c..8d7b4998d98d 100644 > --- a/SecurityPkg/Include/Library/Tpm2CommandLib.h > +++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h > @@ -364,6 +364,28 @@ Tpm2NvUndefineSpace ( > IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL > > ); > > > > +/** > > + This command removes an index from the TPM. > > + > > + @param[in] NvIndex The NV Index. > > + @param[in] IndexAuthSession Auth session context for the Index > auth/policy > > + @param[in] PlatAuthSession Auth session context for the Platform > auth/policy > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_NOT_FOUND The command was returned successfully, > but NvIndex is not found. > > + @retval EFI_UNSUPPORTED Selected NvIndex does not support > deletion through this call. > > + @retval EFI_SECURITY_VIOLATION Deletion is not authorized by current > policy session. > > + @retval EFI_INVALID_PARAMETER The command was unsuccessful. > > + @retval EFI_DEVICE_ERROR The command was unsuccessful. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +Tpm2NvUndefineSpaceSpecial ( > > + IN TPMI_RH_NV_INDEX NvIndex, > > + IN TPMS_AUTH_COMMAND *IndexAuthSession OPTIONAL, > > + IN TPMS_AUTH_COMMAND *PlatAuthSession OPTIONAL > > + ); > > + > > /** > > This command reads a value from an area in NV memory previously define= d > by TPM2_NV_DefineSpace(). > > > > -- > 2.31.1.windows.1 > > > > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#78450): > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.= groups.io%2Fg%2Fdevel%2Fmessage%2F78450&data=3D04%7C01%7CBret.Barkelew%= 40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d= 7cd011db47%7C1%7C0%7C637632645397612922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4= wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3D= CWxLwgp73z2XQEa%2FN77gsCwRF73xha0RZCKwcFTlrRE%3D&reserved=3D0 > > Mute This Topic: > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgroup= s.io%2Fmt%2F84555713%2F1822150&data=3D04%7C01%7CBret.Barkelew%40microso= ft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db4= 7%7C1%7C0%7C637632645397612922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAi= LCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3DIWQ6E4yP0= ECt3oYLYQa%2BnddGfcQEDMgfASlcxRuda%2BQ%3D&reserved=3D0 > > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.= groups.io%2Fg%2Fdevel%2Funsub&data=3D04%7C01%7CBret.Barkelew%40microsof= t.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db47= %7C1%7C0%7C637632645397612922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL= CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3Dqor4Y5FZEH= 8ch0AEmWDbe97FIQk4V1qx7IURcTHzjAU%3D&reserved=3D0 > > [brbarkel@microsoft.com] > -=3D-=3D-=3D-=3D-=3D-=3D > > > > > > > >=20 > --000000000000361ef105ce17fc96 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Good question! I had a kid in September and then everythin= g=C2=A0fell off my radar. I think I can find this branch and knock out a se= cond patch, though.

On Fri, Oct 8, 2021 at 7:31 PM Yao, Jiewen <jiewen.yao@intel.com> wrote:

Hey

Is that any update for this patch?

=C2=A0

I did not see the v2 patch. Just want to ensure I di= d not miss that by mistake.

=C2=A0

Thank you

Yao Jiewen

=C2=A0

From: Bret Barkelew <Bret.Barkelew@microsoft.com= >
Sent: Friday, August 13, 2021 11:22 AM
To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; gaoliming@byosoft.com.cn; bret@corthon.com; Kinney= , Michael D <michael.d.kinney@intel.com>
Cc: Wang, Jian J <jian.j.wang@intel.com>; Zhang, Qi1 <qi1.zhang@intel.com>; Kumar,= Rahul1 <rah= ul1.kumar@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Libr= ary: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

=C2=A0

Thanks, Jiewen! I=E2=80=99ll make those changes!

=C2=A0

- Bret


From: Yao, Jiewen <jiewen.yao@intel.com>
Sent: Thursday, August 12, 2021 7:47:04 PM
To: devel@= edk2.groups.io <devel@edk2.groups.io>; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming@byo= soft.com.cn <gaoliming@byosoft.com.cn>; Bret Barkelew <Bret.Barkelew@microsoft.co= m>; bret@corthon.com = <bret@corthon.com<= /a>>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Wang, Jian J <jian.j.wang@intel.com>; Zhang, Qi1 <qi1.zhang@intel.com>; Kumar,= Rahul1 <rah= ul1.kumar@intel.com>
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Libr= ary: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

=C2=A0

Hi Bret

Since it took much long= time to get ECC feedback than I expected, I would give feedback on code wh= ile we are waiting.

=C2=A0

1) Please confirm how y= ou test the code, such as Microsoft platform ?

2) Please remove =E2=80= =9C+} // Tpm2NvUndefineSpaceSpecial()=E2=80=9D at the end of the function. = We do not use that style in other code.

3) Please copy the defi= nition from TPM spec =E2=80=9CThis command allows removal of a= platform-created NV Index that has TPMA_NV_POLICY_DELETE SET= =E2=80=9D to the function header description. The current one =E2=80=9CThis= command removes an index from the TPM.=E2=80=9D is for TPM2_NV= _UndefineSpace instead of TPM2_NV_UndefineSpaceSpecial.

=C2=A0

Since above comment does not i= mpact any function, I would like to give RB.

=C2=A0

With about change, reviewed-by= : Jiewen Yao <= Jiewen.yao@intel.com>

=C2=A0

Thank you=

Yao Jiewen

=C2=A0

From: Bret = Barkelew via groups.io
Sent: Friday, July 30, 2021 11:08 AM
To: devel@= edk2.groups.io; bret@corthon.com
Cc: Yao, J= iewen; Jian J Wang; Q= i Zhang; Rahul Kumar
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Libr= ary: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

=C2=A0<= /p>

Note, even though thi= s keeps with the style of the rest of the file, it breaks ECC:

Secur= ityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by corthon =C2=B7 Pull Re= quest #1848 =C2=B7 tianocore/edk2 (github.com)

=C2=A0<= /p>

PROGRE= SS - --Running SecurityPkg: EccCheck Test NO-TARGET --

ERROR = -

ERROR = -

ERROR = - EFI coding style error

ERROR = - *Error code: 8001

ERROR = - *Only capital letters are allowed to be used for #define declarations

ERROR = - *file: //home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStor= age.c

ERROR = - *Line number: 27

ERROR = - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no

=C2=A0<= /p>

Thoughts?

=C2=A0<= /p>

- Bret =

=C2=A0<= /p>

From: Bret Barkelew vi= a groups.io
Sent: Friday, July 30, 2021 10:55 AM
To: devel@= edk2.groups.io
Cc: Yao, J= iewen; Jian J Wang; Q= i Zhang; Rahul Kumar
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library:= Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

=C2=A0<= /p>

Used to provision and maintain certain HW-defined NV spaces.

REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzill= a.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994&amp;data=3D04%7C01%7CBret.Ba= rkelew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141a= f91ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJW= IjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a= mp;sdata=3Ds96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3D&amp;reserve= d=3D0

Signed-off-by: Bret Barkelew <bret.barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <q= i1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
---
=C2=A0SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 ++++++++++++= ++++++++
=C2=A0SecurityPkg/Include/Library/Tpm2CommandLib.h=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0 22 ++++
=C2=A02 files changed, 144 insertions(+)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c b/SecurityP= kg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 87572de20164..7931fade9190 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
=C2=A0#define RC_NV_UndefineSpace_authHandle=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = (TPM_RC_H + TPM_RC_1)

=C2=A0#define RC_NV_UndefineSpace_nvIndex=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (TPM_RC_H + TPM_RC_2)

=C2=A0

+#define RC_NV_UndefineSpaceSpecial_nvIndex=C2=A0 (TPM_RC_H + TPM_RC_1)

+

=C2=A0#define RC_NV_Read_authHandle=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (TPM_RC_H + TPM_RC_1)

=C2=A0#define RC_NV_Read_nvIndex=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (TPM_RC_H + TP= M_RC_2)

=C2=A0#define RC_NV_Read_size=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (TPM_RC_P + TPM_RC_1)

@@ -74,6 +76,20 @@ typedef struct {
=C2=A0=C2=A0 TPMS_AUTH_RESPONSE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 AuthSession;

=C2=A0} TPM2_NV_UNDEFINESPACE_RESPONSE;

=C2=A0

+typedef struct {

+=C2=A0 TPM2_COMMAND_HEADER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Header;

+=C2=A0 TPMI_RH_NV_INDEX=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 NvIndex;

+=C2=A0 TPMI_RH_PLATFORM=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 Platform;

+=C2=A0 UINT32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AuthSessionSize;

+=C2=A0 TPMS_AUTH_COMMAND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A= uthSession;

+} TPM2_NV_UNDEFINESPACESPECIAL_COMMAND;

+

+typedef struct {

+=C2=A0 TPM2_RESPONSE_HEADER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Header;
+=C2=A0 UINT32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AuthSessionSiz= e;

+=C2=A0 TPMS_AUTH_RESPONSE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = AuthSession;

+} TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE;

+

=C2=A0typedef struct {

=C2=A0=C2=A0 TPM2_COMMAND_HEADER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Header= ;

=C2=A0=C2=A0 TPMI_RH_NV_AUTH=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 AuthHandle;

@@ -506,6 +522,112 @@ Done:
=C2=A0=C2=A0 return Status;

=C2=A0}

=C2=A0

+/**

+=C2=A0 This command removes an index from the TPM.

+

+=C2=A0 @param[in]=C2=A0 NvIndex=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The NV Index.

+=C2=A0 @param[in]=C2=A0 IndexAuthSession=C2=A0=C2=A0=C2=A0 Auth session co= ntext for the Index auth/policy

+=C2=A0 @param[in]=C2=A0 PlatAuthSession=C2=A0=C2=A0=C2=A0=C2=A0 Auth sessi= on context for the Platform auth/policy

+

+=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 Operation completed successfully.

+=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 The command was returned successfully, but NvIndex is not f= ound.

+=C2=A0 @retval EFI_UNSUPPORTED=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Selected NvIndex does not support deletion through this call.

+=C2=A0 @retval EFI_SECURITY_VIOLATION=C2=A0 Deletion is not authorized by = current policy session.

+=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0 The command was unsuccess= ful.

+=C2=A0 @retval EFI_DEVICE_ERROR=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = The command was unsuccessful.

+**/

+EFI_STATUS

+EFIAPI

+Tpm2NvUndefineSpaceSpecial (

+=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMI_RH_NV_INDEX=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 NvIndex,

+=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMS_AUTH_COMMAND=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *IndexAuthSession OPTIONAL,

+=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMS_AUTH_COMMAND=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *PlatAuthSession OPTIONAL

+=C2=A0 )

+{

+=C2=A0 EFI_STATUS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status;

+=C2=A0 TPM2_NV_UNDEFINESPACESPECIAL_COMMAND=C2=A0=C2=A0=C2=A0 SendBuffer;<= br>
+=C2=A0 TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE=C2=A0=C2=A0 RecvBuffer;

+=C2=A0 UINT32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SendBufferS= ize;

+=C2=A0 UINT32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 RecvBufferS= ize;

+=C2=A0 UINT8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *Buff= er;

+=C2=A0 UINT32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 IndexAuthSi= ze, PlatAuthSize;

+=C2=A0 TPM_RC=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ResponseCod= e;

+

+=C2=A0 //

+=C2=A0 // Construct command

+=C2=A0 //

+=C2=A0 SendBuffer.Header.tag =3D SwapBytes16(TPM_ST_SESSIONS);

+=C2=A0 SendBuffer.Header.commandCode =3D SwapBytes32(TPM_CC_NV_UndefineSpa= ceSpecial);

+

+=C2=A0 SendBuffer.NvIndex =3D SwapBytes32 (NvIndex);

+=C2=A0 SendBuffer.Platform =3D SwapBytes32 (TPM_RH_PLATFORM);

+

+=C2=A0 //

+=C2=A0 // Marshall the Auth Sessions for the two handles.

+=C2=A0 Buffer =3D (UINT8 *)&SendBuffer.AuthSession;

+=C2=A0 // IndexAuthSession

+=C2=A0 IndexAuthSize =3D CopyAuthSessionCommand (IndexAuthSession, Buffer)= ;

+=C2=A0 Buffer +=3D IndexAuthSize;

+=C2=A0 // PlatAuthSession

+=C2=A0 PlatAuthSize =3D CopyAuthSessionCommand (PlatAuthSession, Buffer);<= br>
+=C2=A0 Buffer +=3D PlatAuthSize;

+=C2=A0 // AuthSessionSize

+=C2=A0 SendBuffer.AuthSessionSize =3D SwapBytes32(IndexAuthSize + PlatAuth= Size);

+

+=C2=A0 // Update total command size.

+=C2=A0 SendBufferSize =3D (UINT32)(Buffer - (UINT8 *)&SendBuffer);

+=C2=A0 SendBuffer.Header.paramSize =3D SwapBytes32 (SendBufferSize);

+

+=C2=A0 //

+=C2=A0 // send Tpm command

+=C2=A0 //

+=C2=A0 RecvBufferSize =3D sizeof (RecvBuffer);

+=C2=A0 Status =3D Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuf= fer, &RecvBufferSize, (UINT8 *)&RecvBuffer);

+=C2=A0 if (EFI_ERROR (Status)) {

+=C2=A0=C2=A0=C2=A0 goto Done;

+=C2=A0 }

+

+=C2=A0 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) {

+=C2=A0=C2=A0=C2=A0 DEBUG ((EFI_D_ERROR, "Tpm2NvUndefineSpaceSpecial -= RecvBufferSize Error - %x\n", RecvBufferSize));

+=C2=A0=C2=A0=C2=A0 Status =3D EFI_DEVICE_ERROR;

+=C2=A0=C2=A0=C2=A0 goto Done;

+=C2=A0 }

+

+=C2=A0 ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode);

+=C2=A0 if (ResponseCode !=3D TPM_RC_SUCCESS) {

+=C2=A0=C2=A0=C2=A0 DEBUG ((EFI_D_ERROR, "Tpm2NvUndefineSpaceSpecial -= responseCode - %x\n", SwapBytes32(RecvBuffer.Header.responseCode)));<= br>
+=C2=A0 }

+=C2=A0 switch (ResponseCode) {

+=C2=A0 case TPM_RC_SUCCESS:

+=C2=A0=C2=A0=C2=A0 // return data

+=C2=A0=C2=A0=C2=A0 break;

+=C2=A0 case TPM_RC_ATTRIBUTES:

+=C2=A0 case TPM_RC_ATTRIBUTES + RC_NV_UndefineSpaceSpecial_nvIndex:

+=C2=A0=C2=A0=C2=A0 Status =3D EFI_UNSUPPORTED;

+=C2=A0=C2=A0=C2=A0 break;

+=C2=A0 case TPM_RC_NV_AUTHORIZATION:

+=C2=A0=C2=A0=C2=A0 Status =3D EFI_SECURITY_VIOLATION;

+=C2=A0=C2=A0=C2=A0 break;

+=C2=A0 case TPM_RC_HANDLE + RC_NV_UndefineSpaceSpecial_nvIndex: // TPM_RC_= NV_DEFINED:

+=C2=A0=C2=A0=C2=A0 Status =3D EFI_NOT_FOUND;

+=C2=A0=C2=A0=C2=A0 break;

+=C2=A0 case TPM_RC_VALUE + RC_NV_UndefineSpace_nvIndex:

+=C2=A0=C2=A0=C2=A0 Status =3D EFI_INVALID_PARAMETER;

+=C2=A0=C2=A0=C2=A0 break;

+=C2=A0 default:

+=C2=A0=C2=A0=C2=A0 Status =3D EFI_DEVICE_ERROR;

+=C2=A0=C2=A0=C2=A0 break;

+=C2=A0 }

+

+Done:

+=C2=A0 //

+=C2=A0 // Clear AuthSession Content

+=C2=A0 //

+=C2=A0 ZeroMem (&SendBuffer, sizeof(SendBuffer));

+=C2=A0 ZeroMem (&RecvBuffer, sizeof(RecvBuffer));

+=C2=A0 return Status;

+} // Tpm2NvUndefineSpaceSpecial()

+

=C2=A0/**

=C2=A0=C2=A0 This command reads a value from an area in NV memory previousl= y defined by TPM2_NV_DefineSpace().

=C2=A0

diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Inc= lude/Library/Tpm2CommandLib.h
index ee8eb622951c..8d7b4998d98d 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -364,6 +364,28 @@ Tpm2NvUndefineSpace (
=C2=A0=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMS_AUTH_COMMAND=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *AuthSession OPTIONAL

=C2=A0=C2=A0 );

=C2=A0

+/**

+=C2=A0 This command removes an index from the TPM.

+

+=C2=A0 @param[in]=C2=A0 NvIndex=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The NV Index.

+=C2=A0 @param[in]=C2=A0 IndexAuthSession=C2=A0=C2=A0=C2=A0 Auth session co= ntext for the Index auth/policy

+=C2=A0 @param[in]=C2=A0 PlatAuthSession=C2=A0=C2=A0=C2=A0=C2=A0 Auth sessi= on context for the Platform auth/policy

+

+=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 Operation completed successfully.

+=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 The command was returned successfully, but NvIndex is not f= ound.

+=C2=A0 @retval EFI_UNSUPPORTED=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Selected NvIndex does not support deletion through this call.

+=C2=A0 @retval EFI_SECURITY_VIOLATION=C2=A0 Deletion is not authorized by = current policy session.

+=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0 The command was unsuccess= ful.

+=C2=A0 @retval EFI_DEVICE_ERROR=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = The command was unsuccessful.

+**/

+EFI_STATUS

+EFIAPI

+Tpm2NvUndefineSpaceSpecial (

+=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMI_RH_NV_INDEX=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 NvIndex,

+=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMS_AUTH_COMMAND=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *IndexAuthSession OPTIONAL,

+=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TPMS_AUTH_COMMAND=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *PlatAuthSession OPTIONAL

+=C2=A0 );

+

=C2=A0/**

=C2=A0=C2=A0 This command reads a value from an area in NV memory previousl= y defined by TPM2_NV_DefineSpace().

=C2=A0

--
2.31.1.windows.1



-=3D-=3D-=3D-=3D-=3D-=3D
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78450): https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Fdevel%2Fmessage%2F78450&amp;data=3D04%7C01%7CBret.Barkele= w%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab= 2d7cd011db47%7C1%7C0%7C637632645397612922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM= C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd= ata=3DCWxLwgp73z2XQEa%2FN77gsCwRF73xha0RZCKwcFTlrRE%3D&amp;reserved=3D0=
Mute This Topic: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgroups.= io%2Fmt%2F84555713%2F1822150&amp;data=3D04%7C01%7CBret.Barkelew%40micro= soft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011d= b47%7C1%7C0%7C637632645397612922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD= AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3DIWQ= 6E4yP0ECt3oYLYQa%2BnddGfcQEDMgfASlcxRuda%2BQ%3D&amp;reserved=3D0 Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Fdevel%2Funsub&amp;data=3D04%7C01%7CBret.Barkelew%40micros= oft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db= 47%7C1%7C0%7C637632645397612922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA= iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3Dqor4= Y5FZEH8ch0AEmWDbe97FIQk4V1qx7IURcTHzjAU%3D&amp;reserved=3D0 [brbarkel@micr= osoft.com]
-=3D-=3D-=3D-=3D-=3D-=3D

=C2=A0<= /p>

=C2=A0<= /p>

=C2=A0

--000000000000361ef105ce17fc96--