From patchwork Mon May 4 06:04:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47988 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 791C920553 for ; Mon, 4 May 2015 06:05:09 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf41281933wgi.3 for ; Sun, 03 May 2015 23:05: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=Kd90PcYbhgGj0CN5qd6Z9y33S/Gx54kvfC10VgY0dhM=; b=Mwl88pr3QFbKsuAkBxHJfT7mT+yljhhKKzppWnGlXxUyBy3Cd7cUYoHUhAfn4BT6RS WoioADSIJinz6f+NliABMB0kxOncKs0ZIqEo1AhT5q5eWskWV3LMd2rTjKI3h3wh7umy 5uo2xga9T8mlpkMcynDMGXcbE3xUCICnOO+znxbzNBaeD1Vze6zak2D5t1ct2hg7Yzp7 agjpv7fVLaexjH85y/kd0CbLfWxAfXNOCCDDfKDz5ustXp+sTQRjGM4cHwWWKk3QJY7W eUcFyj8oG8Enj86qER+JBJVvl/NFnHPWK1U+lGE6NpLW6EeMaYh/zTuKxfFzB49heO8k CTDg== X-Gm-Message-State: ALoCoQmp+WnzGtaJ/6T3iJ//TtnpSWTzCJolwgmsWzRh5aikA7v8vuu0IYExPHjfNtOUc4iNVBZ0 X-Received: by 10.152.8.17 with SMTP id n17mr17483971laa.0.1430719508778; Sun, 03 May 2015 23:05:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.39 with SMTP id kv7ls718718lac.63.gmail; Sun, 03 May 2015 23:05:08 -0700 (PDT) X-Received: by 10.112.143.137 with SMTP id se9mr18003925lbb.60.1430719508559; Sun, 03 May 2015 23:05:08 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id et1si9418495lac.11.2015.05.03.23.05.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 23:05:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagv1 with SMTP id v1so97219033lag.3 for ; Sun, 03 May 2015 23:05:08 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr17862083lbb.112.1430719508417; Sun, 03 May 2015 23:05: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 l1csp1482038lbt; Sun, 3 May 2015 23:05:07 -0700 (PDT) X-Received: by 10.43.65.19 with SMTP id xk19mr342801icb.20.1430719504156; Sun, 03 May 2015 23:05:04 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id da20si9933053icb.39.2015.05.03.23.05.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 23:05: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-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Yp9Us-0003GZ-Gn; Mon, 04 May 2015 06:04:54 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Yp9Uq-0003GT-Il for edk2-devel@lists.sourceforge.net; Mon, 04 May 2015 06:04:52 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.49 as permitted sender) client-ip=74.125.82.49; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f49.google.com; Received: from mail-wg0-f49.google.com ([74.125.82.49]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Yp9Up-0004Z8-Iu for edk2-devel@lists.sourceforge.net; Mon, 04 May 2015 06:04:52 +0000 Received: by wgso17 with SMTP id o17so139667357wgs.1 for ; Sun, 03 May 2015 23:04:45 -0700 (PDT) X-Received: by 10.194.60.4 with SMTP id d4mr39156706wjr.72.1430719485571; Sun, 03 May 2015 23:04:45 -0700 (PDT) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id mv11sm9494381wic.23.2015.05.03.23.04.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 May 2015 23:04:44 -0700 (PDT) From: Ard Biesheuvel To: olivier.martin@arm.com, lersek@redhat.com, edk2-devel@lists.sourceforge.net Date: Mon, 4 May 2015 08:04:29 +0200 Message-Id: <1430719471-16998-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430719471-16998-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430719471-16998-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: 1Yp9Up-0004Z8-Iu Subject: [edk2] [PATCH v4 1/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.44 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. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin 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.