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=1Wse82o+; spf=pass (domain: arm.com, ip: 40.107.2.83, mailfrom: sami.mujawar@arm.com) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.83]) by groups.io with SMTP; Mon, 10 Jun 2019 11:59:17 -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=/gc7Vn8n/cziURWh/6TPZ6Qz6F+n0YgNjOVdkqLKssQ=; b=1Wse82o+FXqc4hjzoKO/7MJ7qYN4HLct/A+gEIsw23XL4MIbWNU9rrFfP8AqwNwjCwXr4QL6mkFday2CoJdr00XFHf5tRpmRU1DzLtSjj4nsAfZZWOVAxK3MSiDkVih2zDUmCKAFHuUre/ACAZIFETPDCmf/nJA0NKmASKY8Whs= Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) by DB6PR0802MB2534.eurprd08.prod.outlook.com (10.172.246.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.12; Mon, 10 Jun 2019 18:59:14 +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 18:59:14 +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: AQHVBacXwDR6kzJKK0Gov2MatMT49qaVcZGQ Date: Mon, 10 Jun 2019 18:59:14 +0000 Message-ID: References: <20190508140503.51808-1-krzysztof.koch@arm.com> In-Reply-To: <20190508140503.51808-1-krzysztof.koch@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: bdfe495b-d271-492d-98cc-4ba6ccf0cf4d.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: 5e74d141-11d9-4c52-780c-08d6edd5bb5c 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:DB6PR0802MB2534; x-ms-traffictypediagnostic: DB6PR0802MB2534: x-ms-exchange-purlcount: 1 nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0064B3273C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(39860400002)(366004)(346002)(376002)(396003)(13464003)(199004)(189003)(8936002)(8676002)(316002)(86362001)(72206003)(478600001)(7696005)(966005)(6306002)(81166006)(1730700003)(81156014)(6506007)(229853002)(53546011)(2501003)(76176011)(102836004)(2906002)(5660300002)(256004)(14444005)(74316002)(71190400001)(25786009)(6916009)(14454004)(53936002)(4326008)(6246003)(52536014)(11346002)(446003)(476003)(68736007)(71200400001)(66946007)(73956011)(26005)(486006)(186003)(66066001)(2351001)(64756008)(66446008)(66556008)(6436002)(5640700003)(33656002)(7736002)(76116006)(99286004)(55016002)(66476007)(305945005)(9686003)(3846002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2534;H:DB6PR0802MB2375.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: 6KtuRlvvwaesb8Y++t6Daqa8hQJEI6gufuFUoWc+mTB+n65+XbIq6yuZrR6ujkPSEZTWSNgPZExg8PzklrYlF/iJbhYIB5YORco2muA5j52GkR3X4pIuKoPDVjIf0bj/9zg6Ac6gaZft204CBv6SK8DoPZL324R9gXxproX8C4/0d5NpprE5lsCP+1KsMfC6423HF0/Z9ctbjoyXotX6dZEAvob9F9uWFAass73NQJpfy72zHZv7ej2GIM8m+plVLUZ+/vswmmmQbH/Gfju998kaSShCEHE6QccT0FPCFbnFWaQDAzzR9VHjqErHXtPifYiPV1YJSehXsGXKIyDYp8R+sbgbazfAsc6YTXm8407cGpFxIHPebL3uRfhacvNjVqf8nw6s3CurOxQHX3YVskZVD0FCBA1U0DQ6HbmI7Xk= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e74d141-11d9-4c52-780c-08d6edd5bb5c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2019 18:59:14.5669 (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: DB6PR0802MB2534 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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)'