From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.31970.1659012617421272120 for ; Thu, 28 Jul 2022 05:50:17 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=WIqKX+DZ; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659012617; x=1690548617; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/h9q9pEQoWXWL/WnCi363HXIlbHQKsWa3ZQfkjVnQbI=; b=WIqKX+DZZQg+XzEnDHPqZf5X72IuJZ5s77M0hJhCDRB3K3sHYe7NQqES Z1L94IAzSRIzaxiO/uSL1mdZ+DRGDae/peqtnP7Iv8N/KchQ3TKp9L0sy xXvnUIYzuozGt7/OWKPLBlK15uIcSMkUZjIYUcZXzspulUvdtFgs7aNsM l5QV5xMYUtyJlMss5ACyoHtCD3g2PAOFt68JSxrtvYIQCTmApRkxyCwIH n2u23yaoD5lrI6YoGQ+lcK6h5QssdFEP8SOMTMN5AdLcqUbRB2+f3rpnT Oc+Qw5/Et9dIBu57UKp9BQhDUEAEUVYoPQcqeHdOSO65aEwbPg5QzUZbi g==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="288514988" X-IronPort-AV: E=Sophos;i="5.93,198,1654585200"; d="scan'208";a="288514988" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2022 05:50:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,198,1654585200"; d="scan'208";a="600855799" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga002.jf.intel.com with ESMTP; 28 Jul 2022 05:50:16 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 28 Jul 2022 05:50:15 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Thu, 28 Jul 2022 05:50:15 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Thu, 28 Jul 2022 05:50:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZkqkmmyvT9nzW4gR2Jz8u5u8GgTGTxwlHr6Pbc1NJTVfENSBI84svf9b0Eewzf1AQl1bVxKrzQ5iACLqVp4uhTRnttfO0ebKkhUztHY7F+/kPE2pxjU/DoOdCzAjC1IE4DZ3EVi+7SEBVGegbakYutO29hN/69SWkyRTrQ3g9oYdOQwJil/ez9BDq4/mfaqQnFI/DEfirCMHraPIpC+8AsZ3pGJ3jw0p9XpMkeeLnsXmmBxAbQtQXSKLO2ZsdyKSpq9shMYVJ+IWsvnwEIp4CGqvbNRdEHeo6Rt+PzjcxYoJp/o7vmcANwcxJugIx6BxglEqZw3k7jW0gHlBX6L2Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=62hmsDwDOVxp+VdI/BlBW150KVh7QPvksNLllR3gKXA=; b=ALgIs+Yac1YqL0dBifQtscgQVY/XTlk/hrL0ySyCyrPKsFLungbIRKr7gGKxwkGOKrWkD40sh6attu0e4zqydQxAy9UqlgdVLoil+3qQuzAOtzhaKgVHhw3Aems8XQIV711My/wwAtj19AryN/bpVF/wWQw+IOh6yco2K3V3fCoFiphUSQc5gKq8KSNPQ/ltljl0dO0jitj6YCSIj9jxOm9xEjOHN18V3kFn/ertPBdz4jjIpVrST0jVfSAxx2NzSyU83PHIZT+xbaZKJWa/753cE40AdHqk7zV7KWmJ5abB5bkQqLNvucC9utcu+1+VGGdHp4kwvX+ZAfyarBlMiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CY4PR11MB1863.namprd11.prod.outlook.com (2603:10b6:903:121::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.20; Thu, 28 Jul 2022 12:50:13 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fd61:b244:d8fb:ab1d]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fd61:b244:d8fb:ab1d%4]) with mapi id 15.20.5458.024; Thu, 28 Jul 2022 12:50:12 +0000 From: "Yao, Jiewen" To: "Zhang, Qi1" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Patil, Swapnil" Subject: Re: [PATCH v3] SecurityPkg: Add retry mechanism for tpm command Thread-Topic: [PATCH v3] SecurityPkg: Add retry mechanism for tpm command Thread-Index: AQHYol9pNFkqVh9ek0u+MM6i6XHY/K2TvDvg Date: Thu, 28 Jul 2022 12:50:12 +0000 Message-ID: References: <20220728085125.2202-1-qi1.zhang@intel.com> In-Reply-To: <20220728085125.2202-1-qi1.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 78ca08ef-3e09-4429-0839-08da7097b64b x-ms-traffictypediagnostic: CY4PR11MB1863:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NvG/pwK9cVRnMSp4kKD9lUuhW0TLOcENNe0emgN0QCqGszBaq/9OeztIzf3xaFHkhdj8wZ4Hhs7UO/jugGy4H7vjhnUYmC0/RgXtk8MjzV8Ky5oS08E7RB5BjjwCkxQsbju6TwdzraRUexGSu/O5X+1xDvyfeO2Dd0VMiqY8Ymm1j7C8yq/i8wr9iHAcnv6bmX1TXpSvKV7OR6Q/F0aPUPrC1qgC+Sw3sEogTNZli5hxQe3WXDa8ta03hCuZC/ApgFBvllTKxr+D3cJYeTpFUY/MTXipKxnzrCCe1rLjALxKT30+v/fQtRTxnRyZuF5TG1sLYpRaj/BC41YZB2NJk0vqlk7GnMHw9CGjWn3JLg260iZuyNBXx/b4XNG9qkNMw6EeLvanuZOIaBoaFmzbWhIXAopTnX+qWl9UehoqBuqxuEx5g/de76tjW0AvuZu4TwRUxuFU8s7u5tRtIfsKh8M/TQ2nGcpxhE2CYtN+ChymM9BfMPQGNrkuFju15IjvBp07pqpvXOPEEyjeOOXf/EZ5DCMhBEnQeZoLp5rH7pZesc0rVRPFcgAmiyVVf6ONWXjxltpY+4Mkaxklp85FMnBFkdXt4TKGS/k7StOhrGbx39MfcjbLpbw/QERQbteuSOQSrcCYw/8C5RweTy95i6WCe9WRHn2S3F40QtEMC6NxbbSjeU8LOOZY6DxZx0LtlX3tO32qhFK860K2vhgdy/rnJYt/CNWKjEvxllELIZWYY3EF8gex06b8zQ3gyJsfg/z+0FCk/fx2llJRurXCwUGiJyZGPpQXfRJQThM8KelVn8Y7oqwiW663JyntfSv5GKX6b3m/cnYnyM9xSADR7VyWrm6bno5jxiH6q9eoQlyMCPBrA1hj+5+e2NqUZHsi x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(346002)(376002)(396003)(366004)(136003)(2906002)(5660300002)(38070700005)(8676002)(4326008)(54906003)(8936002)(316002)(76116006)(110136005)(86362001)(6506007)(66946007)(64756008)(966005)(7696005)(478600001)(66476007)(19627235002)(26005)(66446008)(53546011)(71200400001)(52536014)(66556008)(41300700001)(15650500001)(55016003)(9686003)(33656002)(82960400001)(83380400001)(186003)(122000001)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2sDXyb3/YOiX++GHZoxsgjvxfJMYarvQ8GHBojNk4EScjT2u83eT6rvACehH?= =?us-ascii?Q?lPgDLUzsI/N5eX0RMB0FMJ7EjhStViipHyuKujSYofVhKDTB/4KSXlAX+1wA?= =?us-ascii?Q?3lMRLCn7Of3GWVKuiB987C2qpuDBEK/E3/3ivE2WW86ZNHtVRELPhTRvqoh/?= =?us-ascii?Q?xXAVr3fB/i8ZZqBSOaR4Idghazt4I/7UkufR3ZiaNtgkZaZu47iIsh26KfAA?= =?us-ascii?Q?ZiC15R9zgqmby/BOlOhGL8KHU2HfZBQnF5/0XnHxmzDOdnl8MOllqXwqd9Wn?= =?us-ascii?Q?CtqxKNt0+S6w9kCog+FYM0npFnRJSBmsrz3CuqsAXMFEDSo8HShgDAW439P8?= =?us-ascii?Q?w5Dv+NimwvrVgorhvDCVvWQ+IS82YzJduviEu/tWx//MwvK+lFQimkOFIdaJ?= =?us-ascii?Q?fWr6F/X3xqNrPpuQVd7njFh6Qo5homCA68EuPQyFH2p2CqrwYMQJ3OayeZE9?= =?us-ascii?Q?y5VHBkeeQ2t9Bh2TnOA5yMlYcIM/amarkIuDuGQD/9XTY91THcX61O8iZNL2?= =?us-ascii?Q?u/IoN4qqUbvjan/If4NXKN1RjACDD8Dv4qoFJFZF69pMBfSCQXQo0yzyASHY?= =?us-ascii?Q?kwzh5zDiH6Q6eeAwvGrq+bArT2Kmnc8NizM8h/3k+J8z4jSZ4E+T0GfIKqjs?= =?us-ascii?Q?tbOFweNTgo8qaI+zrKoxWd2wGKUxYzDKaF7P2hUN/aCEd17kVTF2wH6YxR/J?= =?us-ascii?Q?Lu80iRGO6DfOaaBOQuIl35XdwfXN496RqZGBhO6MLghALXwzBor7cKBn+FKq?= =?us-ascii?Q?OHrnh592JYj8Qvoe1ANp71oGvEXfOfn+u3v5iCM8HSQwnOU+xuSmKX9d3zTm?= =?us-ascii?Q?X/P1zcUTzsGR2T96j29rNmD8/3RvK6S73+gfi8SODAkRjeGwyzEZRsIVVVJY?= =?us-ascii?Q?nlhlckAggqul7ENweaknW0z+hsge89AO/X5wjMERYVsKez59KOKBg5/ozXQM?= =?us-ascii?Q?UKZx28lzBphWK6Y67gQiBeCDlrH8IT+8X9J/UZJOSJ0qFH9uzwugREH2o35t?= =?us-ascii?Q?EjEnhZ2EMb9NMTHnMHip+SeoaNWV2jsj6ZtOU4LB4nnjxqhLDgVZLpmfeKe7?= =?us-ascii?Q?oPRm3tOq5kXZJfYonqHOZlr/RRcq9BuOkzTVVBpI1HrAGfxfZMwg8nU0S2QO?= =?us-ascii?Q?SOYed46UvFLANlrvvi8eYa9d2f7ragjdn9fG6c73cIrREJpb6db72J7Jd6sg?= =?us-ascii?Q?9Ag4nuhlcnj6+VkmJ72VCJbxKdvnT3gUtfwSJOR/RaGZc73NVruqgVg77UYk?= =?us-ascii?Q?EAtT9Z/cXSvjSlqCPnxwS++RVJHA+rgTOChQ0BwDMNSOhEHAMEDRQ/SFKKfQ?= =?us-ascii?Q?ihZDWHn8Mz9piHpAZh89GUOr6kPRCfBz986kCRCqTXjp9SUE7n9tBjRaCqVk?= =?us-ascii?Q?Ow+djSg5LRHNjUJovUkuMSPjoROGP/grERoXwVxBEieqg34Nfijug9huQOBH?= =?us-ascii?Q?qt3IGOBSYTz4ea6ImU1FuSqERZzc82DnsnJYEiDEDXbj7onNg/6srnRRS+No?= =?us-ascii?Q?Qx+5VXri0IQaLq9m4fHRQEBPKjwzWGSGKsUpr1eRZ7BtsNS3JGLT8tcUH9A6?= =?us-ascii?Q?tzu1m9DUpWziat3zI3hh3TzZjDmIPivWo+KEVZU9?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78ca08ef-3e09-4429-0839-08da7097b64b X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2022 12:50:12.6777 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wXAcHzHXxjkDuBWLj7G1yltWMx10JShRS6I0bDXb25MLeF18Pb9/JEah7eGWHrmZ/5FpleZ8YW2LnVty+RiHRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1863 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey Please add the spec related info to the code as comments. Thank you Yao, Jiewen > -----Original Message----- > From: Zhang, Qi1 > Sent: Thursday, July 28, 2022 4:51 PM > To: devel@edk2.groups.io > Cc: Zhang, Qi1 ; Yao, Jiewen ; > Wang, Jian J ; Patil, Swapnil > > Subject: [PATCH v3] SecurityPkg: Add retry mechanism for tpm command >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3980 >=20 > As per TCG PC Client Device Driver Design Principle document, > if tpm commands fails due to timeout condition, then it should > have retry mechanism (3 retry attempts). > Existing implementation of PtpCrbTpmCommand does not have retry > mechanism if it fails with EFI_TIMEOUT. >=20 > See TCG PC Client Device Driver Design Principles for TPM 2.0 > https://trustedcomputinggroup.org/wp- > content/uploads/TCG_PCClient_Device_Driver_Design_Principles_TPM2p0_v1p1 > _r4_211104_final.pdf > Vision 1.1, Revision 0.04 > Section 7.2.1 >=20 > Signed-off-by: Qi Zhang > Cc: Jiewen Yao > Cc: Jian J Wang > Reviewed-by: Jiewen Yao > Tested-by: Swapnil Patil > --- > .../Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 107 +++++++++++------- > 1 file changed, 68 insertions(+), 39 deletions(-) >=20 > diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c > b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c > index 1d99beaa10..6b5994fde2 100644 > --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c > +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c > @@ -33,6 +33,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > // >=20 > #define TPMCMDBUFLENGTH 0x500 >=20 >=20 >=20 > +// >=20 > +// Max retry count >=20 > +// >=20 > +#define RETRY_CNT_MAX 3 >=20 > + >=20 > /** >=20 > Check whether TPM PTP register exist. >=20 >=20 >=20 > @@ -153,6 +158,7 @@ PtpCrbTpmCommand ( > UINT32 TpmOutSize; >=20 > UINT16 Data16; >=20 > UINT32 Data32; >=20 > + UINT8 RetryCnt; >=20 >=20 >=20 > DEBUG_CODE_BEGIN (); >=20 > UINTN DebugSize; >=20 > @@ -179,53 +185,76 @@ PtpCrbTpmCommand ( > DEBUG_CODE_END (); >=20 > TpmOutSize =3D 0; >=20 >=20 >=20 > - // >=20 > - // STEP 0: >=20 > - // if CapCRbIdelByPass =3D=3D 0, enforce Idle state before sending com= mand >=20 > - // >=20 > - if ((GetCachedIdleByPass () =3D=3D 0) && ((MmioRead32 ((UINTN)&CrbReg- > >CrbControlStatus) & PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE) =3D=3D 0)) { >=20 > + RetryCnt =3D 0; >=20 > + while (TRUE) { >=20 > + // >=20 > + // STEP 0: >=20 > + // if CapCRbIdelByPass =3D=3D 0, enforce Idle state before sending c= ommand >=20 > + // >=20 > + if ((GetCachedIdleByPass () =3D=3D 0) && ((MmioRead32 ((UINTN)&CrbRe= g- > >CrbControlStatus) & PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE) =3D=3D 0)) { >=20 > + Status =3D PtpCrbWaitRegisterBits ( >=20 > + &CrbReg->CrbControlStatus, >=20 > + PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE, >=20 > + 0, >=20 > + PTP_TIMEOUT_C >=20 > + ); >=20 > + if (EFI_ERROR (Status)) { >=20 > + RetryCnt++; >=20 > + if (RetryCnt < RETRY_CNT_MAX) { >=20 > + MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, > PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE); >=20 > + continue; >=20 > + } else { >=20 > + // >=20 > + // Try to goIdle to recover TPM >=20 > + // >=20 > + Status =3D EFI_DEVICE_ERROR; >=20 > + goto GoIdle_Exit; >=20 > + } >=20 > + } >=20 > + } >=20 > + >=20 > + // >=20 > + // STEP 1: >=20 > + // Ready is any time the TPM is ready to receive a command, followin= g a > write >=20 > + // of 1 by software to Request.cmdReady, as indicated by the Status = field >=20 > + // being cleared to 0. >=20 > + // >=20 > + MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, > PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY); >=20 > Status =3D PtpCrbWaitRegisterBits ( >=20 > - &CrbReg->CrbControlStatus, >=20 > - PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE, >=20 > + &CrbReg->CrbControlRequest, >=20 > 0, >=20 > + PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY, >=20 > PTP_TIMEOUT_C >=20 > ); >=20 > if (EFI_ERROR (Status)) { >=20 > - // >=20 > - // Try to goIdle to recover TPM >=20 > - // >=20 > - Status =3D EFI_DEVICE_ERROR; >=20 > - goto GoIdle_Exit; >=20 > + RetryCnt++; >=20 > + if (RetryCnt < RETRY_CNT_MAX) { >=20 > + MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, > PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE); >=20 > + continue; >=20 > + } else { >=20 > + Status =3D EFI_DEVICE_ERROR; >=20 > + goto GoIdle_Exit; >=20 > + } >=20 > } >=20 > - } >=20 >=20 >=20 > - // >=20 > - // STEP 1: >=20 > - // Ready is any time the TPM is ready to receive a command, following = a write >=20 > - // of 1 by software to Request.cmdReady, as indicated by the Status fi= eld >=20 > - // being cleared to 0. >=20 > - // >=20 > - MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, > PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY); >=20 > - Status =3D PtpCrbWaitRegisterBits ( >=20 > - &CrbReg->CrbControlRequest, >=20 > - 0, >=20 > - PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY, >=20 > - PTP_TIMEOUT_C >=20 > - ); >=20 > - if (EFI_ERROR (Status)) { >=20 > - Status =3D EFI_DEVICE_ERROR; >=20 > - goto GoIdle_Exit; >=20 > - } >=20 > + Status =3D PtpCrbWaitRegisterBits ( >=20 > + &CrbReg->CrbControlStatus, >=20 > + 0, >=20 > + PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE, >=20 > + PTP_TIMEOUT_C >=20 > + ); >=20 > + if (EFI_ERROR (Status)) { >=20 > + RetryCnt++; >=20 > + if (RetryCnt < RETRY_CNT_MAX) { >=20 > + MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, > PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE); >=20 > + continue; >=20 > + } else { >=20 > + Status =3D EFI_DEVICE_ERROR; >=20 > + goto GoIdle_Exit; >=20 > + } >=20 > + } >=20 >=20 >=20 > - Status =3D PtpCrbWaitRegisterBits ( >=20 > - &CrbReg->CrbControlStatus, >=20 > - 0, >=20 > - PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE, >=20 > - PTP_TIMEOUT_C >=20 > - ); >=20 > - if (EFI_ERROR (Status)) { >=20 > - Status =3D EFI_DEVICE_ERROR; >=20 > - goto GoIdle_Exit; >=20 > + break; >=20 > } >=20 >=20 >=20 > // >=20 > -- > 2.26.2.windows.1