From patchwork Tue Nov 17 09:40:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 56725 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1825513lbb; Tue, 17 Nov 2015 01:44:27 -0800 (PST) X-Received: by 10.55.22.13 with SMTP id g13mr41078960qkh.8.1447753467494; Tue, 17 Nov 2015 01:44:27 -0800 (PST) Return-Path: Received: from lists.xen.org (lists.xenproject.org. [50.57.142.19]) by mx.google.com with ESMTPS id x190si19804377qhb.91.2015.11.17.01.44.27 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:44:27 -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 1ZycnC-00032U-5X; Tue, 17 Nov 2015 09:43:14 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZycnA-00030m-I9 for xen-devel@lists.xen.org; Tue, 17 Nov 2015 09:43:12 +0000 Received: from [85.158.139.211] by server-10.bemta-5.messagelabs.com id 4B/3E-17090-FA6FA465; Tue, 17 Nov 2015 09:43:11 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-2.tower-206.messagelabs.com!1447753390!4243243!1 X-Originating-IP: [74.125.82.46] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.19.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8347 invoked from network); 17 Nov 2015 09:43:11 -0000 Received: from mail-wm0-f46.google.com (HELO mail-wm0-f46.google.com) (74.125.82.46) by server-2.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Nov 2015 09:43:11 -0000 Received: by wmww144 with SMTP id w144so145561189wmw.1 for ; Tue, 17 Nov 2015 01:43:10 -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=/yLnizAmun0gAdZYHqIZQoS/owqzEc0VxHPg9K5o7iA=; b=eJdiwRYq76HY0oi5LqilkvYo3KpfuncVVMDCWGoz+o+obHlJzC3ZkU8YyYSwiJ2N9Q /98wTt4yyMiUOlWxpKWGB2ggHCS1bfV6MIzjldH/ErZPANr9DCsElujWhhRnldZhVkve YUczoiE2fVCjdpMKaIi1wZWWo3+FOYvagsIQsHqxOKdnr4w6mMKKEKc8uKYLx6YSrKkh r865vEWWdWUOTqUHo3eeT0tJdDFM1VnKGZB3m0QBYIZZU42o41zIy/o2xnCpi6PexJKR PUgSGxq4iJ+0N2fE7H1yfVFy2Gkuk16qGCI/PUb07hTbCuTbvZ5Xkgi0WQI94OIVmx5k zsHw== 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=/yLnizAmun0gAdZYHqIZQoS/owqzEc0VxHPg9K5o7iA=; b=AbiW8qnhL2IKqCFU9ZzbvwadtuafY08MlYUBnh+PjR3E4McyeOVVBZageHbo9FvWhw mH1dz1PixkrxofrGFWLdIgq+tXDtjJPXkbnqzUcy8fcxgKCHOvaCCRysPYKj6JxhCqQK xj0EjdeL81XGq668wrsVp3QKa3tf+lXtInHuDboGqOm5DQmikw6woIyMnvMZvrCdl8dl uIqxoxd7u2+bGuMxyqDgzyCuD/ZlvUGaDB22wRnZP+Zx+6zyjKuL+8AZMl0PWLR6klHO vnngjgbEJEp4PU8ddu3yklnBvxaBto2nEH56YUBdlj62eOaUaj7FXp4nBGngHGu12V4u vlew== X-Gm-Message-State: ALoCoQnf7nEnrsiNEDi1QzDeKSjthC02su2jkAPZDxzGExoXafmsXwwLQ+C2UVHdJ/31CCbPKp3m X-Received: by 10.194.91.234 with SMTP id ch10mr48973505wjb.69.1447753390745; Tue, 17 Nov 2015 01:43:10 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id t5sm23042049wmt.1.2015.11.17.01.43.08 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:43:10 -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:13 +0800 Message-Id: <1447753261-7552-15-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 14/62] arm/acpi: Add Generic Interrupt and Distributor struct 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 Add Generic Interrupt and Distributor (ACPI 5.0) structure. Add new features for MADT introduced by ACPI 5.1. Comment on the GIC ID field of the GIC structure which is replaced by CPU Interface Number. Add new fields: Redistributor Base Address, GICV, GICH, and MPIDR. Add new structures for GIC MSI frame and GICR. Add flag definition for GICC flags. Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo Signed-off-by: Naresh Bhat Signed-off-by: Shannon Zhao --- xen/include/acpi/actbl1.h | 69 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 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/actbl1.h b/xen/include/acpi/actbl1.h index 9311e3a..2fb2ad7 100644 --- a/xen/include/acpi/actbl1.h +++ b/xen/include/acpi/actbl1.h @@ -639,7 +639,11 @@ enum acpi_madt_type { ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, ACPI_MADT_TYPE_LOCAL_X2APIC = 9, ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, - ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ + ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, + ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, + ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13, + ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, + ACPI_MADT_TYPE_RESERVED = 15 /* 15 and greater are reserved */ }; /* @@ -760,11 +764,72 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; }; +/* 11: Generic Interrupt (ACPI 5.0) */ + +struct acpi_madt_generic_interrupt { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u32 cpu_interface_number; + u32 uid; + u32 flags; + u32 parking_version; + u32 performance_interrupt; + u64 parked_address; + u64 base_address; + u64 gicv_base_address; + u64 gich_base_address; + u32 vgic_interrupt; + u64 gicr_base_address; + u64 arm_mpidr; +}; + +/* Masks for Flags field above */ + +/* ACPI_MADT_ENABLED (1) Processor is usable if set */ +#define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */ +#define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */ + +/* 12: Generic Distributor (ACPI 5.0) */ + +struct acpi_madt_generic_distributor { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u32 gic_id; + u64 base_address; + u32 global_irq_base; + u32 reserved2; /* reserved - must be zero */ +}; + +/* 13: GIC MSI Frame (ACPI 5.1) */ + +struct acpi_madt_generic_msi_frame { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u32 msi_frame_id; + u64 base_address; + u32 flags; + u16 spi_count; + u16 spi_base; +}; + +/* Masks for Flags field above */ + +#define ACPI_MADT_OVERRIDE_SPI_VALUES (1) + +/* 14: GIC Redistributor (ACPI 5.1) */ + +struct acpi_madt_generic_redistributor { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u64 base_address; + u32 length; +}; + /* * Common flags fields for MADT subtables */ -/* MADT Local APIC flags (lapic_flags) */ +/* MADT Local APIC flags */ #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */