summaryrefslogtreecommitdiff
path: root/Platform/ARM/VExpressPkg
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2017-05-22 15:39:52 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2017-10-06 15:16:01 +0100
commit7f0f07968bcc1e66c394ad14ce44c53594ae9869 (patch)
treec7d63f1e9d3fadc6da938872f65c11e2336a235d /Platform/ARM/VExpressPkg
parent13f15e8113441c3fb8ba527c23a7db7ca7ad0d58 (diff)
downloadedk2-platforms-7f0f07968bcc1e66c394ad14ce44c53594ae9869.tar.xz
Platforms/ARM: SBSA Watchdog PCD and build option
Added PcdWatchdogCount to specify the number of Watchdog timers that are available on Juno and FVP platform. Also added DISABLE_SBSA_WATCHDOG option to disable the watchdog timers if required for testing. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Platform/ARM/VExpressPkg')
-rw-r--r--Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf4
-rw-r--r--Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc14
-rw-r--r--Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc7
3 files changed, 20 insertions, 5 deletions
diff --git a/Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf b/Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf
index 59d323840a..cc0f06f533 100644
--- a/Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf
+++ b/Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf
@@ -2,7 +2,7 @@
#
# ACPI table data and ASL sources required to boot the platform.
#
-# Copyright (c) 2014-2016, ARM Ltd. All rights reserved.
+# Copyright (c) 2014-2017, ARM Ltd. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -41,3 +41,5 @@
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicRedistributorsBase
+
+ gArmPlatformTokenSpaceGuid.PcdWatchdogCount
diff --git a/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc
index fc8f91f8b7..ae570574b2 100644
--- a/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc
+++ b/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc
@@ -1,7 +1,7 @@
/** @file
* Generic Timer Description Table (GTDT)
*
-* Copyright (c) 2012 - 2014, ARM Limited. All rights reserved.
+* Copyright (c) 2012 - 2017, ARM Limited. All rights reserved.
* Copyright (c) 2016, Linaro Ltd. All rights reserved
*
* This program and the accompanying materials
@@ -36,9 +36,9 @@
#define FVP_GTDT_GTIMER_FLAGS (GTDT_TIMER_LOSE_CONTEXT | GTDT_TIMER_ACTIVE_HIGH | GTDT_TIMER_EDGE_TRIGGERED)
-#define FVP_PLATFORM_TIMER_COUNT 2
+#define FVP_WATCHDOG_COUNT FixedPcdGet32 (PcdWatchdogCount)
+#define FVP_PLATFORM_TIMER_COUNT (FVP_WATCHDOG_COUNT + 1)
#define FVP_TIMER_FRAMES_COUNT 2
-#define FVP_WATCHDOG_COUNT 1
#define FVP_GT_BLOCK_CTL_BASE 0x000000002A810000
#define FVP_GT_BLOCK_FRAME0_CTL_BASE 0x000000002A820000
@@ -82,7 +82,9 @@ typedef struct {
EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt;
EFI_ACPI_6_1_GTDT_GT_BLOCK_STRUCTURE GtBlock;
EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_STRUCTURE Frames[FVP_TIMER_FRAMES_COUNT];
+#if (FVP_WATCHDOG_COUNT != 0)
EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[FVP_WATCHDOG_COUNT];
+#endif
} FVP_GENERIC_TIMER_DESCRIPTION_TABLES;
#pragma pack ()
@@ -106,7 +108,11 @@ FVP_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
FVP_GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2TimerFlags
FVP_CNT_READ_BASE_ADDRESS, // UINT64 CntReadBasePhysicalAddress
FVP_PLATFORM_TIMER_COUNT, // UINT32 PlatformTimerCount
+#if (FVP_WATCHDOG_COUNT != 0)
sizeof (EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 PlatfromTimerOffset
+#else
+ 0
+#endif
},
{
EFI_ACPI_6_1_GTDT_GT_BLOCK, // UINT8 Type
@@ -146,6 +152,7 @@ FVP_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
FVP_GTX_COMMON_FLAGS // UINT32 GTxCommonFlags
}
},
+#if (FVP_WATCHDOG_COUNT != 0)
{
{
EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG, // UINT8 Type
@@ -157,6 +164,7 @@ FVP_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
FVP_SBSA_WATCHDOG_FLAGS // UINT32 WatchdogTimerFlags
}
}
+#endif
};
//
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
index e9f954d926..51f0529db2 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011-2015, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2017, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -135,6 +135,11 @@
## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000
+ ## SBSA Watchdog Count
+!ifndef DISABLE_SBSA_WATCHDOG
+ gArmPlatformTokenSpaceGuid.PcdWatchdogCount|1
+!endif
+
!ifdef EDK2_ENABLE_PL111
## PL111 Versatile Express Motherboard controller
gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1C1F0000