From patchwork Tue Sep 15 14:44:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 517908 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 C2373140082 for ; Wed, 16 Sep 2015 00:47:47 +1000 (AEST) Received: from localhost ([::1]:43482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbrWL-0004QQ-V9 for incoming@patchwork.ozlabs.org; Tue, 15 Sep 2015 10:47:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbrTc-0007G6-3E for qemu-devel@nongnu.org; Tue, 15 Sep 2015 10:45:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbrTW-000681-Fv for qemu-devel@nongnu.org; Tue, 15 Sep 2015 10:44:56 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbrTW-00067t-AP for qemu-devel@nongnu.org; Tue, 15 Sep 2015 10:44:50 -0400 Received: by wicgb1 with SMTP id gb1so32204015wic.1 for ; Tue, 15 Sep 2015 07:44:49 -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=RhgDhvmY0d6J9pnT35ZkoitnR2izg8Z7bCl2Qvk0y4w=; b=RTFKuf5eo1FiFZR9pRaz9bdqBnus9PL4WDPDKur/YJX9K31F4ir/G6gXAVmFCAg7rn tep4G7oVUGFV9h2vi6DI4oGkHDeY3a1oY6Y9uDIqkDK6xjFI4cL5QjVLpIHLr9wmxRhG AtVE3WCGZnqA8I5s91MPxVlQLRyeQh6AFiFfM8/3mflzccMRS6lMXzdbXTiYtzdXGZdZ L/huHbVcZ4h3bP+1fZGRWg+n3oiG8tFXxNsNnjlAox/bmxm+aWwLPLOSMTBPxFykzzhJ FPxUFzLH97fHauJbkTokNX09OM4KBQD1zqSIr5fp+FU0fAqpmhIn+Tosj3xPzs9GrvJm QalA== X-Gm-Message-State: ALoCoQnUNESid+9L5z0clsawVEMvUMPW6Xtl/vnX3DJHbM6STlRmXW8EN6SWZAJGUMflisvmI6X1 X-Received: by 10.180.37.7 with SMTP id u7mr7741228wij.79.1442328289823; Tue, 15 Sep 2015 07:44:49 -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 r9sm21390508wjz.35.2015.09.15.07.44.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Sep 2015 07:44:49 -0700 (PDT) From: Leif Lindholm To: qemu-devel@nongnu.org Date: Tue, 15 Sep 2015 15:44:40 +0100 Message-Id: <1442328281-18039-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1442328281-18039-1-git-send-email-leif.lindholm@linaro.org> References: <1442328281-18039-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.179 Cc: peter.maydell@linaro.org, drjones@redhat.com, shannon.zhao@linaro.org, al.stone@linaro.org Subject: [Qemu-devel] [PATCH v3 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 --- include/hw/acpi/acpi-defs.h | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 2b431e6..3cfc5a6 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@ -197,10 +197,39 @@ 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