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: 53678 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 4A02B22DE5 for ; Tue, 15 Sep 2015 14:48:06 +0000 (UTC) Received: by lamf6 with SMTP id f6sf25713478lam.1 for ; Tue, 15 Sep 2015 07:48:05 -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=RhgDhvmY0d6J9pnT35ZkoitnR2izg8Z7bCl2Qvk0y4w=; b=gF0iLpajpyIi5/eV/1tDWCXx0FMlX4NX9YDxps5lzPuOXa8vVTPZrQvmzUYbe9YMrz aX5cZTBAxpPCt0SA0RBRPI+XebkWvY0lSwQmaQ1LbGUfO+dnafMAwLGULt6OQKTIwM7j NH+jjhHq/pEHdjC6y4xbXY/j1zrbajwXEXpxlyWgIOFBVICpU4VoBQ0JdO8D6QsuAnjg ABdt4XlzEhUf7pWBF4peLuFWKoEQ9eP/VQ4WVZld/ZuE7JzX+TXPvd9rpCW6yp48XSKW 5xA9lJoMR3IDAS2/LAd2VLPPz1IIQkqZnsIYhpuKyJYZNGOLiVXW8pLgAEYDfs5ZBIXo kDig== X-Gm-Message-State: ALoCoQkXQ3H3kb8qFweWx6DQeofwGCHSh6R/J0mhhg3rH437YDdot//sHsN9mgljAxN/VOgni5Pk X-Received: by 10.152.21.42 with SMTP id s10mr1423374lae.9.1442328485313; Tue, 15 Sep 2015 07:48:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.230 with SMTP id e6ls649231lah.66.gmail; Tue, 15 Sep 2015 07:48:05 -0700 (PDT) X-Received: by 10.152.18.193 with SMTP id y1mr9309528lad.45.1442328485154; Tue, 15 Sep 2015 07:48:05 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id uz4si13546895lac.71.2015.09.15.07.48.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 07:48:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbpo4 with SMTP id o4so86812873lbp.2 for ; Tue, 15 Sep 2015 07:48:05 -0700 (PDT) X-Received: by 10.152.170.225 with SMTP id ap1mr12664828lac.72.1442328485070; Tue, 15 Sep 2015 07:48:05 -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 w3csp1850031lbq; Tue, 15 Sep 2015 07:48:04 -0700 (PDT) X-Received: by 10.50.178.145 with SMTP id cy17mr6710052igc.92.1442328483981; Tue, 15 Sep 2015 07:48:03 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id kj5si7146352igb.0.2015.09.15.07.48.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Sep 2015 07:48:03 -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]:43482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbrWb-0004QQ-4C for patch@linaro.org; Tue, 15 Sep 2015 10:48:01 -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-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+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.182 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 --- 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