From nobody Sat Apr 27 08:08:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 150574643538037.32928480966689; Mon, 18 Sep 2017 07:53:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5FC4D21D046D3; Mon, 18 Sep 2017 07:50:50 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EC73021D046AC for ; Mon, 18 Sep 2017 07:50:48 -0700 (PDT) Received: from E111747.Emea.Arm.com (e111747.emea.arm.com [10.1.29.201]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v8IErnkw010855; Mon, 18 Sep 2017 15:53:50 +0100 X-Original-To: edk2-devel@lists.01.org From: evan.lloyd@arm.com To: edk2-devel@lists.01.org Date: Mon, 18 Sep 2017 15:53:43 +0100 Message-Id: <20170918145344.41788-2-evan.lloyd@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170918145344.41788-1-evan.lloyd@arm.com> References: <20170918145344.41788-1-evan.lloyd@arm.com> Subject: [edk2] [PATCH 1/2] ArmPlatformPkg: Add PCD for SBSA Watchdog Count X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Sami Mujawar The Juno and FVP platform implement SBSA Watchdog timers. Added PcdWatchdogCount to specify the number of Watchdog timers that are available. This allows configurability and an option to disable the Watchdog timers if required for testing. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar Signed-off-by: Evan Lloyd --- ArmPlatformPkg/ArmPlatformPkg.dec | 4 +++- ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatform= Pkg.dec index b8a6b131632dc6788b73a034a41b9e3176dffafa..2d82ead7612ae05c6f16f76008b= de605a80ae5b9 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dec +++ b/ArmPlatformPkg/ArmPlatformPkg.dec @@ -1,6 +1,6 @@ #/** @file # -# Copyright (c) 2011-2016, ARM Limited. All rights reserved. +# Copyright (c) 2011-2017, ARM Limited. All rights reserved. # Copyright (c) 2015, Intel Corporation. All rights reserved. # # This program and the accompanying materials @@ -131,6 +131,8 @@ [PcdsFixedAtBuild.common,PcdsDynamic.common] gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024 gArmPlatformTokenSpaceGuid.PcdPL031RtcPpmAccuracy|300000000|UINT32|0x000= 00022 =20 + gArmPlatformTokenSpaceGuid.PcdWatchdogCount|0x0|UINT32|0x00000033 + [PcdsFixedAtBuild.ARM] # Stack for CPU Cores in Secure Monitor Mode gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0|UINT64|0x00000007 diff --git a/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h b/ArmPlatformP= kg/ArmJunoPkg/Include/ArmPlatform.h index 7eaa239b1cbd4a2f54aa2d71e4e3b0279c5527d1..fce445ea9fe48a1012c714e40f9= 5f3052713152d 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h +++ b/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2013-2014, ARM Limited. All rights reserved. +* Copyright (c) 2013-2017, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the B= SD License @@ -108,7 +108,7 @@ JunoRevision =3D ARM_VE_BOARD_SYS_ID_REV( SysId ); \ } =20 -#define JUNO_WATCHDOG_COUNT 2 +#define JUNO_WATCHDOG_COUNT FixedPcdGet32 (PcdWatchdogCount) =20 // Define if the exported ACPI Tables are based on ACPI 5.0 spec or latest //#define ARM_JUNO_ACPI_5_0 --=20 Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Apr 27 08:08:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505746436771357.6137568170444; Mon, 18 Sep 2017 07:53:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9F6B921D046D7; Mon, 18 Sep 2017 07:50:50 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 01CE221D046BB for ; Mon, 18 Sep 2017 07:50:48 -0700 (PDT) Received: from E111747.Emea.Arm.com (e111747.emea.arm.com [10.1.29.201]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v8IErnkx010855; Mon, 18 Sep 2017 15:53:50 +0100 X-Original-To: edk2-devel@lists.01.org From: evan.lloyd@arm.com To: edk2-devel@lists.01.org Date: Mon, 18 Sep 2017 15:53:44 +0100 Message-Id: <20170918145344.41788-3-evan.lloyd@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170918145344.41788-1-evan.lloyd@arm.com> References: <20170918145344.41788-1-evan.lloyd@arm.com> Subject: [edk2] [PATCH 2/2] [edk2-platforms] Platforms/ARM: SBSA Watchdog PCD and build option X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Sami Mujawar 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 Signed-off-by: Evan Lloyd --- Platform/ARM/JunoPkg/ArmJuno.dsc | 7 ++++++- Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc | 7 ++++++- Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf | 4 +++- Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf | 4 +++- Platform/ARM/JunoPkg/AcpiTables/Gtdt.aslc | 6 +++++- Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc | 14 +++++++++++--- 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJun= o.dsc index 72eab8b5be22a5516b243b2b5e70f6b919854707..54158d709ae836202254eef8b2e= 0eac8209ca9cc 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2015, ARM Limited. All rights reserved. +# Copyright (c) 2013-2017, ARM Limited. All rights reserved. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -131,6 +131,11 @@ [PcdsFixedAtBuild.common] ## PL031 RealTimeClock gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000 =20 + ## SBSA Watchdog Count +!ifndef DISABLE_SBSA_WATCHDOG + gArmPlatformTokenSpaceGuid.PcdWatchdogCount|2 +!endif + # LAN9118 Ethernet Driver gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress|0x18000000 gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress|0x1215161822242628 diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc b/Platfor= m/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc index e9f954d926ac25a2abd2f97a4141267927dfc0a3..51f0529db2516285641a8b6a494= 73db9d3d9224a 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 B= SD License @@ -135,6 +135,11 @@ [PcdsFixedAtBuild.common] ## PL031 RealTimeClock gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000 =20 + ## SBSA Watchdog Count +!ifndef DISABLE_SBSA_WATCHDOG + gArmPlatformTokenSpaceGuid.PcdWatchdogCount|1 +!endif + !ifdef EDK2_ENABLE_PL111 ## PL111 Versatile Express Motherboard controller gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1C1F0000 diff --git a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf b/Platform/ARM/= JunoPkg/AcpiTables/AcpiTables.inf index e099c02f39dad4bb19692c87a12d8d3d6f1da4b6..741ea191be3672db225b82dc0e1= 82fceddec83f2 100644 --- a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf +++ b/Platform/ARM/JunoPkg/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 B= SD License @@ -61,3 +61,5 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PL011UartInterrupt =20 gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase + + gArmPlatformTokenSpaceGuid.PcdWatchdogCount diff --git a/Platform/ARM/VExpressPkg/AcpiTables/AcpiTables.inf b/Platform/= ARM/VExpressPkg/AcpiTables/AcpiTables.inf index 59d323840a3a5e32a1a870f2098bdb2588ae91e1..cc0f06f533236b3bf68bfc6eefc= 745b776fdad16 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 B= SD License @@ -41,3 +41,5 @@ [FixedPcd] gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase gArmTokenSpaceGuid.PcdGicRedistributorsBase + + gArmPlatformTokenSpaceGuid.PcdWatchdogCount diff --git a/Platform/ARM/JunoPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/JunoP= kg/AcpiTables/Gtdt.aslc index 5e83802d576b11178a7fdb556086dea41ee0859f..d6ed58c3ae2d20ae6201f131d9f= 39c95e713b9d2 100644 --- a/Platform/ARM/JunoPkg/AcpiTables/Gtdt.aslc +++ b/Platform/ARM/JunoPkg/AcpiTables/Gtdt.aslc @@ -1,7 +1,7 @@ /** @file * Generic Timer Description Table (GTDT) * -* Copyright (c) 2012 - 2016, ARM Limited. All rights reserved. +* Copyright (c) 2012 - 2017, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the B= SD License @@ -87,7 +87,11 @@ GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL= 2TimerFlags 0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBase= PhysicalAddress JUNO_WATCHDOG_COUNT, // UINT32 PlatformTim= erCount +#if (JUNO_WATCHDOG_COUNT !=3D 0) sizeof (EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 Plat= fromTimerOffset +#else + 0 +#endif }, #if (JUNO_WATCHDOG_COUNT !=3D 0) { diff --git a/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/V= ExpressPkg/AcpiTables/Gtdt.aslc index fc8f91f8b7ad8a066fb5fe4e3f98b1d5e9a3158c..ae570574b298094ff468f30b78f= bd8c98db506c5 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 @@ =20 #define FVP_GTDT_GTIMER_FLAGS (GTDT_TIMER_LOSE_CONTEXT | GTDT_TIMER_= ACTIVE_HIGH | GTDT_TIMER_EDGE_TRIGGERED) =20 -#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 =20 #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_F= RAMES_COUNT]; +#if (FVP_WATCHDOG_COUNT !=3D 0) EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[FVP_WATC= HDOG_COUNT]; +#endif } FVP_GENERIC_TIMER_DESCRIPTION_TABLES; =20 #pragma pack () @@ -106,7 +108,11 @@ FVP_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt =3D { FVP_GTDT_GTIMER_FLAGS, // UINT32 NonSe= curePL2TimerFlags FVP_CNT_READ_BASE_ADDRESS, // UINT64 CntRe= adBasePhysicalAddress FVP_PLATFORM_TIMER_COUNT, // UINT32 Platf= ormTimerCount +#if (FVP_WATCHDOG_COUNT !=3D 0) sizeof (EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 Platf= romTimerOffset +#else + 0 +#endif }, { EFI_ACPI_6_1_GTDT_GT_BLOCK, // UINT8 Type @@ -146,6 +152,7 @@ FVP_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt =3D { FVP_GTX_COMMON_FLAGS // UINT32 GTxC= ommonFlags } }, +#if (FVP_WATCHDOG_COUNT !=3D 0) { { EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG, // UINT8 Type @@ -157,6 +164,7 @@ FVP_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt =3D { FVP_SBSA_WATCHDOG_FLAGS // UINT32 Wa= tchdogTimerFlags } } +#endif }; =20 // --=20 Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel