From patchwork Wed Feb 4 14:01:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 44346 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BD2592029F for ; Wed, 4 Feb 2015 14:05:13 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y19sf1459606wgg.2 for ; Wed, 04 Feb 2015 06:05:13 -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=W6g5eVmFU8rlb4EHMKfsyN0NMCKYUkT5fZ95MuONh7w=; b=bfDdN+HEdE87w8b+0EoWuamRiG9l8PNByda9jsKMfCxgaRaYdnwhGQ6bcqfCgeiQrw If/sGRVa8wkIlncvsEfFsfh0RKpDk6Gw0XqVnE5oTfMbJ1jHc8axkjbbOK/6JO+stXRw PqSwxo7pvKkZ6T6mPbHIYlIEeCcfq8NDm6tBytZPE8HxkNmnzUp6Enlrl1UqpZlVT3dw bPFm2vN//grbb3BBTb7zV63Ter83ZMkIkx6rMMIQPe1b40xdAR6RYPRTdQgRgDevi6ZS 4fWNFBsHmi424oC04jyvPQHGrG4KXPZ+OmQpPV2Jaf2HwH02nf6iqTI5C2rMGQNO5RLb bcxg== X-Gm-Message-State: ALoCoQkSKCa8HpN4/7DM/By/YGfE8QsYY00wbkTm6W8Y5Y0AEYpmXYRkSaKM6C31iwB6U2FK2IDt X-Received: by 10.180.12.146 with SMTP id y18mr372646wib.6.1423058713100; Wed, 04 Feb 2015 06:05:13 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.182.140 with SMTP id ee12ls40928lac.1.gmail; Wed, 04 Feb 2015 06:05:12 -0800 (PST) X-Received: by 10.152.120.198 with SMTP id le6mr9601431lab.58.1423058712892; Wed, 04 Feb 2015 06:05:12 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id aa1si1452343lbc.24.2015.02.04.06.05.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 06:05:12 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so1696432lab.6 for ; Wed, 04 Feb 2015 06:05:12 -0800 (PST) X-Received: by 10.112.140.74 with SMTP id re10mr2686343lbb.80.1423058712797; Wed, 04 Feb 2015 06:05:12 -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 h5csp506816lbj; Wed, 4 Feb 2015 06:05:11 -0800 (PST) X-Received: by 10.220.11.68 with SMTP id s4mr19492467vcs.0.1423058705507; Wed, 04 Feb 2015 06:05:05 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id f11si739702vdg.34.2015.02.04.06.05.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 06:05:05 -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 1YJ0YA-0006Ta-42; Wed, 04 Feb 2015 14:03:26 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJ0Y8-0006T6-Vj for xen-devel@lists.xen.org; Wed, 04 Feb 2015 14:03:25 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id 24/C0-03511-CA622D45; Wed, 04 Feb 2015 14:03:24 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-3.tower-206.messagelabs.com!1423058602!3539617!1 X-Originating-IP: [209.85.220.54] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30374 invoked from network); 4 Feb 2015 14:03:23 -0000 Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by server-3.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 4 Feb 2015 14:03:23 -0000 Received: by mail-pa0-f54.google.com with SMTP id eu11so2833953pac.13 for ; Wed, 04 Feb 2015 06:03:22 -0800 (PST) X-Received: by 10.70.126.100 with SMTP id mx4mr14459788pdb.138.1423058601934; Wed, 04 Feb 2015 06:03:21 -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.03.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 06:03:20 -0800 (PST) From: parth.dixit@linaro.org To: xen-devel@lists.xen.org Date: Wed, 4 Feb 2015 19:31:48 +0530 Message-Id: <1423058539-26403-5-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, Naresh Bhat , julien.grall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH RFC 04/35] ACPI / ACPICA: Introduce ARM Boot Architecture Flags in FADT 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.215.47 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: Naresh Bhat 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 --- xen/include/acpi/actbl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xen/include/acpi/actbl.h b/xen/include/acpi/actbl.h index 856945d..34e8673 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 Boot Architecture Flags (see below for individual flags) */ + u8 minor_version; /* Minor version of this FADT structure */ 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) [Vx]=Introduced in this FADT revision */ #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) */ + +#define ACPI_FADT_PSCI_COMPLIANT (1) /* 00: PSCI 0.2+ is implemented */ +#define ACPI_FADT_PSCI_USE_HVC (1<<1) /* 01: 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 (arm_boot_flags) + 3) #define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control)) #define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt))