From patchwork Tue Jun 9 03:26:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49642 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B028821419 for ; Tue, 9 Jun 2015 03:30:57 +0000 (UTC) Received: by wifx6 with SMTP id x6sf1020367wif.1 for ; Mon, 08 Jun 2015 20:30:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:content-type: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=crm4FFNXE12mQt57y27CP8InsvCcA6KBsmFUNFjsaC0=; b=h9591UGMe1cXBpLaXJlhS/0gU1kf7I4y5o+182WQIkZmr7BG/i6T5lrpYzMHLiLNI0 4JHWBp3f5ZB3v5zYooR1c6Ok9D0I9SCxz+2hdj7EwOrNHJBWazwpnPatQewkK6pQ09Kj 2+B4asSH/CAtVmqbrdCXCh4AP41vL+2lMKElsM0eGpkW5/wr43UwtQK0ltNxaYC0HMFo M8w/ETTkXRPCo6uNsGAg0nuV5AuCpFLk+cUYpoERTG/GmukFXmCkBrhNrG0CWwR31ZZ1 Pt7wEwnAKPoWaP2zMwrQ5LEwbqPrCqF7fiYjhkJyvY6gis14myc10f1aWfsqj52RgI01 H0Ew== X-Gm-Message-State: ALoCoQlJ4l5xOu4wSumxrdC1A0kXpKuvng41w2K7XqSNy8bkNYEoPWG3/zosmYjxD8GSnW8kOAKu X-Received: by 10.112.162.228 with SMTP id yd4mr19955202lbb.8.1433820656990; Mon, 08 Jun 2015 20:30:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.167 with SMTP id rl7ls20186lac.74.gmail; Mon, 08 Jun 2015 20:30:56 -0700 (PDT) X-Received: by 10.112.25.69 with SMTP id a5mr20227042lbg.16.1433820656809; Mon, 08 Jun 2015 20:30:56 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id w2si4563524lbs.89.2015.06.08.20.30.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2015 20:30:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbtu8 with SMTP id tu8so3190846lbb.2 for ; Mon, 08 Jun 2015 20:30:56 -0700 (PDT) X-Received: by 10.112.93.37 with SMTP id cr5mr20624600lbb.106.1433820656540; Mon, 08 Jun 2015 20:30:56 -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.108.230 with SMTP id hn6csp2292857lbb; Mon, 8 Jun 2015 20:30:55 -0700 (PDT) X-Received: by 10.229.249.137 with SMTP id mk9mr24151703qcb.21.1433820655332; Mon, 08 Jun 2015 20:30:55 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id l4si4302499qcn.47.2015.06.08.20.30.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 08 Jun 2015 20:30:55 -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]:32853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2AFa-0000qw-Ha for patch@linaro.org; Mon, 08 Jun 2015 23:30:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2AF9-0000Zw-J5 for qemu-devel@nongnu.org; Mon, 08 Jun 2015 23:30:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2AF2-00050O-7U for qemu-devel@nongnu.org; Mon, 08 Jun 2015 23:30:27 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:49389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2AF1-0004zh-ID for qemu-devel@nongnu.org; Mon, 08 Jun 2015 23:30:20 -0400 Received: from 172.24.2.119 (EHLO szxeml426-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CPG13841; Tue, 09 Jun 2015 11:26:49 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.158.1; Tue, 9 Jun 2015 11:26:41 +0800 From: Shannon Zhao To: Date: Tue, 9 Jun 2015 11:26:18 +0800 Message-ID: <1433820378-8336-1-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 58.251.152.64 Cc: peter.maydell@linaro.org, mst@redhat.com, shannon.zhao@linaro.org, imammedo@redhat.com Subject: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix table revision and some comments 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: patch@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.171 as permitted sender) smtp.mail=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 From: Shannon Zhao The table revision is not the ACPI spec version. Fix the wrong revision and also some comments. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index a9373cc..a036a00 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -349,7 +349,7 @@ build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info) mcfg->allocation[0].end_bus_number = (memmap[VIRT_PCIE_ECAM].size / PCIE_MMCFG_SIZE_MIN) - 1; - build_header(linker, table_data, (void *)mcfg, "MCFG", len, 5); + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1); } /* GTDT */ @@ -375,7 +375,7 @@ build_gtdt(GArray *table_data, GArray *linker) build_header(linker, table_data, (void *)(table_data->data + gtdt_start), "GTDT", - table_data->len - gtdt_start, 5); + table_data->len - gtdt_start, 2); } /* MADT */ @@ -412,7 +412,7 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info, build_header(linker, table_data, (void *)(table_data->data + madt_start), "APIC", - table_data->len - madt_start, 5); + table_data->len - madt_start, 3); } /* FADT */ @@ -469,7 +469,7 @@ build_dsdt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info) g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len); build_header(linker, table_data, (void *)(table_data->data + table_data->len - dsdt->buf->len), - "DSDT", dsdt->buf->len, 5); + "DSDT", dsdt->buf->len, 2); free_aml_allocator(); } @@ -507,6 +507,7 @@ void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables) * FADT * GTDT * MADT + * MCFG * DSDT */ @@ -514,7 +515,7 @@ void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables) dsdt = tables_blob->len; build_dsdt(tables_blob, tables->linker, guest_info); - /* FADT MADT GTDT pointed to by RSDT */ + /* FADT MADT GTDT MCFG pointed to by RSDT */ acpi_add_table(table_offsets, tables_blob); build_fadt(tables_blob, tables->linker, dsdt);