From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 0D16E2277AF25 for ; Mon, 23 Apr 2018 08:01:15 -0700 (PDT) Received: by mail-wr0-x242.google.com with SMTP id d1-v6so42166227wrj.13 for ; Mon, 23 Apr 2018 08:01:15 -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=b0oFL5YN9HW4BXB99FRl/c5l2gTuiHO5bU/hAjrAAVk=; b=Ry7JyznxUKkxjfPeLBP5Hq1E8ATa5zZiKO7+eWwbhMLHSAvgBMQClGrLWUygYFQWJj w0lgFkKhqvk4LvqaK7KeH0qsULWlN6AYquJJ46Kn9HqMAT9U023wOMaXMX8U2ZbRSfh+ zrpm1Ky+sG1W2gB4ciymzgz1eubQip3hi+lGo= 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=b0oFL5YN9HW4BXB99FRl/c5l2gTuiHO5bU/hAjrAAVk=; b=Y4rTsaPietyPscTxN3Jwgo680YjwKgJRFY6wtgHfFMTNh6f9UfI9R3vj6c6QlCiuTA ZhyAJVrnHV4EnSBfn67OqbumiQ15TVXNaTamCoLBtHwOAckQcLVJAIu5UiApFiiSBfQb VBNIP97tcfNw2YsRmaEdthoMEHOiHCAyiHNN20Xa7fCjdX7JIEy048plDPlw6/Cpj/1D LoVdWbXnxs+qY9KtXbAq+nhpwYGSgvzuMbrA/dvzzExYjT/wSb5uEdtptR0ApB1j31OU 2IK0Qxm28tTV4I1ZTJdQ4tfdwywLlqCZlLvWwqi7rv3wiLvoFA0BTmHqIecoWYB28YB7 /09w== X-Gm-Message-State: ALQs6tDQN8Y818m0qLu8ruIpaLOK9iHccp9gIFJSktiYdJdYkCXP+FbL RWK5Jll6J1Pe6i4CQm3IE+q0ahy5aPA= X-Google-Smtp-Source: AIpwx48936rQYmgeY7FDCZwbYGsWmWiH0M7RdXxlPXvyV9qWhHGC13E1bpHC+H6j7bLOxhtWOh3iNQ== X-Received: by 10.28.238.149 with SMTP id j21mr7467749wmi.16.1524495674243; Mon, 23 Apr 2018 08:01:14 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y101sm8955460wmh.10.2018.04.23.08.01.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 08:01:13 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, lersek@redhat.com, julien.grall@arm.com, Ard Biesheuvel Date: Mon, 23 Apr 2018 17:00:56 +0200 Message-Id: <20180423150057.13515-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180423150057.13515-1-ard.biesheuvel@linaro.org> References: <20180423150057.13515-1-ard.biesheuvel@linaro.org> Subject: [PATCH 1/2] ArmPkg: add reenable hook to ArmGenericTimerCounterLib 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: , X-List-Received-Date: Mon, 23 Apr 2018 15:01:16 -0000 In preparation of selectively reinstating the timer enable quirk for Xen that we removed in commit 411a373ed642 ("ArmPkg/TimerDxe: remove workaround for KVM timer handling"), add a ArmGenericTimerReenableTimer() library function to ArmGenericTimerCounterLib that we will populate for Xen only. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 + ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 6 ++++++ ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c | 8 ++++++++ ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c | 8 ++++++++ 4 files changed, 23 insertions(+) diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c index bd616d2efc73..478f1bece565 100644 --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c @@ -337,6 +337,7 @@ TimerInterruptHandler ( // Set next compare value ArmGenericTimerSetCompareVal (CompareValue); + ArmGenericTimerReenableTimer (); ArmInstructionSynchronizationBarrier (); } diff --git a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h index 805025baa14b..47e28b79c033 100644 --- a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h +++ b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h @@ -22,6 +22,12 @@ ArmGenericTimerEnableTimer ( VOID ); +VOID +EFIAPI +ArmGenericTimerReenableTimer ( + VOID + ); + VOID EFIAPI ArmGenericTimerDisableTimer ( diff --git a/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c b/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c index d04e04fb334d..03519f50e79a 100644 --- a/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c +++ b/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c @@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer ( ArmWriteCntpCtl (TimerCtrlReg); } +VOID +EFIAPI +ArmGenericTimerReenableTimer ( + VOID + ) +{ +} + VOID EFIAPI ArmGenericTimerDisableTimer ( diff --git a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c index c941895a3574..4bb1e1cde538 100644 --- a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c +++ b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c @@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer ( ArmWriteCntvCtl (TimerCtrlReg); } +VOID +EFIAPI +ArmGenericTimerReenableTimer ( + VOID + ) +{ +} + VOID EFIAPI ArmGenericTimerDisableTimer ( -- 2.17.0