From patchwork Tue Mar 30 08:20:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduard - Gabriel Munteanu X-Patchwork-Id: 48970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EB44FB7C7E for ; Wed, 31 Mar 2010 01:32:20 +1100 (EST) Received: from localhost ([127.0.0.1]:35178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwcUK-0001yI-O9 for incoming@patchwork.ozlabs.org; Tue, 30 Mar 2010 10:32:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwWgf-0003Nt-Q2 for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:37 -0400 Received: from [140.186.70.92] (port=40378 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwWgb-0003Lb-MP for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwWgX-00048v-04 for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:33 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:43464) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwWgU-000487-5n for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:28 -0400 Received: by mail-bw0-f218.google.com with SMTP id 10so14273949bwz.2 for ; Tue, 30 Mar 2010 01:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=Y8g3x6mAkoH54D0LPZqJfFMFHWUNLu1/lMtwcMk7SZY=; b=L8IHQONrdbuGF86HEVixMBFKPKZqkAelBAsrvHCgj4dSOZy1Bx4peHsKZ5dR5zvuWb f0lB57T3jr/pp4TEMHFfAb46w6zv2oUOPANqkYpsRa73nt+09WrEyHPEwxVY/ONjlg/L 6lXHzVOWhsh+79ISdEIwKd6FSqtG6qNlhjmkM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=dbMc3QAucBQes0F8yONnluXo/QsN6XswNN4TQoPxkj3odA99lZsCh36GZrhB8Xbt7c jSdyn5nN0faizd/nbkXOLihJ5wtjFLnn0a1t7zbyvLwSSwfkz4/lfV/NG9uJ5DFG492R i17+w/O4p64Uq9zTPE5o2nraCt2AkRjqKAcqU= Received: by 10.204.145.6 with SMTP id b6mr365092bkv.128.1269937225825; Tue, 30 Mar 2010 01:20:25 -0700 (PDT) Received: from localhost.localdomain ([188.25.93.130]) by mx.google.com with ESMTPS id 16sm2589620bwz.9.2010.03.30.01.20.25 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 01:20:25 -0700 (PDT) From: Eduard - Gabriel Munteanu To: joro@8bytes.org Date: Tue, 30 Mar 2010 11:20:04 +0300 Message-Id: <56f9528faa41b71baba33887bca6cd43484452fa.1269936879.git.eduard.munteanu@linux360.ro> X-Mailer: git-send-email 1.6.4.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Tue, 30 Mar 2010 10:20:59 -0400 Cc: aliguori@us.ibm.com, Eduard - Gabriel Munteanu , avi@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [RFC PATCH 3/7] acpi: move table header definition into pc.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This moves the table header definition into pc.h to allow other code to build ACPI tables. Signed-off-by: Eduard - Gabriel Munteanu --- hw/acpi.c | 13 ------------- hw/pc.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index 8eb53da..3794f70 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -826,19 +826,6 @@ static int piix4_device_hotplug(PCIDevice *dev, int state) return 0; } -struct acpi_table_header -{ - char signature [4]; /* ACPI signature (4 ASCII characters) */ - uint32_t length; /* Length of table, in bytes, including header */ - uint8_t revision; /* ACPI Specification minor version # */ - uint8_t checksum; /* To make sum of entire table == 0 */ - char oem_id [6]; /* OEM identification */ - char oem_table_id [8]; /* OEM table identification */ - uint32_t oem_revision; /* OEM revision number */ - char asl_compiler_id [4]; /* ASL compiler vendor ID */ - uint32_t asl_compiler_revision; /* ASL compiler revision number */ -} __attribute__((packed)); - char *acpi_tables; size_t acpi_tables_len, acpi_tables_prev_len; diff --git a/hw/pc.h b/hw/pc.h index 0cef140..92954db 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -103,6 +103,19 @@ int ioport_get_a20(void); CPUState *pc_new_cpu(const char *cpu_model); /* acpi.c */ +struct acpi_table_header +{ + char signature [4]; /* ACPI signature (4 ASCII characters) */ + uint32_t length; /* Length of table, in bytes, including header */ + uint8_t revision; /* ACPI Specification minor version # */ + uint8_t checksum; /* To make sum of entire table == 0 */ + char oem_id [6]; /* OEM identification */ + char oem_table_id [8]; /* OEM table identification */ + uint32_t oem_revision; /* OEM revision number */ + char asl_compiler_id [4]; /* ASL compiler vendor ID */ + uint32_t asl_compiler_revision; /* ASL compiler revision number */ +} __attribute__((packed)); + extern int acpi_enabled; extern char *acpi_tables; extern size_t acpi_tables_len;