From patchwork Wed Apr 29 18:22:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47750 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A8862121F for ; Wed, 29 Apr 2015 18:22:44 +0000 (UTC) Received: by lbos2 with SMTP id s2sf8379286lbo.2 for ; Wed, 29 Apr 2015 11:22:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=zdt3nIfc07smCVIm/DMD/ix0fWf936tKaX34pnEhiCM=; b=mQipfUVc52U65r9c/jZfZ0PHCejanYSA5XOguviM9lKz9CEmz2eBuum3fSiqmE+1YB +Ymy0xxNezYk4zyUR9z02Ll7iHRnA+cPpCqrJXJrPGDmHoL1o4vruwtcAiXwQB4trtXp MmOLc7soKrDmepxYAut5iws4cr8qTeeckZoM30S2MxL3P5NIQjMwdpY3KbvXI/7lukt8 gOcnlL9TOuScBaNwMtcyUyWBXYpcerbjyW8mbWTFUL1ktY+b0Gy32LfZ+7QREpTVwiqP N3fS7or5OPSoWJhUrvjZHkk+eCV7GEHIUtX9ajiEK6yjnvpGFyvemzaPyQx8ip6/UpAO t2+g== X-Gm-Message-State: ALoCoQmCdfvkDsX2U5N3I60gYCeEVVqlVPhIMMEjvXiqZa+5PS/AGfCY8wggIxUhQL9jLNi1VYMo X-Received: by 10.112.162.228 with SMTP id yd4mr237748lbb.8.1430331762789; Wed, 29 Apr 2015 11:22:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.169 with SMTP id r9ls250964laj.86.gmail; Wed, 29 Apr 2015 11:22:42 -0700 (PDT) X-Received: by 10.112.139.1 with SMTP id qu1mr362962lbb.8.1430331762606; Wed, 29 Apr 2015 11:22:42 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id lv6si19930348lac.86.2015.04.29.11.22.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 11:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lagv1 with SMTP id v1so26621682lag.3 for ; Wed, 29 Apr 2015 11:22:42 -0700 (PDT) X-Received: by 10.152.36.2 with SMTP id m2mr338873laj.72.1430331762464; Wed, 29 Apr 2015 11:22:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp2669627lbt; Wed, 29 Apr 2015 11:22:41 -0700 (PDT) X-Received: by 10.50.59.211 with SMTP id b19mr29130333igr.42.1430331758699; Wed, 29 Apr 2015 11:22:38 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id t18si141548icc.89.2015.04.29.11.22.38 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Apr 2015 11:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YnWcv-0003mP-DN; Wed, 29 Apr 2015 18:22:29 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YnWcu-0003mJ-LY for edk2-devel@lists.sourceforge.net; Wed, 29 Apr 2015 18:22:28 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.170 as permitted sender) client-ip=209.85.212.170; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f170.google.com; Received: from mail-wi0-f170.google.com ([209.85.212.170]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YnWcs-0006Ex-TN for edk2-devel@lists.sourceforge.net; Wed, 29 Apr 2015 18:22:28 +0000 Received: by wief7 with SMTP id f7so46366809wie.0 for ; Wed, 29 Apr 2015 11:22:21 -0700 (PDT) X-Received: by 10.180.218.137 with SMTP id pg9mr7992211wic.79.1430331740961; Wed, 29 Apr 2015 11:22:20 -0700 (PDT) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id k2sm301924wix.4.2015.04.29.11.22.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 11:22:20 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, leif.lindholm@linaro.org, roy.franz@linaro.org, geoff@infradead.org, olivier.martin@arm.com Date: Wed, 29 Apr 2015 20:22:08 +0200 Message-Id: <1430331729-7367-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430331729-7367-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430331729-7367-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1YnWcs-0006Ex-TN Subject: [edk2] [PATCH 2/3] ArmVExpressPkg: use PSCI for system reset at runtime X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Since the default EfiResetSystemLib for VExpress cannot be used at runtime (due to the fact that its MMIO registers need to be owned by the OS and so cannot be runtime remapped), instead use PSCI calls into EL3 at runtime. At boot time, the original EfiResetSystemLib is retained. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc index 8dd20ca0abc2..7a8bb8ecd0dd 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc @@ -215,6 +215,15 @@ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf + # + # 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. + # + EfiResetSystemLib|ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf + [LibraryClasses.ARM, LibraryClasses.AARCH64] # # It is not possible to prevent the ARM compiler for generic intrinsic functions.