From patchwork Sun Sep 13 15:06:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 53536 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id 315E72056A for ; Sun, 13 Sep 2015 15:07:36 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf33250731wic.2 for ; Sun, 13 Sep 2015 08:07:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=bUzuA+EOTtYvWLpOv8y9RzNrFtadacgFODPheBI+vOI=; b=Dbhj1HreJvJiI7ELdNS047VfKbBGqJ58sdyygxgn0ESp0QROUe5d2FEYBIhxDFGeus rwG4f3A5nDCUzFIIFVJ79zfwiIs8MlfgnGzrHnqRdjjFozefs+RrjqXp/c0tgK+EpmLE cbYX36GregE/0ZIfL5rTAawueuwemstGyFowsm9ZZh9LZRBzNhUqPfQnTO9XFwTnIfK2 O8E2wBUAF3/BotvtUx+sHQR3iH6wSWcOuq0Mh+r7IaOGJnVvfFXhQoraj1omNQO/dXMu MGD7RLxh8oTCVk8642B8gTliGzxR9JBasoEmYbEcI2nbQXHf93/G5mUkXHsvJVONyPOK 7fbA== X-Gm-Message-State: ALoCoQl01AXUiesqifT6R8ZIMV/Nm7+gG9cx/0B5RfPVX4JpLez3VM4qBfy80y3GPJTAe5rUrG/x X-Received: by 10.180.106.197 with SMTP id gw5mr1934726wib.7.1442156855500; Sun, 13 Sep 2015 08:07:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.162 with SMTP id ej2ls592167lad.101.gmail; Sun, 13 Sep 2015 08:07:35 -0700 (PDT) X-Received: by 10.112.198.198 with SMTP id je6mr9046773lbc.31.1442156855323; Sun, 13 Sep 2015 08:07:35 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id qe5si6735037lbb.18.2015.09.13.08.07.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Sep 2015 08:07:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbmp1 with SMTP id mp1so56889923lbb.1 for ; Sun, 13 Sep 2015 08:07:34 -0700 (PDT) X-Received: by 10.152.37.162 with SMTP id z2mr4020296laj.117.1442156854769; Sun, 13 Sep 2015 08:07:34 -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.59.35 with SMTP id w3csp757921lbq; Sun, 13 Sep 2015 08:07:33 -0700 (PDT) X-Received: by 10.50.107.68 with SMTP id ha4mr11627257igb.35.1442156853727; Sun, 13 Sep 2015 08:07:33 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v6si5187519igz.71.2015.09.13.08.07.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 13 Sep 2015 08:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:36152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zb8sN-0003Mo-80 for patch@linaro.org; Sun, 13 Sep 2015 11:07:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zb8rb-0002Wr-L1 for qemu-devel@nongnu.org; Sun, 13 Sep 2015 11:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zb8rY-0003iL-EO for qemu-devel@nongnu.org; Sun, 13 Sep 2015 11:06:43 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zb8rY-0003i7-8O for qemu-devel@nongnu.org; Sun, 13 Sep 2015 11:06:40 -0400 Received: by wicge5 with SMTP id ge5so113006292wic.0 for ; Sun, 13 Sep 2015 08:06:39 -0700 (PDT) X-Received: by 10.180.103.35 with SMTP id ft3mr17216903wib.60.1442156799616; Sun, 13 Sep 2015 08:06:39 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by smtp.gmail.com with ESMTPSA id nf15sm9458673wic.22.2015.09.13.08.06.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Sep 2015 08:06:38 -0700 (PDT) From: Leif Lindholm To: qemu-devel@nongnu.org Date: Sun, 13 Sep 2015 16:06:32 +0100 Message-Id: <1442156793-30708-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1442156793-30708-1-git-send-email-leif.lindholm@linaro.org> References: <1442156793-30708-1-git-send-email-leif.lindholm@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.169 Cc: peter.maydell@linaro.org, drjones@redhat.com, shannon.zhao@linaro.org, imammedo@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH v2 1/2] ACPI: Add definitions for the DBG2 table X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@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.217.176 as permitted sender) smtp.mailfrom=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 The DBG2 table can be considered a "companion" to SPCR - it points out debug consoles available in the system. Also update SPCR comments to reflect DBG2 is now described in this file, and update the supported SPCR specification revision (no functional change). Signed-off-by: Leif Lindholm Reviewed-by: Andrew Jones --- include/hw/acpi/acpi-defs.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 2b431e6..a7bd984 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@ -197,10 +197,41 @@ enum { }; /* - * Serial Port Console Redirection Table (SPCR), Rev. 1.02 + * Debug Port Table 2 (DBG2) * * For .interface_type see Debug Port Table 2 (DBG2) serial port - * subtypes in Table 3, Rev. May 22, 2012 + * subtypes in Table 3, Rev. Aug 10, 2015 + * + */ +struct AcpiDebugPort2Header { + ACPI_TABLE_HEADER_DEF + uint32_t devices_offset; + uint32_t devices_count; +} QEMU_PACKED; +typedef struct AcpiDebugPort2Header + AcpiDebugPort2Header; + +struct AcpiDebugPort2Device { + uint8_t revision; + uint16_t length; + uint8_t address_count; + uint16_t namepath_length; + uint16_t namepath_offset; + uint16_t oem_data_length; + uint16_t oem_data_offset; + uint16_t port_type; + uint16_t port_subtype; + uint8_t reserved1[2]; + uint16_t base_address_offset; + uint16_t address_size_offset; +} QEMU_PACKED; +typedef struct AcpiDebugPort2Device + AcpiDebugPort2Device; + +/* + * Serial Port Console Redirection Table (SPCR), Rev. 1.03 + * + * .interface_type format same as for DBG2. */ struct AcpiSerialPortConsoleRedirection { ACPI_TABLE_HEADER_DEF