diff options
author | Pranav Madhu <pranav.madhu@arm.com> | 2021-04-13 00:03:29 +0530 |
---|---|---|
committer | Sami Mujawar <sami.mujawar@arm.com> | 2021-04-13 08:41:12 +0100 |
commit | eb55ab4a2dc8565e7006aff2f6ff9a67ae0526bf (patch) | |
tree | 2c60f7f454483c58d89145aa5f93c76dedd65465 | |
parent | c7639e2c087cd9a0943432c36ffd61ff2287db67 (diff) |
Platform/Sgi: define PCD for timer interrupt numbers
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 <pranav.madhu@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc | 8 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 4 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc | 6 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc | 6 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/SgiPlatform.dec | 6 |
11 files changed, 50 insertions, 4 deletions
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc index a8b587ba..b53cbb22 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)
#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)
#define SGI_GTX_TIMER_FLAGS 0
#define GTX_TIMER_SECURE EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
@@ -127,13 +127,13 @@ STATIC EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = { 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
)
}
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf index 7ebd70b1..2dd22756 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index 2d4354f3..22e33239 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index db168c51..76886d1c 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -59,11 +59,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf index 63fc249b..2ec3e424 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf index 583ffac7..a21dcfaf 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf @@ -50,11 +50,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf index d0d94730..c49546ec 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf @@ -59,11 +59,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index 466e0fb6..2121fd39 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -49,11 +49,15 @@ gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
gArmSgiTokenSpaceGuid.PcdVirtioNetSize
gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc index e423a6b5..efbb013b 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/SgiPkg/SgiMemoryMap2.dsc.inc index 41291edd..1167f1a6 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/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec index 3f0d38a0..86ead241 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
+ # 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 = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
|