public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands
@ 2022-09-22  7:35 Rodrigo Gonzalez del Cueto
  2022-09-23  2:07 ` Yao, Jiewen
  2022-09-30 12:05 ` Yao, Jiewen
  0 siblings, 2 replies; 3+ messages in thread
From: Rodrigo Gonzalez del Cueto @ 2022-09-22  7:35 UTC (permalink / raw)
  To: devel; +Cc: Gonzalez Del Cueto, Rodrigo, Jiewen Yao, Jian J Wang

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4077

Following the design described in the TCG specification,
the driver implementation of the CRB protocol does not require
enforcing completing the transition to goIdle at the end of a command
sequence.

Signed-off-by: "Gonzalez Del Cueto, Rodrigo" <rodrigo.gonzalez.del.cueto@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
---
 SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
index 840265292a..1f9ac5ab5a 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
+++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
@@ -381,19 +381,6 @@ GoIdle_Exit:
   //
   MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
 
-  //
-  // Only enforce Idle state transition if execution fails when CRBIdleBypass==1
-  // Leave regular Idle delay at the beginning of next command execution
-  //
-  if (GetCachedIdleByPass () == 1) {
-    Status = PtpCrbWaitRegisterBits (
-               &CrbReg->CrbControlStatus,
-               PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE,
-               0,
-               PTP_TIMEOUT_C
-               );
-  }
-
   return Status;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands
  2022-09-22  7:35 [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands Rodrigo Gonzalez del Cueto
@ 2022-09-23  2:07 ` Yao, Jiewen
  2022-09-30 12:05 ` Yao, Jiewen
  1 sibling, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2022-09-23  2:07 UTC (permalink / raw)
  To: Gonzalez Del Cueto, Rodrigo, devel@edk2.groups.io; +Cc: Wang, Jian J

Would you please describe:
1) What test you have done? Which TPM chips you have tested?
2) Which specific section/sentence you are following to remove the goIde? I would like to double check spec. 

Thank you
Yao, Jiewen


> -----Original Message-----
> From: Gonzalez Del Cueto, Rodrigo <rodrigo.gonzalez.del.cueto@intel.com>
> Sent: Thursday, September 22, 2022 3:36 PM
> To: devel@edk2.groups.io
> Cc: Gonzalez Del Cueto, Rodrigo <rodrigo.gonzalez.del.cueto@intel.com>;
> Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
> Subject: [PATCH] SecurityPkg: Remove enforcement of final GoIdle
> transition for CRB commands
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4077
> 
> Following the design described in the TCG specification,
> the driver implementation of the CRB protocol does not require
> enforcing completing the transition to goIdle at the end of a command
> sequence.
> 
> Signed-off-by: "Gonzalez Del Cueto, Rodrigo"
> <rodrigo.gonzalez.del.cueto@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> ---
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> index 840265292a..1f9ac5ab5a 100644
> --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> @@ -381,19 +381,6 @@ GoIdle_Exit:
>    //
>    MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest,
> PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
> 
> -  //
> -  // Only enforce Idle state transition if execution fails when
> CRBIdleBypass==1
> -  // Leave regular Idle delay at the beginning of next command execution
> -  //
> -  if (GetCachedIdleByPass () == 1) {
> -    Status = PtpCrbWaitRegisterBits (
> -               &CrbReg->CrbControlStatus,
> -               PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE,
> -               0,
> -               PTP_TIMEOUT_C
> -               );
> -  }
> -
>    return Status;
>  }
> 
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands
  2022-09-22  7:35 [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands Rodrigo Gonzalez del Cueto
  2022-09-23  2:07 ` Yao, Jiewen
@ 2022-09-30 12:05 ` Yao, Jiewen
  1 sibling, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2022-09-30 12:05 UTC (permalink / raw)
  To: Gonzalez Del Cueto, Rodrigo, devel@edk2.groups.io; +Cc: Wang, Jian J

Merged https://github.com/tianocore/edk2/pull/3431


> -----Original Message-----
> From: Gonzalez Del Cueto, Rodrigo <rodrigo.gonzalez.del.cueto@intel.com>
> Sent: Thursday, September 22, 2022 3:36 PM
> To: devel@edk2.groups.io
> Cc: Gonzalez Del Cueto, Rodrigo <rodrigo.gonzalez.del.cueto@intel.com>;
> Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
> Subject: [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition
> for CRB commands
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4077
> 
> Following the design described in the TCG specification,
> the driver implementation of the CRB protocol does not require
> enforcing completing the transition to goIdle at the end of a command
> sequence.
> 
> Signed-off-by: "Gonzalez Del Cueto, Rodrigo"
> <rodrigo.gonzalez.del.cueto@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> ---
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> index 840265292a..1f9ac5ab5a 100644
> --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> @@ -381,19 +381,6 @@ GoIdle_Exit:
>    //
>    MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest,
> PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
> 
> -  //
> -  // Only enforce Idle state transition if execution fails when
> CRBIdleBypass==1
> -  // Leave regular Idle delay at the beginning of next command execution
> -  //
> -  if (GetCachedIdleByPass () == 1) {
> -    Status = PtpCrbWaitRegisterBits (
> -               &CrbReg->CrbControlStatus,
> -               PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE,
> -               0,
> -               PTP_TIMEOUT_C
> -               );
> -  }
> -
>    return Status;
>  }
> 
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-30 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22  7:35 [PATCH] SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands Rodrigo Gonzalez del Cueto
2022-09-23  2:07 ` Yao, Jiewen
2022-09-30 12:05 ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox