From patchwork Fri May 1 15:35:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47887 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A86620553 for ; Fri, 1 May 2015 15:36:09 +0000 (UTC) Received: by wiun10 with SMTP id n10sf17524463wiu.1 for ; Fri, 01 May 2015 08:36:08 -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=nY6z7wWh0P1BL3vMDmaE/I9tzcnM8e6Xf+gKaE+0khw=; b=LIyVoy5WYBq6Idk3Zeobu1FvBUlbn+dSO0SU6wbm/JI4OEToceZ0B9JPysOPnU/M2G iwN+HL8L6duheH5MipcGQVUxbCKayMNfUoHiY8yJ01V/+LjdZq9J6HzYihed7K+WYMvS HKfbM6KDOAEXl4efWK0V9zcpgAPSsKYE9SHkQZdCG3mDAXk80vMSMZS5jXemLcavrThn xW/PIUPUnFjZUh76Y4AnkfOVBFMC5XRLN7H7M/L8oD5TmV6BpywxCMoX5QL/aLHOdpzv xFsXmqGCpkq/wRz16krWnh9N0DBU3LUiG3GTBUT7lVPHoOEGrC6E+xRDHNJhtj2DaqWD s8fQ== X-Gm-Message-State: ALoCoQkv9vnNTi4GSsH/XrX4B2NfeXAwSTEuWxudZ4x2j1LNw5aoAf/fj4rLylqmMrEowaXe6LpX X-Received: by 10.112.118.162 with SMTP id kn2mr8505720lbb.22.1430494568903; Fri, 01 May 2015 08:36:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.10 with SMTP id z10ls527333lae.24.gmail; Fri, 01 May 2015 08:36:08 -0700 (PDT) X-Received: by 10.152.2.227 with SMTP id 3mr8519523lax.73.1430494568760; Fri, 01 May 2015 08:36:08 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id yg6si4160427lbb.137.2015.05.01.08.36.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 08:36:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbcga7 with SMTP id ga7so66948365lbc.1 for ; Fri, 01 May 2015 08:36:08 -0700 (PDT) X-Received: by 10.112.16.196 with SMTP id i4mr8545852lbd.72.1430494568618; Fri, 01 May 2015 08:36:08 -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 l1csp350061lbt; Fri, 1 May 2015 08:36:07 -0700 (PDT) X-Received: by 10.107.3.17 with SMTP id 17mr12632186iod.60.1430494564223; Fri, 01 May 2015 08:36:04 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id 65si4493267iom.65.2015.05.01.08.36.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 01 May 2015 08:36:04 -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-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YoCyp-0004Fx-TE; Fri, 01 May 2015 15:35:55 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YoCyp-0004Fm-Cy for edk2-devel@lists.sourceforge.net; Fri, 01 May 2015 15:35:55 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.51 as permitted sender) client-ip=74.125.82.51; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f51.google.com; Received: from mail-wg0-f51.google.com ([74.125.82.51]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YoCyo-0000L3-Gk for edk2-devel@lists.sourceforge.net; Fri, 01 May 2015 15:35:55 +0000 Received: by wgyo15 with SMTP id o15so93819812wgy.2 for ; Fri, 01 May 2015 08:35:48 -0700 (PDT) X-Received: by 10.180.101.65 with SMTP id fe1mr15136424wib.22.1430494548463; Fri, 01 May 2015 08:35:48 -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 16sm7998511wjs.41.2015.05.01.08.35.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 May 2015 08:35:47 -0700 (PDT) From: Ard Biesheuvel To: lersek@redhat.com, olivier.martin@arm.com, leif.lindholm@linaro.org, roy.franz@linaro.org, geoff@infradead.org, edk2-devel@lists.sourceforge.net Date: Fri, 1 May 2015 17:35:33 +0200 Message-Id: <1430494534-4151-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430494534-4151-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430494534-4151-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 -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YoCyo-0000L3-Gk Subject: [edk2] [PATCH v3 1/2] 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.217.177 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc index 8dd20ca0abc2..0bac7f6c4de9 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc @@ -75,7 +75,6 @@ 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 # ARM PL111 Lcd Driver LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf # ARM PL031 RTC Driver @@ -215,6 +214,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.