From patchwork Sun May 17 20:03:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 48630 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B41A121411 for ; Sun, 17 May 2015 20:05:52 +0000 (UTC) Received: by wivs14 with SMTP id s14sf15379405wiv.1 for ; Sun, 17 May 2015 13:05:50 -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: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=xQ3CojRnVRnYK1coe4ovagP8k5PM4eayg9irFhAKuNQ=; b=fDQ+JXah+lqR6pFBtquDzFQHv1OisNjmxt0YQ+xeWUX95v2Vif3hMCoxN5yiR9+Oz9 yFpIh/3iHBdG/Fqp55MZFeHs1EwsZVUNYZkncLLEE84N+4NJZqSLJ/yZ215cyol5Q6Lu LC2hwkahpD4J4suKq1naWfH9xYdbKRx8tGir+9mhD0+sWk3hpek5Ybzv2VnubpC7yEA9 LPpgNCcCS/D0rJY1TCwbITQQnTxZO1TdGGDjouuwky7AzGkI320sdqDeCUPSrKjWV9fq agJLAOJyWv8d/GYYNsBUC6PxlbKzmJhYAOT7hDlqAMu2bbRf4VYCsc2mRSNLO4+LWQie 8GHw== X-Gm-Message-State: ALoCoQmk5AbBXLdzdBFpsle8HnQ+ShWJrtfvahuHybzAJKjaGAHAVbLbJaIyCuY5cjnF8izBKhvF X-Received: by 10.112.162.228 with SMTP id yd4mr15220397lbb.8.1431893150766; Sun, 17 May 2015 13:05:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.101 with SMTP id p5ls762085laj.53.gmail; Sun, 17 May 2015 13:05:50 -0700 (PDT) X-Received: by 10.112.50.74 with SMTP id a10mr9785667lbo.4.1431893150622; Sun, 17 May 2015 13:05:50 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id t2si5314490lbj.163.2015.05.17.13.05.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 May 2015 13:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labbd9 with SMTP id bd9so191511971lab.2 for ; Sun, 17 May 2015 13:05:50 -0700 (PDT) X-Received: by 10.152.27.105 with SMTP id s9mr4705399lag.86.1431893150149; Sun, 17 May 2015 13:05:50 -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.108.230 with SMTP id hn6csp3507645lbb; Sun, 17 May 2015 13:05:49 -0700 (PDT) X-Received: by 10.52.32.34 with SMTP id f2mr17723305vdi.11.1431893143185; Sun, 17 May 2015 13:05:43 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id wy3si8678859vdc.66.2015.05.17.13.05.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 17 May 2015 13:05:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) 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 1Yu4o3-0001YA-3h; Sun, 17 May 2015 20:05:03 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4o0-0001X2-V0 for xen-devel@lists.xen.org; Sun, 17 May 2015 20:05:01 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 5D/9D-03275-B64F8555; Sun, 17 May 2015 20:04:59 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-5.tower-31.messagelabs.com!1431893098!11305184!1 X-Originating-IP: [209.85.220.53] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10044 invoked from network); 17 May 2015 20:04:59 -0000 Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 17 May 2015 20:04:59 -0000 Received: by pacwv17 with SMTP id wv17so119736541pac.2 for ; Sun, 17 May 2015 13:04:57 -0700 (PDT) X-Received: by 10.68.222.167 with SMTP id qn7mr37623716pbc.136.1431893097834; Sun, 17 May 2015 13:04:57 -0700 (PDT) Received: from localhost.localdomain ([117.247.24.139]) by mx.google.com with ESMTPSA id j9sm7838401pdm.53.2015.05.17.13.04.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 May 2015 13:04:57 -0700 (PDT) From: Parth Dixit To: xen-devel@lists.xen.org Date: Mon, 18 May 2015 01:33:36 +0530 Message-Id: <1431893048-5214-10-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, parth.dixit@linaro.org, christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH v2 09/41] 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: 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.52 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: 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: Parth Dixit --- xen/include/acpi/actbl1.h | 62 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/xen/include/acpi/actbl1.h b/xen/include/acpi/actbl1.h index 9311e3a..2d72d8a 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_GIC_MSI_FRAME = 13, + ACPI_MADT_TYPE_GIC_REDISTRIBUTOR = 14, + ACPI_MADT_TYPE_RESERVED = 15 /* 15 and greater are reserved */ }; /* @@ -760,14 +764,68 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; }; +/* 11: Generic Interrupt (ACPI 5.1) */ + +struct acpi_madt_generic_interrupt { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u32 gic_id; /* it was renamed to cpu interface number in ACPI 5.1 */ + 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_maintenance_interrupt; + u64 redist_base_address; + u64 mpidr; + +}; + +/* 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_gic_msi_frame { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u32 gic_msi_frame_id; + u64 base_address; +}; + +/* 14: GIC Redistributor (ACPI 5.1) */ + +struct acpi_madt_gic_redistributor { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u64 base_address; + u32 region_size; +}; + /* * Common flags fields for MADT subtables */ -/* MADT Local APIC flags (lapic_flags) */ +/* MADT Local APIC flags (lapic_flags) and GICC flags */ #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ +/* MADT GICC flags only */ + +#define ACPI_MADT_PERF_INT_MODE (1<<1) /* 01: Performance Interrupt Mode */ +#define ACPI_MADT_VGIC (1<<2) /* 02: VGIC Maintenance interrupt mode */ + /* MADT MPS INTI flags (inti_flags) */ #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */