From nobody Mon Apr 29 20:29:11 2024 Delivered-To: importer@patchew.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 1524579559588318.8982328338892; Tue, 24 Apr 2018 07:19:19 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4488C2282E585; Tue, 24 Apr 2018 07:19:18 -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 6B76C2282E583 for ; Tue, 24 Apr 2018 07:19:15 -0700 (PDT) Received: from E107187.Emea.Arm.com (e107187.emea.arm.com [10.1.211.22]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w3OEJCmp024093; Tue, 24 Apr 2018 15:19:12 +0100 X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org From: Sami Mujawar To: edk2-devel@lists.01.org Date: Tue, 24 Apr 2018 15:19:06 +0100 Message-Id: <20180424141906.88016-1-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 Subject: [edk2] [PATCH v1] Platform/ARM: Fix platform timer offset in GTDT X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, Arvind Chauhan , ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, Stephanie.Hughes-Fitt@arm.com 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" The FVP_PLATFORM_TIMER_COUNT is the sum of the memory mapped platform timers and the watchdog timers. The watchdog timers can be disabled by setting the FVP_WATCHDOG_COUNT (defined by PcdWatchdogCount) to zero. On the VExpress platform, if the FVP_WATCHDOG_COUNT is set to zero, the FVP_PLATFORM_TIMER_COUNT is 1 as VExpress has one memory mapped timer. The code however incorrectly sets the platform timer offset to zero in the GTDT. This causes the OS to read the platform timer information from an invalid offset, and may crash. Updated the GTDT table to set the platform timer offset to zero only when the FVP_PLATFORM_TIMER_COUNT is zero. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar Reviewed-by: Evan Lloyd Reviewed-by: Ard Biesheuvel --- Notes: v1: - Fix platform timer offset in GTDT for FVP [SAMI] Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/V= ExpressPkg/AcpiTables/Gtdt.aslc index ae570574b298094ff468f30b78fbd8c98db506c5..1cb4b498300cf1a085148356771= 54eace1dd1803 100644 --- a/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc +++ b/Platform/ARM/VExpressPkg/AcpiTables/Gtdt.aslc @@ -108,7 +108,7 @@ 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) +#if (FVP_PLATFORM_TIMER_COUNT !=3D 0) sizeof (EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 Platf= romTimerOffset #else 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