From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.3603.1617255360452977351 for ; Wed, 31 Mar 2021 22:36:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pranav.madhu@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D611ED1; Wed, 31 Mar 2021 22:36:00 -0700 (PDT) Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9F7C13F694; Wed, 31 Mar 2021 22:35:58 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar Subject: [edk2-platforms][PATCH V2 5/6] Platform/Sgi: define PCD for timer interrupt numbers Date: Thu, 1 Apr 2021 11:05:42 +0530 Message-Id: <20210401053543.17308-6-pranav.madhu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210401053543.17308-1-pranav.madhu@arm.com> References: <20210401053543.17308-1-pranav.madhu@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The generic timer and watchdog timer interrupt numbers on the RD-N2 platform is different than those on the other platforms supported by SgiPkg. So in order to reuse the existing GTDT ACPI table for all the supported platforms including RD-N2, introduce and use PCD to provide the interrupt numbers for watchdog and generic timers. Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/SgiPlatform.dec | 6 ++++++ Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc | 6 ++++++ Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc | 6 ++++++ Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 4 ++++ Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc | 8 ++++---- 11 files changed, 50 insertions(+), 4 deletions(-) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/Sg= iPlatform.dec index 3f0d38a013f2..86ead241a67c 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -57,5 +57,11 @@ gArmSgiTokenSpaceGuid.PcdSysPeriphBase|0x00000000|UINT64|0x0000000E gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase|0x0|UINT64|0x0000000F =20 + # Timer & Watchdog interrupts + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv|0|UINT32|0x00000011 + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv|0|UINT32|0x00000012 + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|0|UINT32|0x00000013 + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|0|UINT32|0x00000014 + [Ppis] gNtFwConfigDtInfoPpiGuid =3D { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8,= 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } } diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiP= kg/SgiMemoryMap.dsc.inc index e423a6b50c91..efbb013b0b60 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc @@ -44,3 +44,9 @@ gArmTokenSpaceGuid.PcdPciMmio64Base|0x5000000000 gArmTokenSpaceGuid.PcdPciMmio64Size|0x3000000000 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x60000000 + + # Timer & Watchdog interrupts + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv|92 + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv|91 + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|93 + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|94 diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc b/Platform/ARM/Sgi= Pkg/SgiMemoryMap2.dsc.inc index 41291eddfe74..1167f1a6ff9d 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc @@ -44,3 +44,9 @@ gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000 gArmTokenSpaceGuid.PcdPciMmio64Size|0x4000000000 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x1010000000 + + # Timer & Watchdog interrupts + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv|109 + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv|108 + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|110 + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|111 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf index 7ebd70b197a6..2dd2275665a2 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index 2d4354f33018..22e33239070b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Pl= atform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index d44f02ab0c16..ba400de0454b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -58,11 +58,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf index 63fc249bb77b..2ec3e42473a9 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf index 583ffac70b71..a21dcfafef1a 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf index 2d6a65b103b4..08351b1e98e6 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf @@ -58,11 +58,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index 466e0fb658eb..2121fd39f2f0 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -49,11 +49,15 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioNetSize gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/SgiP= kg/AcpiTables/Gtdt.aslc index a8b587ba881d..b53cbb228f92 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc +++ b/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc @@ -23,11 +23,11 @@ #define SGI_GT_BLOCK_CTL_BASE 0x2A810000 #define SGI_GT_BLOCK_FRAME1_CTL_BASE 0x2A820000 #define SGI_GT_BLOCK_FRAME1_CTL_EL0_BASE 0xFFFFFFFFFFFFFFFF -#define SGI_GT_BLOCK_FRAME1_GSIV 0x5B +#define SGI_GT_BLOCK_FRAME1_GSIV FixedPcdGet32 (PcdGtFrame1Gsiv= ) =20 #define SGI_GT_BLOCK_FRAME0_CTL_BASE 0x2A830000 #define SGI_GT_BLOCK_FRAME0_CTL_EL0_BASE 0xFFFFFFFFFFFFFFFF -#define SGI_GT_BLOCK_FRAME0_GSIV 0x5C +#define SGI_GT_BLOCK_FRAME0_GSIV FixedPcdGet32 (PcdGtFrame0Gsiv= ) =20 #define SGI_GTX_TIMER_FLAGS 0 #define GTX_TIMER_SECURE EFI_ACPI_6_2_GTDT_GT_BLOCK_COM= MON_FLAG_SECURE_TIMER @@ -127,13 +127,13 @@ STATIC EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE= S Gtdt =3D { EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT ( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), - 93, + FixedPcdGet32 (PcdWdogWS0Gsiv), 0 ), EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT ( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), - 94, + FixedPcdGet32 (PcdWdogWS1Gsiv), EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER ) } --=20 2.17.1