From patchwork Sun Sep 23 04:33:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1495061 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BB4D33FC71 for ; Sun, 23 Sep 2012 04:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150Ab2IWEfa (ORCPT ); Sun, 23 Sep 2012 00:35:30 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:43694 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753160Ab2IWEer (ORCPT ); Sun, 23 Sep 2012 00:34:47 -0400 Received: by mail-qa0-f53.google.com with SMTP id t11so148884qaa.19 for ; Sat, 22 Sep 2012 21:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:reply-to:organization; bh=ORYG+9C/MG3k8XmM3Fr7N1Kp+iFtBOloYu55AgBOW9c=; b=a5eiZQ8BZdgFF4ed6a7ikK5MQYVeX6fO0D0YUD2bNVgZy0aOhoJawKAgvsL3AHyk5n 0VK6oleqFlbpjwTlRPpc1lEp/xaKzhhrPpXs6vA44jdggzjx1wIMN+AcnkMjIVwgTQLQ SS1adu8DQAG34MsvXE1L5BeE2NqgRaAJ/wk5oT+oaiP4EEJk4BygrQTJGP2zCjHodPgL 3WWdn5rCRYxZR2hZcOc5A6TdG9oQbtD1AXHnCm0J21Kt8ouNsrLmo/PzjaridW8FEWXe 5jofkT3zupD/rHFk5oEyOM3svz74W7Ye96s4DX62zPbtZ5H30H30010JHj5pOzOOMUpT cU1Q== Received: by 10.229.135.8 with SMTP id l8mr6523623qct.126.1348374887420; Sat, 22 Sep 2012 21:34:47 -0700 (PDT) Received: from x980.localdomain6 (pool-74-104-144-44.bstnma.fios.verizon.net. [74.104.144.44]) by mx.google.com with ESMTPS id ck11sm19871874qab.17.2012.09.22.21.34.43 (version=SSLv3 cipher=OTHER); Sat, 22 Sep 2012 21:34:44 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Bob Moore , Feng Tang , Len Brown Subject: [PATCH 09/23] ACPICA: Headers: Add support for CSRT and DBG2 ACPI tables. Date: Sun, 23 Sep 2012 00:33:57 -0400 Message-Id: <4e2f9c278ad84196991fcf6f6646a3e15967fe90.1348371388.git.len.brown@intel.com> X-Mailer: git-send-email 1.7.12.1.396.g16eed7c In-Reply-To: <1348374851-20378-1-git-send-email-lenb@kernel.org> References: <1348374851-20378-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore These tables are defined outside of the ACPI specification. Signed-off-by: Bob Moore Signed-off-by: Feng Tang Signed-off-by: Len Brown --- include/acpi/actbl2.h | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/acpi/actbl3.h | 1 - 2 files changed, 111 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index d9ceb3d..b74476c 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -63,6 +63,8 @@ */ #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ +#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */ +#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */ #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ @@ -232,6 +234,115 @@ struct acpi_table_boot { /******************************************************************************* * + * CSRT - Core System Resource Table + * Version 0 + * + * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011 + * + ******************************************************************************/ + +struct acpi_table_csrt { + struct acpi_table_header header; /* Common ACPI table header */ +}; + +/* Resource Group subtable */ + +struct acpi_csrt_group { + u32 length; + u32 vendor_id; + u32 subvendor_id; + u16 device_id; + u16 subdevice_id; + u16 revision; + u16 reserved; + u32 info_length; + + /* Shared data (length = info_length) immediately follows */ +}; + +/* Resource Descriptor subtable */ + +struct acpi_csrt_descriptor { + u32 length; + u16 type; + u16 subtype; + u32 uid; + + /* Resource-specific information immediately follows */ +}; + +/* Resource Types */ + +#define ACPI_CSRT_TYPE_INTERRUPT 0x0001 +#define ACPI_CSRT_TYPE_TIMER 0x0002 +#define ACPI_CSRT_TYPE_DMA 0x0003 + +/* Resource Subtypes */ + +#define ACPI_CSRT_XRUPT_LINE 0x0000 +#define ACPI_CSRT_XRUPT_CONTROLLER 0x0001 +#define ACPI_CSRT_TIMER 0x0000 +#define ACPI_CSRT_DMA_CHANNEL 0x0000 +#define ACPI_CSRT_DMA_CONTROLLER 0x0001 + +/******************************************************************************* + * + * DBG2 - Debug Port Table 2 + * Version 0 (Both main table and subtables) + * + * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012. + * + ******************************************************************************/ + +struct acpi_table_dbg2 { + struct acpi_table_header header; /* Common ACPI table header */ + u32 info_offset; + u32 info_count; +}; + +/* Debug Device Information Subtable */ + +struct acpi_dbg2_device { + u8 revision; + u16 length; + u8 register_count; /* Number of base_address registers */ + u16 namepath_length; + u16 namepath_offset; + u16 oem_data_length; + u16 oem_data_offset; + u16 port_type; + u16 port_subtype; + u16 reserved; + u16 base_address_offset; + u16 address_size_offset; + /* + * Data that follows: + * base_address (required) - Each in 12-byte Generic Address Structure format. + * address_size (required) - Array of u32 sizes corresponding to each base_address register. + * Namepath (required) - Null terminated string. Single dot if not supported. + * oem_data (optional) - Length is oem_data_length. + */ +}; + +/* Types for port_type field above */ + +#define ACPI_DBG2_SERIAL_PORT 0x8000 +#define ACPI_DBG2_1394_PORT 0x8001 +#define ACPI_DBG2_USB_PORT 0x8002 +#define ACPI_DBG2_NET_PORT 0x8003 + +/* Subtypes for port_subtype field above */ + +#define ACPI_DBG2_16550_COMPATIBLE 0x0000 +#define ACPI_DBG2_16550_SUBSET 0x0001 + +#define ACPI_DBG2_1394_STANDARD 0x0000 + +#define ACPI_DBG2_USB_XHCI 0x0000 +#define ACPI_DBG2_USB_EHCI 0x0001 + +/******************************************************************************* + * * DBGP - Debug Port table * Version 1 * diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index f65a0ed..37781ab 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -75,7 +75,6 @@ /* Reserved table signatures */ #define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */ -#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table 2 */ #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */