From: Laszlo Ersek <lersek@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gal Hammer <ghammer@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] [PATCH FYI 07/13] hw/acpi: introduce the AcpiQemuParamTable structure
Date: Sun, 13 Sep 2015 14:43:41 +0200 [thread overview]
Message-ID: <1442148227-17343-8-git-send-email-lersek@redhat.com> (raw)
In-Reply-To: <1442148227-17343-1-git-send-email-lersek@redhat.com>
This ACPI table is supposed to carry various parameters for OSPM. We
introduce it with a single parameter field, "vmgenid_addr_base_ptr", which
is described as ADBP / "ADDR base pointer" in "docs/vmgenid.txt" (along
with the general structure of the table).
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gal Hammer <ghammer@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
include/hw/acpi/vmgenid.h | 72 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 include/hw/acpi/vmgenid.h
diff --git a/include/hw/acpi/vmgenid.h b/include/hw/acpi/vmgenid.h
new file mode 100644
index 0000000..07e813a
--- /dev/null
+++ b/include/hw/acpi/vmgenid.h
@@ -0,0 +1,72 @@
+/*
+ * ACPI definitions related to the VMGENID device (see "docs/vmgenid.txt").
+ *
+ * Copyright (C) 2015 Red Hat, Inc.
+ *
+ * Authors:
+ * Laszlo Ersek <lersek@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef HW_ACPI_VMGENID_H
+#define HW_ACPI_VMGENID_H
+
+#include "hw/acpi/acpi-defs.h"
+
+#define ACPI_UEFI_IDENT_SIZE 16
+
+struct AcpiQemuParamTable {
+ /* ACPI common table header */
+ ACPI_TABLE_HEADER_DEF
+
+ /*
+ * UEFI ACPI Data Table Sub-Header.
+ *
+ * The "UEFI" signature is reserved for this table header starting with
+ * ACPI 4.0. The header structure is described in the UEFI Specification,
+ * version 2.3 or later, in Appendix O.
+
+ * These fields are harmless for SeaBIOS, but ensure unicity in OVMF
+ * ("UEFI" is a multi-instance table type).
+ */
+ uint8_t identifier[ACPI_UEFI_IDENT_SIZE];
+ uint16_t data_offset;
+
+ /* QEMU-specific fields start here. */
+
+ /* Base pointer for the VMGENID device's ADDR control method. */
+ uint64_t vmgenid_addr_base_ptr;
+} QEMU_PACKED;
+typedef struct AcpiQemuParamTable AcpiQemuParamTable;
+
+/* Aggregate initializer for "AcpiQemuParamTable.identifier". */
+#define QEMU_PARAM_TABLE_GUID { 0xFF, 0x5D, 0x7A, 0x41, 0x4B, 0xBF, 0xBC, 0x4A, \
+ 0xA8, 0x39, 0x65, 0x93, 0xBB, 0x41, 0xF4, 0x52 }
+
+/*
+ * This offset points into the fw_cfg blob that contains both
+ * AcpiQemuParamTable and the "live" generation ID after it. The offset points
+ * at the generation ID field, skipping over the "OVMF SDT Header probe
+ * suppressor" and "VMGenID alignment padding" fields in the blob (which are
+ * located right after AcpiQemuParamTable).
+ *
+ * This is an integer constant expression.
+ */
+#define VM_GENERATION_ID_OFFSET \
+ ROUND_UP(sizeof(AcpiQemuParamTable) + sizeof(AcpiTableHeader), 8)
+
+#define VM_GENERATION_ID_SIZE 16
+
+#endif /* HW_ACPI_VMGENID_H */
--
1.8.3.1
next prev parent reply other threads:[~2015-09-13 12:44 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 20:18 [Qemu-devel] [RFC] docs: describe QEMU's VMGenID design Laszlo Ersek
2015-09-01 19:47 ` Eric Blake
2015-09-01 22:05 ` Laszlo Ersek
2015-09-01 22:22 ` Eric Blake
2015-09-07 16:30 ` Paolo Bonzini
2015-09-03 13:49 ` Michael S. Tsirkin
2015-09-03 14:24 ` Laszlo Ersek
2015-09-13 11:56 ` [Qemu-devel] Windows does not support DataTableRegion at all [was: docs: describe QEMU's VMGenID design] Laszlo Ersek
2015-09-13 12:34 ` Michael S. Tsirkin
2015-09-13 12:57 ` Laszlo Ersek
2015-09-14 8:24 ` Igor Mammedov
2015-09-14 10:24 ` Laszlo Ersek
2015-09-14 16:53 ` [Qemu-devel] [edk2] " Bill Paul
2015-09-14 17:14 ` Moore, Robert
2015-09-14 17:23 ` Walz, Michael C
2015-09-14 18:04 ` Moore, Robert
2015-09-14 18:24 ` Laszlo Ersek
2015-09-15 10:49 ` Laszlo Ersek
2015-09-14 18:20 ` Laszlo Ersek
2015-09-14 21:12 ` Bill Paul
2015-09-15 10:49 ` Laszlo Ersek
2015-09-15 13:45 ` Moore, Robert
2015-09-15 14:29 ` Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 00/13] ACPI stuff for the DataTableRegion()-based VMGenID Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 01/13] docs: describe QEMU's VMGenID design Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 02/13] hw/acpi: add i386 callbacks for injecting GPE 04 when the VMGENID changes Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 03/13] hw/acpi: rename "AcpiBuildTables.table_data" to "main_blob" Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 04/13] hw/acpi: allow RSDT entries to be relocated to various fw_cfg blobs Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 05/13] hw/acpi: add more flexible acpi_add_table() and build_header() variants Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 06/13] hw/acpi: introduce ACPI_BUILD_QEMUPARAM_FILE Laszlo Ersek
2015-09-13 12:43 ` Laszlo Ersek [this message]
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 08/13] hw/i386: build UEFI ACPI Data Table for VMGENID in the dedicated blob (WIP) Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 09/13] hw/acpi: expose more parameters for aml_method() Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 10/13] hw/acpi: add AML generator function for DataTableRegion() Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 11/13] hw/acpi: add AML generator function for AccessAs() Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 12/13] hw/acpi: add AML generator function for CreateQWordField() Laszlo Ersek
2015-09-13 12:43 ` [Qemu-devel] [PATCH FYI 13/13] hw/i386: generate AML for the VMGENID device (WIP) Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442148227-17343-8-git-send-email-lersek@redhat.com \
--to=lersek@redhat.com \
--cc=ghammer@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).