From patchwork Thu Apr 30 07:12:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47759 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 6E36520553 for ; Thu, 30 Apr 2015 07:12:42 +0000 (UTC) Received: by wizk4 with SMTP id k4sf2075903wiz.2 for ; Thu, 30 Apr 2015 00:12:41 -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=kRwz+pKxG1TyWE4k06LISDhs6bVXQug9a3+gSmqXbDHRySLTS9BJet/Xf7lRc9k7+K phU/GY1DCuS8XLu05EAvYTM3UM1KrLc64aTemjc0jr6EKAIlJl+AlUfsotsBHw9f4jSY bGDER8lvhMy44zz7Ka6L6IQWQZcS3FS2sb24jIuD8/Ot3UPZ8JTJ2QOYDmZppdwqczEo 7/VCRoE1ZAuBt0h8+bsl+gnAA6SuLxqsHthVWxc4HAgil0Klo9HurPcC7iCy/3m5I1jh xtyb1Hv3AQuLtLR9zdbIhMANmha/a0xSrrolJLPEGleE7EYffxVGtsLz4L1RVeSw7so/ EUig== X-Gm-Message-State: ALoCoQkc1lr/nh/idlTkw/M7l4KaS8bI4v8iLE4wjF9YG8c4l3N9NTyQdXO46X5ctjUTy/koEgW9 X-Received: by 10.112.219.200 with SMTP id pq8mr1698611lbc.7.1430377961773; Thu, 30 Apr 2015 00:12:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.65 with SMTP id lu1ls312825lac.104.gmail; Thu, 30 Apr 2015 00:12:41 -0700 (PDT) X-Received: by 10.112.135.131 with SMTP id ps3mr2525511lbb.84.1430377961626; Thu, 30 Apr 2015 00:12:41 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id dk9si1063120lad.162.2015.04.30.00.12.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 00:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbuc2 with SMTP id uc2so37539860lbb.2 for ; Thu, 30 Apr 2015 00:12:41 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr2472503lbc.41.1430377961526; Thu, 30 Apr 2015 00:12:41 -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 l1csp2938748lbt; Thu, 30 Apr 2015 00:12:40 -0700 (PDT) X-Received: by 10.42.23.17 with SMTP id q17mr7715943icb.4.1430377959805; Thu, 30 Apr 2015 00:12:39 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id u9si1411945ics.77.2015.04.30.00.12.38 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 30 Apr 2015 00:12:39 -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-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ynie6-0005D3-P2; Thu, 30 Apr 2015 07:12:30 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ynie5-0005Cx-KW for edk2-devel@lists.sourceforge.net; Thu, 30 Apr 2015 07:12:29 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.53 as permitted sender) client-ip=74.125.82.53; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f53.google.com; Received: from mail-wg0-f53.google.com ([74.125.82.53]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Ynie3-0004C4-QA for edk2-devel@lists.sourceforge.net; Thu, 30 Apr 2015 07:12:29 +0000 Received: by wgin8 with SMTP id n8so51900072wgi.0 for ; Thu, 30 Apr 2015 00:12:19 -0700 (PDT) X-Received: by 10.180.109.6 with SMTP id ho6mr2791964wib.58.1430377939748; Thu, 30 Apr 2015 00:12:19 -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 ha4sm1056830wib.0.2015.04.30.00.12.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Apr 2015 00:12:18 -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: Thu, 30 Apr 2015 09:12:05 +0200 Message-Id: <1430377926-18431-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430377926-18431-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430377926-18431-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: 1Ynie3-0004C4-QA Subject: [edk2] [PATCH v2 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.175 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.