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=jrtqF8by; spf=pass (domain: arm.com, ip: 40.107.2.85, mailfrom: sami.mujawar@arm.com) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.85]) by groups.io with SMTP; Mon, 10 Jun 2019 12:41:09 -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=RXi+S7uu23U+y+gmydgCzPJPCTh7uzioJqT2eYwbrtM=; b=jrtqF8bybUSewmYQ8TNa+85KHAMjTcPZTeZ6Fr7x/N+jO0w/Mf44dGAMpo1hFwx3cOQ4N1ECWBse+L+l4tMyKydhcfBXqQaa7jNF24E2fA/tD9B6UdkxlZEoaO75snWBDQqfUJ6FcEs7Wv5BifyQfIAmfLEUXVJTvuH+XYoe+l4= Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) by DB6PR0802MB2213.eurprd08.prod.outlook.com (10.172.227.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Mon, 10 Jun 2019 19:41:06 +0000 Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com ([fe80::a46c:aa3a:17bf:7909]) by DB6PR0802MB2375.eurprd08.prod.outlook.com ([fe80::a46c:aa3a:17bf:7909%3]) with mapi id 15.20.1965.017; Mon, 10 Jun 2019 19:41:06 +0000 From: "Sami Mujawar" To: "devel@edk2.groups.io" CC: nd Subject: Re: [PATCH v1 1/1] DynamicTablesPkg: Add frame number validation to GTDT generator Thread-Topic: [PATCH v1 1/1] DynamicTablesPkg: Add frame number validation to GTDT generator Thread-Index: AQHVBacXwDR6kzJKK0Gov2MatMT49qaVcZGQgAALzDA= Date: Mon, 10 Jun 2019 19:41:06 +0000 Message-ID: References: <20190508140503.51808-1-krzysztof.koch@arm.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: d6b461a0-7fdf-4713-8f4d-4176a128daa0.1 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Sami.Mujawar@arm.com; x-originating-ip: [217.140.106.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4df22fe6-b185-45e5-5409-08d6eddb945c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB6PR0802MB2213; x-ms-traffictypediagnostic: DB6PR0802MB2213: x-ms-exchange-purlcount: 1 nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0064B3273C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(376002)(396003)(346002)(366004)(39860400002)(13464003)(189003)(199004)(53936002)(25786009)(33656002)(26005)(66066001)(66446008)(186003)(2906002)(316002)(102836004)(7696005)(99286004)(73956011)(66946007)(66476007)(76116006)(64756008)(66556008)(305945005)(9686003)(52536014)(6306002)(53546011)(76176011)(7736002)(55016002)(6506007)(478600001)(74316002)(6116002)(5660300002)(2940100002)(966005)(3846002)(8676002)(72206003)(68736007)(81166006)(81156014)(476003)(229853002)(5640700003)(1730700003)(6436002)(11346002)(486006)(446003)(2351001)(6246003)(6916009)(86362001)(2501003)(8936002)(14454004)(4326008)(14444005)(71200400001)(71190400001)(256004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2213;H:DB6PR0802MB2375.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: Xddy0TkyPrwRXq/RdSl/3AMkzRarQDHajHW50GGM7P5qnkZ0SwA1aZzbkZY+nwIS9ohFmNCvfR41r4o7L7Zlwjvdhw6GQn4zLXR23H/jiMUZvOF+92IlBRCwN0nknjEz5V24ZXtjk+/ZSqAl1DukvHMC4cv6LuedKqs33QuvEf5dR8m0vsmS4k5U/rHIhdl1diFu6vRu5M1mVyS3OAf3S7Juc2TN/TjG9RCr//Nua9uqDEJmopVXgz3TX2AmIt5/zSzC/IQRR+5O5bTiuUpOQ/cBuUXc+7wMnPUiSzOWgfrjSb1ZoS+zYbwUa78vYt8hWlNjTkfcEc885mXRTUCvaiMYRrisaKBo2j7d67dmC3O7/lBIu7JTlz8Af9bCNhQ3LWahdVL4yKb9jhzL/9WfP4AseYGW/5rSmVKh/Wmaz1U= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4df22fe6-b185-45e5-5409-08d6eddb945c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2019 19:41:06.1442 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2213 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed as 98f98eb440d6..75bf10a68914 -----Original Message----- From: Sami Mujawar=20 Sent: 10 June 2019 07:59 PM To: devel@edk2.groups.io Cc: nd Subject: RE: [PATCH v1 1/1] DynamicTablesPkg: Add frame number validation t= o GTDT generator Reviewed-by: Sami Mujawar -----Original Message----- From: Krzysztof Koch =20 Sent: 08 May 2019 03:05 PM To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org; Sami Mujawar ; Alexei = Fedorov ; Girish Pathak ; Pi= erre Gondois ; Matteo Carlini ; Stephanie Hughes-Fitt ; nd Subject: [PATCH v1 1/1] DynamicTablesPkg: Add frame number validation to GT= DT generator Added code to check if the Generic Timer Block Structure's frame number pro= vided by the platform repository is within the allowed range (0-7). References: - ACPI 6.2 Errata A, Table 5-122, September 2017 Signed-off-by: Krzysztof Koch --- The changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/woa= _522_gt_frame_number_validate_v1 Notes: v1: - Add GTDT Frame Number validation [Krzysztof] DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 9 +++++= ++++ 1 file changed, 9 insertions(+) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index 8d9ddcf9244b9f8b795edf7a53dd8a071bb121bc..543e6f442f2ab93bc7c9cd5e563= d305c0f400060 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -218,6 +218,15 @@ AddGTBlockTimerFrames ( GtBlockFrame )); =20 + if (GTBlockTimerFrameList->FrameNumber >=3D 8) { + DEBUG (( + DEBUG_ERROR, + "ERROR: GTDT: Frame number %d is not in the range 0-7\n", + GTBlockTimerFrameList->FrameNumber + )); + return EFI_INVALID_PARAMETER; + } + GtBlockFrame->GTFrameNumber =3D GTBlockTimerFrameList->FrameNumber; GtBlockFrame->Reserved[0] =3D EFI_ACPI_RESERVED_BYTE; GtBlockFrame->Reserved[1] =3D EFI_ACPI_RESERVED_BYTE; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'