From patchwork Wed Feb 4 14:02:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 44365 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4044D2029F for ; Wed, 4 Feb 2015 14:07:10 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf1489672lbj.2 for ; Wed, 04 Feb 2015 06:07:09 -0800 (PST) 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:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=q5qtNI0o4Cl4wlmzXzxtVUfplbn96L7EVUyk2WTEZ3s=; b=YIrp5lOhFJdSjNCMv95vxMWdSQI0+uqYn9aJZZI0R9BLzevf0n8IFXIVedxp+ph24i 4KaD2UwQDfkjtSSxNPtBeTNxN9TidtNNNfqt5Ju5l9N235Orzn1Vmxf7Rm3+7qnpQ1vS a88MkvTEpWxNKiXXLSQoT3STAFz1jMCFjDa7TPZ+KrSDAKrAwRaaFRaILKW83PQbY++o rjtA/HhvbNlty0dPH56UliTLD+KI1AkhdPaeycki/fSmU+KQSdXWooqAOdgE7YitH3x3 4wFFgqclKi9RjnBznRHU/zpSwZOr8A6iCrUK1PDhP4Ta4ZWEoSnP3ShNeiyuEKJkhPe8 Ymww== X-Gm-Message-State: ALoCoQlCP+SC8E2NXRmNqOVT1jG0g+V75w5qAketEjoLbriVM3c5vzJ4eE9ug4lTTBI/leeEajFJ X-Received: by 10.180.109.13 with SMTP id ho13mr527407wib.7.1423058829220; Wed, 04 Feb 2015 06:07:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.6 with SMTP id 6ls38722lai.24.gmail; Wed, 04 Feb 2015 06:07:09 -0800 (PST) X-Received: by 10.112.129.195 with SMTP id ny3mr31146799lbb.10.1423058829065; Wed, 04 Feb 2015 06:07:09 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id lc9si1383048lac.120.2015.02.04.06.07.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 06:07:09 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id u10so1621968lbd.12 for ; Wed, 04 Feb 2015 06:07:09 -0800 (PST) X-Received: by 10.152.20.169 with SMTP id o9mr30945427lae.50.1423058828989; Wed, 04 Feb 2015 06:07:08 -0800 (PST) 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.35.133 with SMTP id h5csp508197lbj; Wed, 4 Feb 2015 06:07:08 -0800 (PST) X-Received: by 10.140.92.33 with SMTP id a30mr61319407qge.30.1423058827505; Wed, 04 Feb 2015 06:07:07 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id f8si2067057qar.87.2015.02.04.06.07.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 06:07:07 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJ0aw-0000a6-TG; Wed, 04 Feb 2015 14:06:18 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJ0av-0000Xh-DC for xen-devel@lists.xen.org; Wed, 04 Feb 2015 14:06:17 +0000 Received: from [193.109.254.147] by server-11.bemta-14.messagelabs.com id A2/77-02760-85722D45; Wed, 04 Feb 2015 14:06:16 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-6.tower-27.messagelabs.com!1423058774!12767935!1 X-Originating-IP: [209.85.220.45] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1237 invoked from network); 4 Feb 2015 14:06:15 -0000 Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by server-6.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 4 Feb 2015 14:06:15 -0000 Received: by mail-pa0-f45.google.com with SMTP id et14so3016380pad.4 for ; Wed, 04 Feb 2015 06:06:14 -0800 (PST) X-Received: by 10.66.174.165 with SMTP id bt5mr47046247pac.53.1423058774029; Wed, 04 Feb 2015 06:06:14 -0800 (PST) Received: from parthd-ubunutu.qualcomm.com ([202.46.23.62]) by mx.google.com with ESMTPSA id kg12sm2161881pbb.44.2015.02.04.06.06.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 06:06:12 -0800 (PST) From: parth.dixit@linaro.org To: xen-devel@lists.xen.org Date: Wed, 4 Feb 2015 19:32:13 +0530 Message-Id: <1423058539-26403-30-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> Cc: ian.campbell@citrix.com, julien.grall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, Parth Dixit , christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH RFC 29/35] arm : acpi enable PSCI and hvc in acpi FADT table X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: parth.dixit@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.181 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 List-Archive: From: Parth Dixit Enable PSCI and hvc flags in FADT table so that dom0 uses PSCI to boot vcpu's Signed-off-by: Parth Dixit --- xen/arch/arm/arm64/acpi/arm-core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xen/arch/arm/arm64/acpi/arm-core.c b/xen/arch/arm/arm64/acpi/arm-core.c index 6707e4c..9a26202 100644 --- a/xen/arch/arm/arm64/acpi/arm-core.c +++ b/xen/arch/arm/arm64/acpi/arm-core.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -242,6 +243,19 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) return 0; } +static void set_psci_fadt(void) +{ + struct acpi_table_fadt *fadt=NULL; + struct acpi_table_header *table=NULL; + u8 checksum; + + acpi_get_table(ACPI_SIG_FADT, 0, &table); + fadt = (struct acpi_table_fadt *)table; + fadt->arm_boot_flags |= ( ACPI_FADT_PSCI_COMPLIANT | ACPI_FADT_PSCI_USE_HVC ); + checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, fadt), fadt->header.length); + fadt->header.checksum = (u8)( fadt->header.checksum-checksum ); +} + int acpi_map_tables(struct domain *d) { int i,res; @@ -263,6 +277,8 @@ int acpi_map_tables(struct domain *d) return res; } + set_psci_fadt(); + for( i = 0; i < acpi_gbl_root_table_list.count; i++ ) { addr = acpi_gbl_root_table_list.tables[i].address;