From patchwork Tue Sep 18 13:02:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 184708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 1E7762C0097 for ; Tue, 18 Sep 2012 23:02:15 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TDxPN-0000CY-Uj; Tue, 18 Sep 2012 13:00:10 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TDxPL-0000CE-LI for fwts-devel@lists.ubuntu.com; Tue, 18 Sep 2012 13:00:07 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginmedia.com ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TDxRL-0000SV-3z for fwts-devel@lists.ubuntu.com; Tue, 18 Sep 2012 13:02:11 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] acpi: acpidump: Add support for ACPI 5.0 PCCT Date: Tue, 18 Sep 2012 14:02:09 +0100 Message-Id: <1347973329-18245-3-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1347973329-18245-1-git-send-email-colin.king@canonical.com> References: <1347973329-18245-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King ACPI 5.0 Adds the Platform Communications Channel Table (see section 14 of the ACPI 5.0 specification). So dump it out in acpidump. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Keng-Yu Lin --- src/acpi/acpidump/acpidump.c | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c index 31a3417..bd75da6 100644 --- a/src/acpi/acpidump/acpidump.c +++ b/src/acpi/acpidump/acpidump.c @@ -1620,6 +1620,59 @@ static void acpidump_rasf(fwts_framework *fw, fwts_acpi_table_info *table) acpi_dump_raw_table(fw, table); } +/* + * acpidump_pcct() + * dump RASF, see 14 ACPI PCCT (Platform Communications Channel) + * of version 5.0 ACPI spec. + */ +static void acpidump_pcct(fwts_framework *fw, fwts_acpi_table_info *table) +{ + uint8_t *data = (uint8_t *)table->data; + size_t length = table->length; + uint8_t *ptr = data; + + static fwts_acpidump_field pcct_fields[] = { + FIELD_UINT ("Flags", fwts_acpi_table_pcct, flags), + FIELD_UINTS("Reserved", fwts_acpi_table_pcct, reserved), + FIELD_END + }; + + static fwts_acpidump_field type0_fields[] = { + FIELD_UINTS("Reserved", fwts_acpi_table_pcct_subspace_type_0, reserved), + FIELD_UINT ("Base Address", fwts_acpi_table_pcct_subspace_type_0, base_address), + FIELD_UINT ("Length", fwts_acpi_table_pcct_subspace_type_0, length), + FIELD_GAS ("Doorbell Register",fwts_acpi_table_pcct_subspace_type_0, doorbell_register), + FIELD_UINT ("Doorbell Preserve",fwts_acpi_table_pcct_subspace_type_0, doorbell_preserve), + FIELD_UINT ("Doorbell Write", fwts_acpi_table_pcct_subspace_type_0, doorbell_write), + FIELD_UINT ("Nominal Latency", fwts_acpi_table_pcct_subspace_type_0, nominal_latency), + FIELD_UINT ("Max. Access Rate", fwts_acpi_table_pcct_subspace_type_0, max_periodic_access_rate), + FIELD_UINT ("Min. Turnaround Time", fwts_acpi_table_pcct_subspace_type_0, min_request_turnaround_time), + FIELD_END + }; + + acpi_dump_table_fields(fw, data, pcct_fields, length, length); + + ptr += sizeof(fwts_acpi_table_pcct); + + /* Now scan through the array of subspace structures */ + while (ptr < data + length) { + fwts_acpi_table_pcct_subspace_header *header = + (fwts_acpi_table_pcct_subspace_header *)ptr; + + /* Currently just type 0 is supported */ + switch (header->type) { + case 0: + fwts_log_info_verbatum(fw, + "General Communications Subspace Structure (type 0):"); + __acpi_dump_table_fields(fw, ptr, type0_fields, ptr - data); + + break; + default: + break; + } + ptr += header->length; + } +} typedef struct { char *name; @@ -1654,6 +1707,7 @@ static acpidump_table_vec table_vec[] = { { "MCFG", acpidump_mcfg, 1 }, { "MPST", acpidump_mpst, 1 }, { "MSCT", acpidump_msct, 1 }, + { "PCCT", acpidump_pcct, 1 }, { "PSDT", acpidump_amlcode, 1 }, { "RASF", acpidump_rasf, 1 }, { "RSDT", acpidump_rsdt, 1 },