From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=CenPhrWY; spf=pass (domain: arm.com, ip: 40.107.8.53, mailfrom: alexei.fedorov@arm.com) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.53]) by groups.io with SMTP; Fri, 23 Aug 2019 04:53:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ml7g0mqih+wb0j1TNey++PfaU/cdlCddnmveiISu5N0=; b=CenPhrWYeWuUeqL1qZJLwLhE8igLK7TGftlKl79bAL7UIpi8/4HPGLYU2A3kh/Wi0QCGCIDC9ukXv8QcP21VuqWpky/76F1NRXVEAUId9HPEVuYOho383pYWkSJp0TSklgLRmu/dgg+AEHnsfJ9tFct2aLJq/L9CFfvdsns47/E= Received: from VI1PR0802CA0018.eurprd08.prod.outlook.com (2603:10a6:800:aa::28) by AM6SPR01MB14.eurprd08.prod.outlook.com (2603:10a6:209:3c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 11:53:05 +0000 Received: from VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::203) by VI1PR0802CA0018.outlook.office365.com (2603:10a6:800:aa::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 11:53:05 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT053.mail.protection.outlook.com (10.152.19.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 11:53:04 +0000 Received: ("Tessian outbound 4f2e8f9f1994:v27"); Fri, 23 Aug 2019 11:53:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2c4a83c77b19552f X-CR-MTA-TID: 64aa7808 Received: from 903471a59576.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.4.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 772BEB39-6767-45F2-8D5C-7AB067CFCDA0.1; Fri, 23 Aug 2019 11:52:59 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2051.outbound.protection.outlook.com [104.47.4.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 903471a59576.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 11:52:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OqSGvkfQ656Iv3CKoHmrWEOmFYq+JvRH2D8s/DrdA0/GmlvCNQ4pz43VT2lHs1FY2ZG2JKaWxB7yhchzJdkuIJJzpHYZYw2t1bxviqEeO1eJtILdSDC2mMpvKfVY71u/lsA7Q96yAF/2PFoIEJEbPMnjTQTNR3eOKOagrmeyswAP77Q1INE9O95UOxLu8FzjSCpsUG8hPit99UoEYqWZ7PGwwN+4cgYVskVZoRBNSFzRki17oz0pSI4pHDaSUQuKBQfMnGyw9QTmog+nMQuV+bJcp8ZLuaz8o459Z/hyXWxb56QY3F4X9kho9WAND8j8J5dtbXd0M6y43pd+HI0DHg== 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-SenderADCheck; bh=7yyW3CoxYBi6WEI35J7WiSMbhYs2I5e8rw2gW1h3nCU=; b=FT19mTBZxY/thxjXxJeuDRxXuQtloLa/5i1u8+gGGh8bFVJ8PFSlCPTfWADWsS98LwemuPvyaLixOSyPgYkMurJ3hlUxecvtPhrPPLfuP5u3MnHllLGR0zCKYLpwFL/TTVv2c6pWipHB3fGg1Ic+rbHW5ktPENfVNEJYo+TkBs75uR8tNVdiJuB+Bey5RnpHbG3JgYInzmOIEX/lNYCsXJMnd9JqIhuVVSWP5M4DOeTO1HdFUXCQc2ze9LvrTV78TsNstEc8IcAKmUoSFzmby22Nyys7IoEo7t7nvLzwz3XIAnms3d8eoJbouM15ZKfE5bkxwBHco98OjJ4c9oX8dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7yyW3CoxYBi6WEI35J7WiSMbhYs2I5e8rw2gW1h3nCU=; b=bYBuexdc1+ryrBDWGVLelpmVXfThRqmtNP+lEcY2sZcav1o8BA+jWUGSlywTblUdFntOLZYF3XECfZU6n98IlSwoCMkswRtuy8KZWUz7nTQYvSpPRUlgAnm0aSq/a3gfSOIHcOH2q7AQoNOA0jyaHD9AadVewrpHyFKV8yJQ1oA= Received: from AM5PR0801MB1732.eurprd08.prod.outlook.com (10.169.244.21) by AM5PR0801MB1906.eurprd08.prod.outlook.com (10.168.156.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 11:52:58 +0000 Received: from AM5PR0801MB1732.eurprd08.prod.outlook.com ([fe80::50d7:cef5:ee39:2e83]) by AM5PR0801MB1732.eurprd08.prod.outlook.com ([fe80::50d7:cef5:ee39:2e83%9]) with mapi id 15.20.2178.020; Fri, 23 Aug 2019 11:52:58 +0000 From: "Alexei Fedorov" To: "devel@edk2.groups.io" , Sami Mujawar Subject: Re: [edk2-devel] [PATCH v1 06/19] DynamicTablesPkg: Fix GT Block length assignment Thread-Topic: [edk2-devel] [PATCH v1 06/19] DynamicTablesPkg: Fix GT Block length assignment Thread-Index: AQHVWaGJ1q8kS+3mF0aADbsaAZYJhqcIn00M Date: Fri, 23 Aug 2019 11:52:58 +0000 Message-ID: References: <20190823105539.13260-1-sami.mujawar@arm.com>,<20190823105539.13260-7-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-7-sami.mujawar@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alexei.Fedorov@arm.com; x-originating-ip: [217.140.106.49] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 59fcd039-1e5b-4be4-602d-08d727c0751c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:AM5PR0801MB1906; X-MS-TrafficTypeDiagnostic: AM5PR0801MB1906:|AM6SPR01MB14: X-MS-Exchange-PUrlCount: 3 x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:415;OLM:415; x-forefront-prvs: 0138CD935C X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(346002)(396003)(136003)(376002)(39860400002)(366004)(189003)(199004)(76176011)(19627405001)(26005)(2501003)(9686003)(66066001)(186003)(3846002)(102836004)(25786009)(105004)(6116002)(2906002)(55016002)(99286004)(66946007)(476003)(14444005)(53546011)(7696005)(446003)(76116006)(236005)(66446008)(478600001)(256004)(966005)(11346002)(66476007)(66556008)(64756008)(8936002)(8676002)(53936002)(52536014)(606006)(6636002)(229853002)(486006)(33656002)(6506007)(81166006)(74316002)(6246003)(6306002)(316002)(7736002)(71190400001)(71200400001)(54896002)(5660300002)(81156014)(86362001)(110136005)(14454004)(6436002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0801MB1906;H:AM5PR0801MB1732.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: quhobeYgQKd8pn3AgJImGlwiXpU4vWW4FxJEx5kMmuFuhAepUuKQ51BjidrQCOJFBH3Y3RBVghrjce7gGoH1/53a6Y9EMiNnqsoVAx8IUTZL4Nt11oSTsqsGEqmrYESpJMFknD9Ul1NQw61RCBVPU6CCKzac/3VBGeGA5MohUDEfOrUNtBZI6gcuz8r/Qn27Tk33YBtLg2UdMqMqLaEDtnaGhd9MxzqW7z1blD3w8vGbiqkgqv4QMwLcNlDOlFgGEea+AgBadZt6gqYPqSXe2RY7pAmThBzuJNtB/dEoCeekBCuWq2yQMhy4/vfM7KqxRTGVbGlvyHgKKUXQ+OwfTL1k2InoPjoazSANLpom0ZcLaeuyBwAIJC77wh+hdIoqQKTK2bniKUi/eqHCGIiXah93nXIlCntPAJWXQRKew+k= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1906 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alexei.Fedorov@arm.com; Return-Path: Alexei.Fedorov@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(396003)(346002)(136003)(376002)(2980300002)(199004)(40434004)(189003)(8936002)(316002)(186003)(52536014)(486006)(76130400001)(55016002)(476003)(54896002)(7736002)(6246003)(446003)(6306002)(63370400001)(66066001)(63350400001)(6636002)(74316002)(6116002)(478600001)(236005)(966005)(36906005)(53546011)(9686003)(25786009)(22756006)(126002)(11346002)(6506007)(26005)(70586007)(70206006)(33656002)(86362001)(26826003)(336012)(105004)(8676002)(3846002)(19627405001)(5660300002)(102836004)(5024004)(14454004)(99286004)(356004)(76176011)(229853002)(7696005)(71190400001)(81156014)(606006)(81166006)(16586007)(110136005)(14444005)(2501003)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6SPR01MB14;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:TempError;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;A:1;MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 3cea00a5-a809-46e6-3acd-08d727c07140 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(710020)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:AM6SPR01MB14; X-Forefront-PRVS: 0138CD935C X-Microsoft-Antispam-Message-Info: R4RtIBuTcy/1FXWlOHvjy6M697DjDnHzeMf7NpTjn3NDj2oEOGuYWDv4pvhJgamEh+2jf1eX7FAXrBgholrtGc/dqPTuKpS4PaDzwf9nXh+lQitjvAe85D/KpyXv9FTdT4E+Ht26x1UwQs+YSDU6/CR26FT5jF3GmBCVN13ADUcXGFdVi49clomj3ScX0QjM9hPAB8cVj2jNyHoYaI8a3XYNXk74br6hd7wDoIGKEj7Fkf1ZIPMN3nDm4N+nKS6US+IktHsP5g8KI/+qWfwpxjQmBOGChaSgY6ywGepQgQw95bYaNFh3HhFdodMwVthDxSa1zdt/6y2B9zgr3FUwTV+5f1KxL1iukLE+SX2TJCcrfcnPq+lr1mQYsCFEFHl4tY8nZkFMbz6C3GgBPkQ42hzuL/uvXCTGzd15bJhCKWg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 11:53:04.6551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59fcd039-1e5b-4be4-602d-08d727c0751c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6SPR01MB14 Content-Language: en-GB Content-Type: multipart/alternative; boundary="_000_AM5PR0801MB1732467498102750B2F121CE9AA40AM5PR0801MB1732_" --_000_AM5PR0801MB1732467498102750B2F121CE9AA40AM5PR0801MB1732_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Alexei Fedorov Alexei ________________________________ From: devel@edk2.groups.io on behalf of Sami Mujawa= r via Groups.Io Sent: 23 August 2019 11:55 To: devel@edk2.groups.io Cc: Sami Mujawar ; ard.biesheuvel@linaro.org ; leif.lindholm@linaro.org ; = Matteo Carlini ; Stephanie Hughes-Fitt ; nd Subject: [edk2-devel] [PATCH v1 06/19] DynamicTablesPkg: Fix GT Block leng= th assignment The VS2017 compiler reports 'warning C4267: '=3D': conversion from 'size_t' to 'UINT16', possible loss of data'. The sizeof() operator is used to calculate the size of the GT Block structure. The length field in the GT Block structure is 16-bit wide. Since the return type of sizeof() operator is size_t the VS2017 compiler reports the above warning. To fix the warning, an explicit type cast is added. An additional check is also performed to ensure that the calculated GT Block length does not exceed MAX_UINT16. Signed-off-by: Sami Mujawar --- DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 25 +++= +++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerato= r.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index 7e86c30649bd36ecebac75c7e3a86a0c25cd590b..0e996698887aefca8a7240fc27= fe3cb9324fd3e2 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -350,6 +350,7 @@ AddGTBlockList ( EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE * GtBlockFrame; CM_ARM_GTBLOCK_TIMER_FRAME_INFO * GTBlockTimerFrameList; UINT32 GTBlockTimerFrameCount; + UINTN Length; ASSERT (Gtdt !=3D NULL); ASSERT (GTBlockInfo !=3D NULL); @@ -376,11 +377,27 @@ AddGTBlockList ( return Status; } + Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE) + + (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE) * + GTBlockInfo->GTBlockTimerFrameCount); + + // Check that the length of the GT block does not + // exceed MAX_UINT16 + if (Length > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: GTDT: Too many GT Frames. Count =3D %d. " \ + "Maximum supported GT Block size exceeded. " \ + "Status =3D %r\n", + GTBlockInfo->GTBlockTimerFrameCount, + Status + )); + return Status; + } + GTBlock->Type =3D EFI_ACPI_6_3_GTDT_GT_BLOCK; - GTBlock->Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE) + - (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTU= RE) * - GTBlockInfo->GTBlockTimerFrameCount); - + GTBlock->Length =3D (UINT16)Length; GTBlock->Reserved =3D EFI_ACPI_RESERVED_BYTE; GTBlock->CntCtlBase =3D GTBlockInfo->GTBlockPhysicalAddress; GTBlock->GTBlockTimerCount =3D GTBlockInfo->GTBlockTimerFrameCount; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you. --_000_AM5PR0801MB1732467498102750B2F121CE9AA40AM5PR0801MB1732_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>

Alexei


From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Sami Mujawar via Groups.Io <s= ami.mujawar=3Darm.com@groups.io>
Sent: 23 August 2019 11:55
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; ard.biesheuvel@linar= o.org <ard.biesheuvel@linaro.org>; leif.lindholm@linaro.org <leif.= lindholm@linaro.org>; Matteo Carlini <Matteo.Carlini@arm.com>; Ste= phanie Hughes-Fitt <Stephanie.Hughes-Fitt@arm.com>; nd <nd@arm.com= >
Subject: [edk2-devel] [PATCH v1 06/19] DynamicTablesPkg: Fix GT Blo= ck length assignment
 
The VS2017 compiler reports 'warning C4267: '=3D'= : conversion from
'size_t' to 'UINT16', possible loss of data'.

The sizeof() operator is used to calculate the size of the
GT Block structure. The length field in the GT Block structure
is 16-bit wide. Since the return type of sizeof() operator
is size_t the VS2017 compiler reports the above warning.

To fix the warning, an explicit type cast is added. An additional
check is also performed to ensure that the calculated GT Block
length does not exceed MAX_UINT16.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
 DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 2= 5 ++++++++++++++= 3;+----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerato= r.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
index 7e86c30649bd36ecebac75c7e3a86a0c25cd590b..0e996698887aefca8a7240fc27= fe3cb9324fd3e2 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGen= erator.c
@@ -350,6 +350,7 @@ AddGTBlockList (
   EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE  * GtBlockFra= me;
   CM_ARM_GTBLOCK_TIMER_FRAME_INFO     =         * GTBlockTimerFrameList;
   UINT32         &= nbsp;           &nbs= p;            &= nbsp;     GTBlockTimerFrameCount;
+  UINTN         &nb= sp;            =             &nb= sp;      Length;
 
   ASSERT (Gtdt !=3D NULL);
   ASSERT (GTBlockInfo !=3D NULL);
@@ -376,11 +377,27 @@ AddGTBlockList (
       return Status;
     }
 
+    Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRU= CTURE) +
+           &nb= sp;   (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE) *
+           &nb= sp;    GTBlockInfo->GTBlockTimerFrameCount);
+
+    // Check that the length of the GT block does not<= br> +    // exceed MAX_UINT16
+    if (Length > MAX_UINT16) {
+      Status =3D EFI_INVALID_PARAMETER;
+      DEBUG ((
+        DEBUG_ERROR,
+        "ERROR: GTDT: Too man= y GT Frames. Count =3D %d. " \
+        "Maximum supported GT= Block size exceeded. " \
+        "Status =3D %r\n"= ;,
+        GTBlockInfo->GTBlockTim= erFrameCount,
+        Status
+        ));
+      return Status;
+    }
+
     GTBlock->Type =3D EFI_ACPI_6_3_GTDT_GT_BLOCK;<= br> -    GTBlock->Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT_BL= OCK_STRUCTURE) +
-            &= nbsp;           (sizeof (= EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE) *
-            &= nbsp;           &nbs= p; GTBlockInfo->GTBlockTimerFrameCount);
-
+    GTBlock->Length =3D (UINT16)Length;
     GTBlock->Reserved =3D EFI_ACPI_RESERVED_BYTE;<= br>      GTBlock->CntCtlBase =3D GTBlockInfo->GTBloc= kPhysicalAddress;
     GTBlock->GTBlockTimerCount =3D GTBlockInfo->= ;GTBlockTimerFrameCount;
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'





IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in any medium. Thank you. --_000_AM5PR0801MB1732467498102750B2F121CE9AA40AM5PR0801MB1732_--