From nobody Fri May 3 23:31:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1521098293400942.743496445356; Thu, 15 Mar 2018 00:18:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DE9532253FB69; Thu, 15 Mar 2018 00:11:47 -0700 (PDT) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D7B5F224E6903 for ; Thu, 15 Mar 2018 00:11:46 -0700 (PDT) Received: by mail-pg0-x244.google.com with SMTP id r26so2438256pgv.13 for ; Thu, 15 Mar 2018 00:18:10 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.100]) by smtp.gmail.com with ESMTPSA id i186sm9026113pfg.25.2018.03.15.00.18.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Mar 2018 00:18:09 -0700 (PDT) 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=2607:f8b0:400e:c05::244; helo=mail-pg0-x244.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EaiJNvt6MZdZJRjgUvP8Q0ocFLg+9CdNNGlrY/SxfsU=; b=Q9PTTlTxN9Ao3SWmYKmR696GAwWAfqHZu97RZms32q0suZ6PUXMz5P9T5NY4JxdVQm jzWzCVP1DxB/L9RO5jCjjHUMqmAeqgMzpmlg+vTz0HC54fMr2mxPG6UHvPtiEcKzafYb RdFhSRVI3B11D6Xy2AzLspfqKqtI2kwkcY9DQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EaiJNvt6MZdZJRjgUvP8Q0ocFLg+9CdNNGlrY/SxfsU=; b=sq/HK+PDvn+X0c0xniJmuX6DAIIvaVzAb16fLQ2V5ffGe2kChchEADYoVUlvpkkH7o 1B7ny7vEGdKvfrLLUkHhAJFS0VQ4nHtKEMxngqMjP6MPCp/0WYK4eVOo+XFRcEEGlKRW 1TUuMYjxWFy9VtejF1WR83Q+Li0w6ZTajhatrvcuMILGhqcTuqQwD0z5NtKngJiQPGC2 pX9N+mn87xHZMqx76R8Kk8crFEqI/Tc0LAKx//Axzw+cm1uYs3Se2ub4sADipR483H8c rofUeHcXEnm/iQ4I/oUAymKzI4CnBn3Jo+14gGJexjvpPQniSzCtp5QJ1OUvTrpRpbAe 2Nkg== X-Gm-Message-State: AElRT7Hie57meErN9441fg002033hv8HW+R/tbC1zW8sASZyFeBoRtL0 6R88mV8seEMqysYXGfVsAkG5Zo3UAFU= X-Google-Smtp-Source: AG47ELtLMo31RW58hkSUxL4btQTdv/83qK1o7wT/45KkJDOLAjXwqafW1r4YrNkZVmx2O1Fv6GowpQ== X-Received: by 10.98.200.131 with SMTP id i3mr6924084pfk.40.1521098290114; Thu, 15 Mar 2018 00:18:10 -0700 (PDT) From: Heyi Guo To: edk2-devel@lists.01.org Date: Thu, 15 Mar 2018 15:17:43 +0800 Message-Id: <1521098263-52823-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521098263-52823-1-git-send-email-heyi.guo@linaro.org> References: <1521098263-52823-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [PATCH v3 1/1] ArmPkg/TimerDxe: Add ISB for timer compare value reload X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Heyi Guo , Yi Li , 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-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" If timer interrupt is level sensitive, reloading timer compare register has a side effect of clearing GIC pending status, so a "ISB" is needed to make sure this instruction is executed before enabling CPU IRQ, or else we may get spurious timer interrupts. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo Signed-off-by: Yi Li Acked-by: Marc Zyngier Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Marc Zyngier Reviewed-by: Ard Biesheuvel --- Notes: v3: - Move ISB after enabling timer [Marc] =20 v2: - Use ISB instead of DSB [Marc] - Update commit message accordingly. ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/T= imerDxe.c index 33d7c922221f..a3202fa056f3 100644 --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c @@ -338,6 +338,7 @@ TimerInterruptHandler ( // Set next compare value ArmGenericTimerSetCompareVal (CompareValue); ArmGenericTimerEnableTimer (); + ArmInstructionSynchronizationBarrier (); } =20 gBS->RestoreTPL (OriginalTPL); --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel