From patchwork Mon Jul 3 16:17:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 106914 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp55682qge; Mon, 3 Jul 2017 09:19:13 -0700 (PDT) X-Received: by 10.107.157.9 with SMTP id g9mr32282916ioe.46.1499098753530; Mon, 03 Jul 2017 09:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499098753; cv=none; d=google.com; s=arc-20160816; b=RqxOfOFdZz7/nKrTy6tyUaxAUbnHJtrCuPCyYB9REdVmWJKPXYPYkBt5zyXfvyItLz xxEAgTUKhWVd5iUlFTYJR7EO2jvwBg1yt2C1ssH+FFt0N0rnDlwo0Peo34KDVqnJapNT x4Kbj28tBmsE8KjawbN5IJkcYBR3CQ4wxyyNTrFfJivlObUxFzBUp698I4y3B4D+geK3 b4avCFv376gtsWBKeAlVJ3zfM//ep3L/wGFMSLJBuKUuhQHP6/QhuJ2rto2bN0nhQe1y ZbAKaYrbap9WD1YKlTV+aV2NfDXPw2xje1Ip23TlO1tRxFy2Dv1v6J0wAbVSaX5Tn91o WeZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=zX3oripMOSDAvydk8i6WHL7vsmtPAaxXol4Q9kxtDrg=; b=C/dctAslnE0f3nV57xgBADPTwF/p+zPH7djT57ZvbKBdaGUICCp5DZlLCOtIIyhIuC 9DIHFcJduNO3YOqS6C42H7ZbxizrJhRX5YIwJWWt2a6x5tqWsQXDRx/GKEAVQLNckYDt h9cR10ISmc2E61cE+6Qq3kjep/9ASO4XwDHhdLKjq1/BQbGc6Jqw/tRq2mD5k9GGgIdb tPYB/+s8784X2JlqAkAToDVx5oe1fFsJJh7JvGzQsNaPfO2jAz8gdg4YfOb0zck66T9f 8S8PdTxFYaa8S8n+qGa7bF4J6dBT4VjDjQo2ifmAHS7chHX7t8CLu2vQN5KVMljLmSkp P4Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w190si11900773ita.11.2017.07.03.09.19.13; Mon, 03 Jul 2017 09:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AB3C760B18; Mon, 3 Jul 2017 16:19:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5A06260AED; Mon, 3 Jul 2017 16:19:07 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1CAA860AD0; Mon, 3 Jul 2017 16:19:05 +0000 (UTC) Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) by lists.linaro.org (Postfix) with ESMTPS id 04BD760AD0 for ; Mon, 3 Jul 2017 16:19:04 +0000 (UTC) Received: by mail-wr0-f173.google.com with SMTP id c11so237026101wrc.3 for ; Mon, 03 Jul 2017 09:19:03 -0700 (PDT) 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; bh=OtFsKD6mh4xjyz83PLAsNuUrwiTjCMnkT/I4HbTQ4B8=; b=an3COpzRXJying3P5iTwhIzQsQxAgcKOyMUo+q5yyXSwzf5l/rjG8ncRDAiLEYq3Bn k8ElrhTNce+u1wKH+daXxYnxA4wYI1IP/+4ZZxOj3IcIzszwKuxnejRZTwUD26dviVVX It4IPEM+llmmaL1oVygeEujbMViEddJmXjZ4fJsKzFe8HX1RP9j3L5YhttR20Nz/sImr 1dks5AzUa80bXsQ/zzhaNVHQIIGFgJrDI7mU143V+rk7wy6zkKHXJ9BS2tmk9vlZHqCO cH06DNNc9D2F4HprICzT2c0s6oSI4fwqaf+UEn4SzSuck7l9G/Wy1+omZulIdGIhV49f nN6g== X-Gm-Message-State: AKS2vOzPJTyieDRBggSql29CWEJIbg38uTfyeEqrLyJf+gkfYJTo+Mhz VuLH5r6wmGXlimWGu7ZrjOOo X-Received: by 10.223.180.67 with SMTP id v3mr30001240wrd.0.1499098742841; Mon, 03 Jul 2017 09:19:02 -0700 (PDT) Received: from mohikan.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id f128sm6196392wmd.34.2017.07.03.09.19.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 09:19:02 -0700 (PDT) From: Leif Lindholm To: linaro-uefi@lists.linaro.org Date: Mon, 3 Jul 2017 17:17:01 +0100 Message-Id: <20170703161701.27162-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [Linaro-uefi] [PATCH] Platforms/ARM: move AArch64 platforms to generic ResetSystemRuntimeDxe X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" For historic reasons, ArmVExpress.dsc.inc defaulted to the ArmVExpress MMIO-based implementation of *Efi*ResetSystemLib - invoked via EmbeddedPkg/ResetRuntimeDxe. Since the majority of our platforms are now 64-bit and PSCI-based, flip this logic to default to the ArmPkg ArmSmcPsciResetSystemLib implementation of ResetSystemLib - with ARM-targets retaining the old behaviour. At the same time update FVP and Juno targets to use the new generic ResetSystemRuntimeDxe. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel Reviewed-by: Ryan Harkin --- Platforms/ARM/Juno/ArmJuno.dsc | 3 +-- Platforms/ARM/Juno/ArmJuno.fdf | 2 +- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 2 +- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 2 +- Platforms/ARM/VExpress/ArmVExpress.dsc.inc | 13 ++++++------- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 4ff2246822..bbaaf42aa2 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -41,7 +41,6 @@ ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf NorFlashPlatformLib|ArmPlatformPkg/ArmJunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf - EfiResetSystemLib|ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf @@ -236,7 +235,7 @@ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf - EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf index 7de995a255..61d4f616f4 100644 --- a/Platforms/ARM/Juno/ArmJuno.fdf +++ b/Platforms/ARM/Juno/ArmJuno.fdf @@ -97,7 +97,7 @@ FvNameGuid = B73FE497-B92E-416e-8326-45AD0D270092 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf - INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf + INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index 1e95971cdd..d194af5f91 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -240,7 +240,7 @@ } MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf - EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 39fa325163..906364723c 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -89,7 +89,7 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf - INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf + INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf diff --git a/Platforms/ARM/VExpress/ArmVExpress.dsc.inc b/Platforms/ARM/VExpress/ArmVExpress.dsc.inc index 0bad7c963c..3f6e50573c 100644 --- a/Platforms/ARM/VExpress/ArmVExpress.dsc.inc +++ b/Platforms/ARM/VExpress/ArmVExpress.dsc.inc @@ -83,7 +83,7 @@ PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf - EfiResetSystemLib|ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.inf + ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf !ifdef EDK2_ENABLE_PL111 # ARM PL111 Lcd Driver LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf @@ -247,15 +247,14 @@ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif -[LibraryClasses.AARCH64.DXE_RUNTIME_DRIVER] +[LibraryClasses.ARM] # # PSCI support in EL3 may not be available if we are not running under a PSCI - # compliant secure firmware, but since the default VExpress EfiResetSystemLib - # cannot be supported at runtime (due to the fact that the syscfg MMIO registers - # cannot be runtime remapped), it is our best bet to get ResetSystem functionality - # on these platforms. + # compliant secure firmware. Assume PSCI on AARCH64, and fall back to the + # syscfg MMIO register implementation on ARM. + # This will not work at actual runtime. # - EfiResetSystemLib|ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf + EfiResetSystemLib|ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.inf [LibraryClasses.ARM, LibraryClasses.AARCH64] #