From patchwork Mon Sep 7 14:23:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 53244 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 0D88322B05 for ; Mon, 7 Sep 2015 15:00:12 +0000 (UTC) Received: by wisv5 with SMTP id v5sf27275980wis.0 for ; Mon, 07 Sep 2015 08:00:11 -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=KTXDi1tlCazvLrDpbABbQFyX1F22lPshWiRdjsMI+u8=; b=HMsu0T1dv/8DMBok7S2cG7+UkbI/WYa9NFrddTfBBBMZhpzKIa7vY4Gfc6DWO3D5Jh t6+bfQTKUkhrNyfb6343NEsuUAjYTesb5/cmXbJkqDtqRSVi/ZziWSsHOdEfhBUAJ0OC yMkHteSItTC7KFYk0HM5oevIuq7eyJbxHcZHFWYF7P17Eb0dhmPKpiH4UzBbJdWAdFr3 8MXQLysemkoBxNrsKPEWer8QgywZ8jK/+HQ2hC9N4FTrZsaFniN+H7vPh8OApl+8MYRK 8iRwr8KM7JWPSjHFn+Jg3kkUr+silpD6WWVQlft/lbhf73GQDRDkkSrq3xj3wFNj7FBv VtAw== X-Gm-Message-State: ALoCoQmHd+ik8waKH7lBwMd/fbfytqshVSJcIuZYCzBp7yw9C2ZKz/355Hn8ZqwEfOIjylzx+X2F X-Received: by 10.112.189.105 with SMTP id gh9mr5135864lbc.16.1441638011358; Mon, 07 Sep 2015 08:00:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.196 with SMTP id ks4ls141426lac.64.gmail; Mon, 07 Sep 2015 08:00:11 -0700 (PDT) X-Received: by 10.152.20.98 with SMTP id m2mr17409187lae.119.1441638011215; Mon, 07 Sep 2015 08:00:11 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id qg4si205566lbb.25.2015.09.07.08.00.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 08:00:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lamp12 with SMTP id p12so52142346lam.0 for ; Mon, 07 Sep 2015 08:00:11 -0700 (PDT) X-Received: by 10.152.44.196 with SMTP id g4mr17700789lam.56.1441638011118; Mon, 07 Sep 2015 08:00:11 -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 w3csp424982lbq; Mon, 7 Sep 2015 08:00:10 -0700 (PDT) X-Received: by 10.141.23.149 with SMTP id z143mr27741569qhd.67.1441638010122; Mon, 07 Sep 2015 08:00:10 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i22si13175qhc.99.2015.09.07.08.00.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 07 Sep 2015 08:00:10 -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]:57120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxtx-0003zN-9S for patch@linaro.org; Mon, 07 Sep 2015 11:00:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxLJ-0003aY-PJ for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:24:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxLE-0008Hb-Sx for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:24:21 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:32790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxLE-0008E3-FC for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:24:16 -0400 Received: by wiclk2 with SMTP id lk2so90585118wic.0 for ; Mon, 07 Sep 2015 07:23:59 -0700 (PDT) X-Received: by 10.180.99.170 with SMTP id er10mr34942051wib.65.1441635838978; Mon, 07 Sep 2015 07:23:58 -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 lz10sm20311076wjb.48.2015.09.07.07.23.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Sep 2015 07:23:58 -0700 (PDT) From: Leif Lindholm To: qemu-devel@nongnu.org Date: Mon, 7 Sep 2015 15:23:45 +0100 Message-Id: <1441635826-4866-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441635826-4866-1-git-send-email-leif.lindholm@linaro.org> References: <1441635826-4866-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.176 Cc: peter.maydell@linaro.org, drjones@redhat.com, shannon.zhao@linaro.org, al.stone@linaro.org Subject: [Qemu-devel] [PATCH 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.215.44 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. Signed-off-by: Leif Lindholm --- include/hw/acpi/acpi-defs.h | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 2b431e6..af062a7 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@ -197,10 +197,43 @@ 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 + * + * The specification permits multiple ports with multiple addresses, but this + * implementation is limited to one port with one address. + */ +struct AcpiDebugPort2 { + ACPI_TABLE_HEADER_DEF + uint32_t debug_devices_offset; + uint32_t number_debug_devices; + struct { + uint8_t revision; + uint16_t length; + uint8_t number_generic_address_registers; + uint16_t namespace_string_length; + uint16_t namespace_string_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_register_offset; + uint16_t address_size_offset; + struct AcpiGenericAddress base_address[1]; + uint32_t address_size[1]; + uint8_t namespace_string[2]; + } QEMU_PACKED debug_devices[1]; +} QEMU_PACKED; +typedef struct AcpiDebugPort2 + AcpiDebugPort2; + +/* + * Serial Port Console Redirection Table (SPCR), Rev. 1.03 + * + * .interface_type format same as for DBG2. */ struct AcpiSerialPortConsoleRedirection { ACPI_TABLE_HEADER_DEF