From patchwork Tue Nov 17 09:40:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 56724 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1825292lbb; Tue, 17 Nov 2015 01:43:56 -0800 (PST) X-Received: by 10.31.49.131 with SMTP id x125mr2613419vkx.104.1447753435062; Tue, 17 Nov 2015 01:43:55 -0800 (PST) Return-Path: Received: from lists.xen.org (lists.xenproject.org. [50.57.142.19]) by mx.google.com with ESMTPS id b79si2015335vkd.182.2015.11.17.01.43.54 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Nov 2015 01:43:55 -0800 (PST) Received-SPF: neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=50.57.142.19; Authentication-Results: mx.google.com; spf=neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zycmi-0002fA-F4; Tue, 17 Nov 2015 09:42:44 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zycmg-0002dn-AA for xen-devel@lists.xen.org; Tue, 17 Nov 2015 09:42:42 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id 6E/42-02940-196FA465; Tue, 17 Nov 2015 09:42:41 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-7.tower-31.messagelabs.com!1447753360!4317930!1 X-Originating-IP: [74.125.82.49] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 7.19.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 55071 invoked from network); 17 Nov 2015 09:42:40 -0000 Received: from mail-wm0-f49.google.com (HELO mail-wm0-f49.google.com) (74.125.82.49) by server-7.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Nov 2015 09:42:40 -0000 Received: by wmww144 with SMTP id w144so145543019wmw.1 for ; Tue, 17 Nov 2015 01:42:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ecacBt5SiJuTwFHSbixfpZDBFRO4W51sMSiS4twwESY=; b=yIj8ujcaMfy12fOgxpl0v9Z7hJSz27TdatWrcqnXKFcICoIRStdOL/Et3s5zX8mmBe XxCUtJGuKtCC02OawpRhxXaK/mq003oEI3g3yKRO/sZOBWwAsX/RjmKyO2+YAG/dvy9h 76JgBUquh8kDoQ5rWl52AkVyHZTBRyWTskxTphrM3wl5jTo83Z/JvT+tQqiJCd0WwFGx 5vTMyWHsSyep56AyQ95ed1vCLw1Oc81aZYh/ZGy70HZ8tcxBwngKctZDFEiCpKbetL0j qJ8/6PplcY8xXzfRuXbdAsx9SgqeWVw+lRhwP1e/uf7bQXgjiss9rsfCooODWB398m89 F71Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ecacBt5SiJuTwFHSbixfpZDBFRO4W51sMSiS4twwESY=; b=GMYkMZwlf/C9j1wcCIEWoj3z3xNRu47vM6DLrdDUhI9WkLsXxBECxn4On3tmHWRure 5wAR2cMDIcltYvB3GV9izPPGJRaARLozjTa9Wl913zHcg87I7b4TRdPu1KATdHg+sitD 4W8rJlGgGCqiXFwxuXLN0ASgZkGNTmqU91wmVTjndvXV0bMUSKzOMl6mO0UeoX4b1UNR BeLDjlvzgYPyKHYlpSuXyhAoGHVZ4uUgJoh63rdyecpReHSI/aqLAjnyjnP55DBys4NZ D2rBewi9GOgVZQxAJ73moWs4VXkbXFvlxUQbVTDLbeWIPPP4NQFpov2dzVLnZE7vwH6z O2fQ== X-Gm-Message-State: ALoCoQlihVkuCZK/mhaJs8C1eUto0AHNveFkJH4fXNNALzjDB1sHnLhGEcva+3vPf6joLLelocvX X-Received: by 10.194.189.133 with SMTP id gi5mr42502626wjc.13.1447753360375; Tue, 17 Nov 2015 01:42:40 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id u139sm22913161wmu.22.2015.11.17.01.42.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:42:39 -0800 (PST) From: shannon.zhao@linaro.org To: ian.campbell@citrix.com, stefano.stabellini@citrix.com, keir@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com, julien.grall@citrix.com, xen-devel@lists.xen.org Date: Tue, 17 Nov 2015 17:40:10 +0800 Message-Id: <1447753261-7552-12-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> References: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> Cc: mark.rutland@arm.com, hangaohuai@huawei.com, ard.biesheuvel@linaro.org, shannon.zhao@linaro.org, christoffer.dall@linaro.org, peter.huangpeng@huawei.com, david.vrabel@citrix.com, zhaoshenglong@huawei.com, linux-arm-kernel@lists.infradead.org, roger.pau@citrix.com Subject: [Xen-devel] [PATCH v3 11/62] arm/acpi: Introduce ARM Boot Architecture Flags in FADT X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion 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 From: Shannon Zhao The Power State Coordination Interface (PSCI) defines an API that can be used to coordinate power control amongst the various supervisory systems concurrently running on a device. ACPI support for this technology would require the addition of two flags: PSCI_COMPLIANT and PSCI_USE_HVC. When set, the former signals to the OS that the hardware is PSCI compliant. The latter selects the appropriate conduit for PSCI calls by toggling between Hypervisor Calls (HVC) and Secure Monitor Calls (SMC). An ARM Boot Architecture Flags structure to support new ARM hardware was introduced in FADT in ACPI 5.1, add the code accordingly to implement that in ACPICA core. Since ACPI 5.1 doesn't support self defined PSCI function IDs, which means that only PSCI 0.2+ is supported in ACPI. Signed-off-by: Hanjun Guo Signed-off-by: Naresh Bhat Signed-off-by: Shannon Zhao --- xen/include/acpi/actbl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel diff --git a/xen/include/acpi/actbl.h b/xen/include/acpi/actbl.h index 856945d..66e29c3 100644 --- a/xen/include/acpi/actbl.h +++ b/xen/include/acpi/actbl.h @@ -244,7 +244,8 @@ struct acpi_table_fadt { u32 flags; /* Miscellaneous flag bits (see below for individual flags) */ struct acpi_generic_address reset_register; /* 64-bit address of the Reset register */ u8 reset_value; /* Value to write to the reset_register port to reset the system */ - u8 reserved4[3]; /* Reserved, must be zero */ + u16 arm_boot_flags; /* ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */ + u8 minor_revision; /* FADT Minor Revision (ACPI 5.1) */ u64 Xfacs; /* 64-bit physical address of FACS */ u64 Xdsdt; /* 64-bit physical address of DSDT */ struct acpi_generic_address xpm1a_event_block; /* 64-bit Extended Power Mgt 1a Event Reg Blk address */ @@ -259,7 +260,7 @@ struct acpi_table_fadt { struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register */ }; -/* Masks for FADT Boot Architecture Flags (boot_flags) */ +/* Masks for FADT IA-PC Boot Architecture Flags (boot_flags) */ #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ @@ -270,6 +271,11 @@ struct acpi_table_fadt { #define FADT2_REVISION_ID 3 +/* Masks for FADT ARM Boot Architecture Flags (arm_boot_flags) ACPI 5.1 */ + +#define ACPI_FADT_PSCI_COMPLIANT (1) /* 00: [V5+] PSCI 0.2+ is implemented */ +#define ACPI_FADT_PSCI_USE_HVC (1<<1) /* 01: [V5+] HVC must be used instead of SMC as the PSCI conduit */ + /* Masks for FADT flags */ #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ @@ -345,7 +351,7 @@ enum acpi_prefered_pm_profiles { * FADT V5 size: 0x10C */ #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) -#define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) +#define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (minor_revision) + 1) #define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control)) #define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt))