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: 517187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D4070140E43 for ; Mon, 14 Sep 2015 01:07:15 +1000 (AEST) Received: from localhost ([::1]:36152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zb8s4-0003Mo-SS for incoming@patchwork.ozlabs.org; Sun, 13 Sep 2015 11:07:12 -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-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=bUzuA+EOTtYvWLpOv8y9RzNrFtadacgFODPheBI+vOI=; b=DeSrwgvHxAiRuhShpk5I+v7k0DjrhZEGZzuCr1c/j3NZzRdS+c46YJU6gw0wRK1tnm Cy1HTFEmEw5aDw1nIKN+ylBQiGXfm2LEekKxV8g4e15zSWhNnn7hhHyeYAJxSlBoalz7 qpkQQD2thIpI/xoU5x4TAWehPEyL54k+5n3K7we1b23WTQr+J53b9f359AyCFXaEwSvs UPOZcFG9BMiLD0n9LNTUfI4u/Hl5JFXOdfjqA4Cceo6W0ZE2CC8bn4uUm4f16itKxFYu Wx72RGGRfYF6aLebR/xTCq/qVORBdvBAD8DHiD+//GRUMgbuTy3TcfxaAtq2rLlqqFqp pjsg== X-Gm-Message-State: ALoCoQkEXP+xIME82TeO3AHRU7OHZSnwcmL9a55h4WzU4y74tT0tddCPnq8yQaOPO1LE+W5NJxsy 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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