From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c01::241; helo=mail-pl0-x241.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::241]) (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 83563224C0F46 for ; Sun, 11 Mar 2018 23:48:06 -0700 (PDT) Received: by mail-pl0-x241.google.com with SMTP id 93-v6so8818305plc.9 for ; Sun, 11 Mar 2018 23:54:26 -0700 (PDT) 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=73MVuz/I8F5bExhzBr3cZuLr//4GS/KVrV/WwLsB/hU=; b=LvbQp4yqwdA7zvGi2E/A5lRSnF5OyctsqZ7xqciGTOWtmN1eHjr1USIlMHtasEeYCx erwZNazCCTgoM9TeVSBvo7I+AlQO6mOvI2cIyVL07vQw5+/uESagENV60tqVZ+9DAKDE vWNQqDgZd29jGvoHWLmt1w9GNrgJk/xIrjAD4= 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=73MVuz/I8F5bExhzBr3cZuLr//4GS/KVrV/WwLsB/hU=; b=kK7IH/mlrxZ7aSZshUEFBsXmEr4ZwBx7U+DkoYMFbI4Dw+tBGajEkpZmqKGt8HxTmc 57bQDTh2Kt+VLnTcPsPOG9+KcOUY/T6zooieHSMf9H09ZiucgfvjGOJILXjsw4fYl/4h AwIAwo3kvLpRd0imB2JdrzHX9PqFZ1luB9xftVISg5+nCBbf78vcf0MG7nYdLvHGEZbW tcwCpKw1+c0QSy7nRYFWPIyu7AloGY+1pNURHjesHEH4dK7FH3c6E2ui2q+CmTPSceRQ Wy/LkwozlaSoV/fJWBS0qVgbuE2UZOvFUVAJ4Ndwn45nShhhkT6RSp8jx9QdPeT9ykrf zAeg== X-Gm-Message-State: AElRT7F8SHDnNXpgXWKj/RjAnWcTmbAZxdoVDekjGnmcVL1UyjH58JJT wCAb5XuOSm8WLefziUIuiC0rDiPT4Kg= X-Google-Smtp-Source: AG47ELtpLkK9vDpxoJT936ET6/RQJz6nxEudCKI7O4/yUmis9PlnJG8BGyvRrrk3SdsiV3RhPIEDCw== X-Received: by 2002:a17:902:20c9:: with SMTP id v9-v6mr7295420plg.41.1520837666409; Sun, 11 Mar 2018 23:54:26 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.76]) by smtp.gmail.com with ESMTPSA id m9sm15357348pff.143.2018.03.11.23.54.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 11 Mar 2018 23:54:25 -0700 (PDT) From: Heyi Guo To: edk2-devel@lists.01.org Cc: Heyi Guo , Yi Li , Leif Lindholm , Ard Biesheuvel , Marc Zyngier Date: Mon, 12 Mar 2018 14:53:31 +0800 Message-Id: <1520837611-94728-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520837611-94728-1-git-send-email-heyi.guo@linaro.org> References: <1520837611-94728-1-git-send-email-heyi.guo@linaro.org> Subject: [PATCH 1/1] ArmPkg/TimerDxe: Add DSB 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: , X-List-Received-Date: Mon, 12 Mar 2018 06:48:06 -0000 Resetting timer compare register has a side effect of clearing GIC pending status, if timer interrupt is level sensitive, so a "DSB SY" is needed to make sure this change effect is synchronized. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo Signed-off-by: Yi Li Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Marc Zyngier --- ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c index 33d7c922221f..b732a2ac1b64 100644 --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c @@ -337,6 +337,7 @@ TimerInterruptHandler ( // Set next compare value ArmGenericTimerSetCompareVal (CompareValue); + ArmDataSynchronizationBarrier (); ArmGenericTimerEnableTimer (); } -- 2.7.4