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=uv3h1lfH; spf=pass (domain: arm.com, ip: 40.107.7.82, mailfrom: alexei.fedorov@arm.com) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.82]) by groups.io with SMTP; Tue, 11 Jun 2019 01:44:15 -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=CNHP14HT+Y2oFyKdBvrBa5KthuQ6nO6C9EvO0W/cKvk=; b=uv3h1lfHota05T50SaAErO++6ENYCFqB6DQ13N17DxCOBD/avzzGS7A3Di3TFHD5XM9TK3IkAJXQC6Vy9VUbEYTQe6tHvhDsB+9C4J0uaAklPDQvV865dZnaURjDtcqTKbbHSRsFyH/jCqIwonbkwrDhewWgT75cqu9CgUulmdk= Received: from VI1PR0801MB1743.eurprd08.prod.outlook.com (10.168.64.145) by VI1PR0801MB2077.eurprd08.prod.outlook.com (10.173.74.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.12; Tue, 11 Jun 2019 08:44:11 +0000 Received: from VI1PR0801MB1743.eurprd08.prod.outlook.com ([fe80::edba:e8eb:22b1:4582]) by VI1PR0801MB1743.eurprd08.prod.outlook.com ([fe80::edba:e8eb:22b1:4582%9]) with mapi id 15.20.1965.017; Tue, 11 Jun 2019 08:44:11 +0000 From: Alexei.Fedorov@arm.com To: Pierre Gondois , "devel@edk2.groups.io" CC: Sami Mujawar , Matteo Carlini , Stephanie Hughes-Fitt , nd Subject: Re: [PATCH v1 1/1] DynamicTablesPkg: GTDT updates for ACPI 6.3 Thread-Topic: [PATCH v1 1/1] DynamicTablesPkg: GTDT updates for ACPI 6.3 Thread-Index: AQHVHEktOs9B6BS+eEKx3KBkKWWB6KaWKsWJ Date: Tue, 11 Jun 2019 08:44:11 +0000 Message-ID: References: <20190606092057.28676-1-pierre.gondois@arm.com> In-Reply-To: <20190606092057.28676-1-pierre.gondois@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexei.Fedorov@arm.com; x-originating-ip: [217.140.106.50] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1386037d-08d1-4950-0889-08d6ee48fa09 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:VI1PR0801MB2077; x-ms-traffictypediagnostic: VI1PR0801MB2077: x-ms-exchange-purlcount: 1 nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 006546F32A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(366004)(376002)(39850400004)(396003)(189003)(199004)(6506007)(33656002)(53546011)(105004)(6246003)(74316002)(5660300002)(86362001)(8676002)(102836004)(7696005)(66446008)(14454004)(2906002)(6116002)(99286004)(76176011)(19627405001)(3846002)(66476007)(11346002)(446003)(73956011)(81166006)(8936002)(72206003)(486006)(81156014)(66946007)(186003)(26005)(66556008)(64756008)(76116006)(478600001)(476003)(6306002)(110136005)(606006)(7736002)(53936002)(52536014)(54906003)(14444005)(66066001)(256004)(9686003)(6436002)(54896002)(229853002)(71200400001)(55016002)(4326008)(15650500001)(71190400001)(2501003)(966005)(316002)(68736007)(25786009)(236005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0801MB2077;H:VI1PR0801MB1743.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: aPwVzWcHwRFZXeYfcdmpFXV+vMU6bubmNMb6XJXFuJZrBbag44mvqFsK0X8+loqr77VijhyIcJe4RgwSv1/cd2+xDfWlyb4Cq3irixilbK8IeHDOc9xEfIf+K8MHM1o2w8LXWnniy7xZJwEhZZBfwTYWe1WiTat5CB/3k9u6VNJqUf+GWXmjEFKNrLpiawb/6ySKFmWgbQCqSmkZBbqHd0abDnGelrUsYqSH3pGyel6qratXg2KSn9Zk0oYO/qILkHzCg/Rr27M5eoViKZ4RSDjFqmMKv3UJt3wJoZaXXaXvjTsLGSyElZ/wqzTZZHO0gA9Smg5BJSJ4I+mhKOL8EvPktG4jIiHRC9yo+8BgzVeFvhBxpARwK/PB/Yt9FAjj2h1+bURTDCgaKSR/+9/xKRxgFTAH4NDmtV1mcMpJHqI= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1386037d-08d1-4950-0889-08d6ee48fa09 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2019 08:44:11.7404 (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: Alexei.Fedorov@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2077 Content-Language: en-GB Content-Type: multipart/alternative; boundary="_000_VI1PR0801MB1743AC51A17F7F386D33AF409AED0VI1PR0801MB1743_" --_000_VI1PR0801MB1743AC51A17F7F386D33AF409AED0VI1PR0801MB1743_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Alexei Fedorov Alexei ________________________________ From: PierreGondois Sent: 06 June 2019 10:20 To: devel@edk2.groups.io Cc: Sami Mujawar; Alexei Fedorov; Matteo Carlini; Stephanie Hughes-Fitt; Pi= erre Gondois; nd Subject: [PATCH v1 1/1] DynamicTablesPkg: GTDT updates for ACPI 6.3 From: Pierre Gondois The ACPI 6.3 specification adds support for describing ARMv8.1 EL2 virtual timers. Update GTDTGenerator to extend this support. Signed-off-by: Pierre Gondois --- The changes can be seen at: https://github.com/PierreARM/edk2/tree/381_dyna= micTables_gtdt_acpi6_3_update_v1 Notes: v1: - Add support for describing ARMv8.1 EL2 virtual timers and update GTDTGenerator to extend this support. [Pierre] DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 6 ++ DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 69 ++++= +++++++--------- 2 files changed, 44 insertions(+), 31 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index bf70dc76cea044b9a8e8eb529d2ddbf892bafd58..0b00c8669729138e910d1fa0987= 0f12dbc2a02a6 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -290,6 +290,12 @@ typedef struct CmArmGenericTimerInfo { /// The non-secure PL2 timer flags UINT32 NonSecurePL2TimerFlags; + + /// GSIV for the virtual EL2 timer + UINT32 VirtualPL2TimerGSIV; + + /// Flags for the virtual EL2 timer + UINT32 VirtualPL2TimerFlags; } CM_ARM_GENERIC_TIMER_INFO; /** A structure that describes the diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index 8d9ddcf9244b9f8b795edf7a53dd8a071bb121bc..adc91c073efcac8e06997658b20= 096ae0b7d7b86 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -5,7 +5,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @par Reference(s): - - ACPI 6.2 Specification - Errata A, September 2017 + - ACPI 6.3 Specification - January 2019 **/ @@ -77,7 +77,7 @@ GET_OBJECT_LIST ( Protocol Interface. @param [in] Gtdt Pointer to the GTDT Table. @param [in] PlatformTimerCount Platform timer count. - + @param [in] AcpiTableRevision Acpi Revision targeted by the platform. @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_NOT_FOUND The required object was not found. @@ -90,8 +90,9 @@ EFI_STATUS EFIAPI AddGenericTimerInfo ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrPro= tocol, - IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE * CONST Gtdt, - IN CONST UINT32 PlatformT= imerCount + IN EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE * CONST Gtdt, + IN CONST UINT32 PlatformT= imerCount, + IN CONST UINT32 AcpiTable= Revision ) { EFI_STATUS Status; @@ -131,9 +132,14 @@ AddGenericTimerInfo ( GenericTimerInfo->CounterReadBaseAddress; Gtdt->PlatformTimerCount =3D PlatformTimerCount; Gtdt->PlatformTimerOffset =3D (PlatformTimerCount =3D=3D 0) ? 0 : - sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE); + sizeof (EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE); - return EFI_SUCCESS; + if (AcpiTableRevision > EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REV= ISION) { + Gtdt->VirtualPL2TimerGSIV =3D GenericTimerInfo->VirtualPL2TimerGSIV; + Gtdt->VirtualPL2TimerFlags =3D GenericTimerInfo->VirtualPL2TimerFlags; + } + + return Status; } /** Add the SBSA Generic Watchdog Timers to the GTDT table. @@ -147,26 +153,26 @@ AddGenericTimerInfo ( STATIC VOID AddGenericWatchdogList ( - IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE * CONST Gtdt, + IN EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE * CONST Gtdt, IN CONST UINT32 WatchdogOffset, IN CONST CM_ARM_GENERIC_WATCHDOG_INFO * WatchdogInfoLis= t, IN UINT32 WatchdogCount ) { - EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE * Watchdog; + EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE * Watchdog; ASSERT (Gtdt !=3D NULL); ASSERT (WatchdogInfoList !=3D NULL); - Watchdog =3D (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE *) + Watchdog =3D (EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE *) ((UINT8*)Gtdt + WatchdogOffset); while (WatchdogCount-- !=3D 0) { // Add watchdog entry DEBUG ((DEBUG_INFO, "GTDT: Watchdog =3D 0x%p\n", Watchdog)); - Watchdog->Type =3D EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG; + Watchdog->Type =3D EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG; Watchdog->Length =3D - sizeof (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE); + sizeof (EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE); Watchdog->Reserved =3D EFI_ACPI_RESERVED_BYTE; Watchdog->RefreshFramePhysicalAddress =3D WatchdogInfoList->RefreshFrameAddress; @@ -193,7 +199,7 @@ AddGenericWatchdogList ( STATIC EFI_STATUS AddGTBlockTimerFrames ( - IN EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE * GtBlockFrame= , + IN EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE * GtBlockFrame= , IN CONST CM_ARM_GTBLOCK_TIMER_FRAME_INFO * GTBlockTimer= FrameList, IN UINT32 GTBlockFrame= Count ) @@ -261,22 +267,22 @@ STATIC EFI_STATUS AddGTBlockList ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtoco= l, - IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE * CONST Gtdt, + IN EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE * CONST Gtdt, IN CONST UINT32 GTBlockOffset= , IN CONST CM_ARM_GTBLOCK_INFO * GTBlockInfo, IN UINT32 BlockTimerCou= nt ) { EFI_STATUS Status; - EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE * GTBlock; - EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE * GtBlockFrame; + EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE * GTBlock; + EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE * GtBlockFrame; CM_ARM_GTBLOCK_TIMER_FRAME_INFO * GTBlockTimerFrameList; UINT32 GTBlockTimerFrameCount; ASSERT (Gtdt !=3D NULL); ASSERT (GTBlockInfo !=3D NULL); - GTBlock =3D (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE *)((UINT8*)Gtdt + + GTBlock =3D (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE *)((UINT8*)Gtdt + GTBlockOffset); while (BlockTimerCount-- !=3D 0) { @@ -298,18 +304,18 @@ AddGTBlockList ( return Status; } - GTBlock->Type =3D EFI_ACPI_6_2_GTDT_GT_BLOCK; - GTBlock->Length =3D sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE) + - (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTUR= E) * + 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_STRUCTUR= E) * GTBlockInfo->GTBlockTimerFrameCount); GTBlock->Reserved =3D EFI_ACPI_RESERVED_BYTE; GTBlock->CntCtlBase =3D GTBlockInfo->GTBlockPhysicalAddress; GTBlock->GTBlockTimerCount =3D GTBlockInfo->GTBlockTimerFrameCount; GTBlock->GTBlockTimerOffset =3D - sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE); + sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE); - GtBlockFrame =3D (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE*) + GtBlockFrame =3D (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE*) ((UINT8*)GTBlock + GTBlock->GTBlockTimerOffset); // Add GT Block Timer frames @@ -328,7 +334,7 @@ AddGTBlockList ( } // Next GTBlock - GTBlock =3D (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE *)((UINT8*)GTBlock + + GTBlock =3D (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE *)((UINT8*)GTBlock + GTBlock->Length); GTBlockInfo++; }// for @@ -375,7 +381,7 @@ BuildGtdtTable ( UINT32 BlockTimerCount; CM_ARM_GENERIC_WATCHDOG_INFO * WatchdogInfoList; CM_ARM_GTBLOCK_INFO * GTBlockInfo; - EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE * Gtdt; + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE * Gtdt; UINT32 Idx; UINT32 GTBlockOffset; UINT32 WatchdogOffset; @@ -442,11 +448,11 @@ BuildGtdtTable ( // Calculate the GTDT Table Size PlatformTimerCount =3D 0; - TableSize =3D sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE); + TableSize =3D sizeof (EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE); if (BlockTimerCount !=3D 0) { GTBlockOffset =3D TableSize; PlatformTimerCount +=3D BlockTimerCount; - TableSize +=3D (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE) * + TableSize +=3D (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE) * BlockTimerCount); for (Idx =3D 0; Idx < BlockTimerCount; Idx++) { @@ -461,7 +467,7 @@ BuildGtdtTable ( )); goto error_handler; } - TableSize +=3D (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE) = * + TableSize +=3D (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE) = * GTBlockInfo[Idx].GTBlockTimerFrameCount); } @@ -477,7 +483,7 @@ BuildGtdtTable ( if (WatchdogCount !=3D 0) { WatchdogOffset =3D TableSize; PlatformTimerCount +=3D WatchdogCount; - TableSize +=3D (sizeof (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCT= URE) * + TableSize +=3D (sizeof (EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCT= URE) * WatchdogCount); DEBUG (( DEBUG_INFO, @@ -500,7 +506,7 @@ BuildGtdtTable ( goto error_handler; } - Gtdt =3D (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE*)*Table; + Gtdt =3D (EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE*)*Table; DEBUG (( DEBUG_INFO, "GTDT: Gtdt =3D 0x%p TableSize =3D 0x%x\n", @@ -527,7 +533,8 @@ BuildGtdtTable ( Status =3D AddGenericTimerInfo ( CfgMgrProtocol, Gtdt, - PlatformTimerCount + PlatformTimerCount, + AcpiTableInfo->AcpiTableRevision ); if (EFI_ERROR (Status)) { DEBUG (( @@ -626,9 +633,9 @@ ACPI_TABLE_GENERATOR GtdtGenerator =3D { // Generator Description L"ACPI.STD.GTDT.GENERATOR", // ACPI Table Signature - EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, // ACPI Table Revision supported by this Generator - EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION, + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION, // Minimum ACPI Table Revision supported by this Generator EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION, // Creator ID -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' --_000_VI1PR0801MB1743AC51A17F7F386D33AF409AED0VI1PR0801MB1743_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>

Alexei


From: PierreGondois <pie= rre.gondois@arm.com>
Sent: 06 June 2019 10:20
To: devel@edk2.groups.io
Cc: Sami Mujawar; Alexei Fedorov; Matteo Carlini; Stephanie Hughes-F= itt; Pierre Gondois; nd
Subject: [PATCH v1 1/1] DynamicTablesPkg: GTDT updates for ACPI 6.3<= /font>
 
From: Pierre Gondois <pierre.gondois@arm.com>= ;

The ACPI 6.3 specification adds support for describing
ARMv8.1 EL2 virtual timers. Update GTDTGenerator
to extend this support.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---

The changes can be seen at: https://github.com/PierreARM/edk2/tree/381_dynamicTables_gtdt_acpi6_3_updat= e_v1

Notes:
    v1:
    - Add support for describing ARMv8.1 EL2 virtual timers = and update
      GTDTGenerator to extend this support. [Pierr= e]

 DynamicTablesPkg/Include/ArmNameSpaceObjects.h    = ;            &n= bsp;  |  6 ++
 DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 69= +++++++++++---------
 2 files changed, 44 insertions(+), 31 deletions(-)

diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h
index bf70dc76cea044b9a8e8eb529d2ddbf892bafd58..0b00c8669729138e910d1fa0987= 0f12dbc2a02a6 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -290,6 +290,12 @@ typedef struct CmArmGenericTimerInfo {
 
   /// The non-secure PL2 timer flags
   UINT32  NonSecurePL2TimerFlags;
+
+  /// GSIV for the virtual EL2 timer
+  UINT32 VirtualPL2TimerGSIV;
+
+  /// Flags for the virtual EL2 timer
+  UINT32 VirtualPL2TimerFlags;
 } CM_ARM_GENERIC_TIMER_INFO;
 
 /** A structure that describes the
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
index 8d9ddcf9244b9f8b795edf7a53dd8a071bb121bc..adc91c073efcac8e06997658b20= 096ae0b7d7b86 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGene= rator.c
@@ -5,7 +5,7 @@
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Reference(s):
-  - ACPI 6.2 Specification - Errata A, September 2017
+  - ACPI 6.3 Specification - January 2019
 
 **/
 
@@ -77,7 +77,7 @@ GET_OBJECT_LIST (
            &nb= sp;            =           Protocol Interface.<= br>    @param [in]  Gtdt      &nbs= p;        Pointer to the GTDT Table.
   @param [in]  PlatformTimerCount Platform timer count.
-
+  @param [in]  AcpiTableRevision  Acpi Revision targete= d by the platform.
   @retval EFI_SUCCESS       &= nbsp;   Success.
   @retval EFI_INVALID_PARAMETER A parameter is invalid.
   @retval EFI_NOT_FOUND       = ;  The required object was not found.
@@ -90,8 +90,9 @@ EFI_STATUS
 EFIAPI
 AddGenericTimerInfo (
   IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  = ;       * CONST CfgMgrProtocol,
-  IN        EFI_ACPI_6_2_GENERIC_T= IMER_DESCRIPTION_TABLE * CONST Gtdt,
-  IN  CONST UINT32       &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp; PlatformTimerCount
+  IN        EFI_ACPI_6_3_GENER= IC_TIMER_DESCRIPTION_TABLE * CONST Gtdt,
+  IN  CONST UINT32       =             &nb= sp;            =             &nb= sp;  PlatformTimerCount,
+  IN  CONST UINT32       =             &nb= sp;            =             &nb= sp;  AcpiTableRevision
 )
 {
   EFI_STATUS        &nbs= p;          Status;
@@ -131,9 +132,14 @@ AddGenericTimerInfo (
     GenericTimerInfo->CounterReadBaseAddress;
   Gtdt->PlatformTimerCount =3D PlatformTimerCount;
   Gtdt->PlatformTimerOffset =3D (PlatformTimerCount =3D=3D 0)= ? 0 :
-    sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE);<= br> +    sizeof (EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABL= E);
 
-  return EFI_SUCCESS;
+  if (AcpiTableRevision > EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTI= ON_TABLE_REVISION) {
+    Gtdt->VirtualPL2TimerGSIV =3D GenericTimerInfo-&= gt;VirtualPL2TimerGSIV;
+    Gtdt->VirtualPL2TimerFlags =3D GenericTimerInfo-= >VirtualPL2TimerFlags;
+  }
+
+  return Status;
 }
 
 /** Add the SBSA Generic Watchdog Timers to the GTDT table.
@@ -147,26 +153,26 @@ AddGenericTimerInfo (
 STATIC
 VOID
 AddGenericWatchdogList (
-  IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE  * CONST Gtdt,=
+  IN EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE  * CONST G= tdt,
   IN CONST UINT32        = ;            &n= bsp;            = ;         WatchdogOffset,
   IN CONST CM_ARM_GENERIC_WATCHDOG_INFO    &= nbsp;       *     &n= bsp; WatchdogInfoList,
   IN       UINT32   = ;            &n= bsp;            = ;            &n= bsp; WatchdogCount
   )
 {
-  EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE  * Watchdog;=
+  EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE  * Watch= dog;
 
   ASSERT (Gtdt !=3D NULL);
   ASSERT (WatchdogInfoList !=3D NULL);
 
-  Watchdog =3D (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE *)<= br> +  Watchdog =3D (EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE= *)
            &nb= sp; ((UINT8*)Gtdt + WatchdogOffset);
 
   while (WatchdogCount-- !=3D 0) {
     // Add watchdog entry
     DEBUG ((DEBUG_INFO, "GTDT: Watchdog =3D 0x%p\= n", Watchdog));
-    Watchdog->Type =3D EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WA= TCHDOG;
+    Watchdog->Type =3D EFI_ACPI_6_3_GTDT_SBSA_GENERI= C_WATCHDOG;
     Watchdog->Length =3D
-      sizeof (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATC= HDOG_STRUCTURE);
+      sizeof (EFI_ACPI_6_3_GTDT_SBSA_GENERIC_= WATCHDOG_STRUCTURE);
     Watchdog->Reserved =3D EFI_ACPI_RESERVED_BYTE;<= br>      Watchdog->RefreshFramePhysicalAddress =3D
       WatchdogInfoList->RefreshFrameAddre= ss;
@@ -193,7 +199,7 @@ AddGenericWatchdogList (
 STATIC
 EFI_STATUS
 AddGTBlockTimerFrames (
-  IN       EFI_ACPI_6_2_GTDT_GT_BLOCK_T= IMER_STRUCTURE *       GtBlockFrame,
+  IN       EFI_ACPI_6_3_GTDT_GT_BLO= CK_TIMER_STRUCTURE *       GtBlockFrame,
   IN CONST CM_ARM_GTBLOCK_TIMER_FRAME_INFO   &nbs= p;        *     = ;  GTBlockTimerFrameList,
   IN       UINT32   = ;            &n= bsp;            = ;            &n= bsp;    GTBlockFrameCount
 )
@@ -261,22 +267,22 @@ STATIC
 EFI_STATUS
 AddGTBlockList (
   IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  = ;   * CONST CfgMgrProtocol,
-  IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE    *= CONST Gtdt,
+  IN EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE  &nbs= p; * CONST Gtdt,
   IN CONST UINT32        = ;            &n= bsp;            = ;           GTBlockOffset= ,
   IN CONST CM_ARM_GTBLOCK_INFO     &nbs= p;            &= nbsp;    *       GTBlockInfo,<= br>    IN       UINT32   = ;            &n= bsp;            = ;            &n= bsp;   BlockTimerCount
 )
 {
   EFI_STATUS        &nbs= p;            &= nbsp;           &nbs= p;  Status;
-  EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE     &= nbsp;  * GTBlock;
-  EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE  * GtBlockFrame; +  EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE    &nb= sp;   * GTBlock;
+  EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE  * GtBlockFrame= ;
   CM_ARM_GTBLOCK_TIMER_FRAME_INFO     &= nbsp;       * GTBlockTimerFrameList;
   UINT32         &n= bsp;            = ;            &n= bsp;     GTBlockTimerFrameCount;
 
   ASSERT (Gtdt !=3D NULL);
   ASSERT (GTBlockInfo !=3D NULL);
 
-  GTBlock =3D (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE *)((UINT8*)Gtdt &= #43;
+  GTBlock =3D (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE *)((UINT8*)Gt= dt +
            &nb= sp;  GTBlockOffset);
 
   while (BlockTimerCount-- !=3D 0) {
@@ -298,18 +304,18 @@ AddGTBlockList (
       return Status;
     }
 
-    GTBlock->Type =3D EFI_ACPI_6_2_GTDT_GT_BLOCK;
-    GTBlock->Length =3D sizeof (EFI_ACPI_6_2_GTDT_GT_BLO= CK_STRUCTURE) +
-            &n= bsp;           (sizeof (E= FI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE) *
+    GTBlock->Type =3D EFI_ACPI_6_3_GTDT_GT_BLOCK; +    GTBlock->Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT= _BLOCK_STRUCTURE) +
+           &nbs= p;            (sizeo= f (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE) *
            &nb= sp;            =   GTBlockInfo->GTBlockTimerFrameCount);
 
     GTBlock->Reserved =3D EFI_ACPI_RESERVED_BYTE;      GTBlock->CntCtlBase =3D GTBlockInfo->GTBlock= PhysicalAddress;
     GTBlock->GTBlockTimerCount =3D GTBlockInfo->= GTBlockTimerFrameCount;
     GTBlock->GTBlockTimerOffset =3D
-      sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTUR= E);
+      sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRU= CTURE);
 
-    GtBlockFrame =3D (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRU= CTURE*)
+    GtBlockFrame =3D (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_= STRUCTURE*)
       ((UINT8*)GTBlock + GTBlock->GTB= lockTimerOffset);
 
     // Add GT Block Timer frames
@@ -328,7 +334,7 @@ AddGTBlockList (
     }
 
     // Next GTBlock
-    GTBlock =3D (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE *)((U= INT8*)GTBlock +
+    GTBlock =3D (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE *= )((UINT8*)GTBlock +
            &nb= sp;   GTBlock->Length);
     GTBlockInfo++;
   }// for
@@ -375,7 +381,7 @@ BuildGtdtTable (
   UINT32         &n= bsp;            = ;            &n= bsp;       BlockTimerCount;
   CM_ARM_GENERIC_WATCHDOG_INFO     &nbs= p;            * Watc= hdogInfoList;
   CM_ARM_GTBLOCK_INFO       &= nbsp;           &nbs= p;       * GTBlockInfo;
-  EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE  * Gtdt;
+  EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE  * Gtdt;
   UINT32         &n= bsp;            = ;            &n= bsp;       Idx;
   UINT32         &n= bsp;            = ;            &n= bsp;       GTBlockOffset;
   UINT32         &n= bsp;            = ;            &n= bsp;       WatchdogOffset;
@@ -442,11 +448,11 @@ BuildGtdtTable (
 
   // Calculate the GTDT Table Size
   PlatformTimerCount =3D 0;
-  TableSize =3D sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE)= ;
+  TableSize =3D sizeof (EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TA= BLE);
   if (BlockTimerCount !=3D 0) {
     GTBlockOffset =3D TableSize;
     PlatformTimerCount +=3D BlockTimerCount;
-    TableSize +=3D (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_= STRUCTURE) *
+    TableSize +=3D (sizeof (EFI_ACPI_6_3_GTDT_GT_BL= OCK_STRUCTURE) *
            &nb= sp;      BlockTimerCount);
 
     for (Idx =3D 0; Idx < BlockTimerCount; Idx+= +) {
@@ -461,7 +467,7 @@ BuildGtdtTable (
           ));
         goto error_handler;
       }
-      TableSize +=3D (sizeof (EFI_ACPI_6_2_GT= DT_GT_BLOCK_TIMER_STRUCTURE) *
+      TableSize +=3D (sizeof (EFI_ACPI_6_= 3_GTDT_GT_BLOCK_TIMER_STRUCTURE) *
         GTBlockInfo[Idx].GTBlockTi= merFrameCount);
     }
 
@@ -477,7 +483,7 @@ BuildGtdtTable (
   if (WatchdogCount !=3D 0) {
     WatchdogOffset =3D TableSize;
     PlatformTimerCount +=3D WatchdogCount;
-    TableSize +=3D (sizeof (EFI_ACPI_6_2_GTDT_SBSA_GENE= RIC_WATCHDOG_STRUCTURE) *
+    TableSize +=3D (sizeof (EFI_ACPI_6_3_GTDT_SBSA_= GENERIC_WATCHDOG_STRUCTURE) *
            &nb= sp;      WatchdogCount);
     DEBUG ((
       DEBUG_INFO,
@@ -500,7 +506,7 @@ BuildGtdtTable (
     goto error_handler;
   }
 
-  Gtdt =3D (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE*)*Table;
+  Gtdt =3D (EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE*)*Table;=
   DEBUG ((
     DEBUG_INFO,
     "GTDT: Gtdt =3D 0x%p TableSize =3D 0x%x\n&quo= t;,
@@ -527,7 +533,8 @@ BuildGtdtTable (
   Status =3D AddGenericTimerInfo (
            &nb= sp; CfgMgrProtocol,
            &nb= sp; Gtdt,
-             P= latformTimerCount
+           &nbs= p; PlatformTimerCount,
+           &nbs= p; AcpiTableInfo->AcpiTableRevision
            &nb= sp; );
   if (EFI_ERROR (Status)) {
     DEBUG ((
@@ -626,9 +633,9 @@ ACPI_TABLE_GENERATOR GtdtGenerator =3D {
   // Generator Description
   L"ACPI.STD.GTDT.GENERATOR",
   // ACPI Table Signature
-  EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+  EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
   // ACPI Table Revision supported by this Generator
-  EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
+  EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
   // Minimum ACPI Table Revision supported by this Generator
   EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
   // Creator ID
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


--_000_VI1PR0801MB1743AC51A17F7F386D33AF409AED0VI1PR0801MB1743_--