[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH FYI 07/13] hw/acpi: introduce the AcpiQemuParamTable
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [PATCH FYI 07/13] hw/acpi: introduce the AcpiQemuParamTable structure |
Date: |
Sun, 13 Sep 2015 14:43:41 +0200 |
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 <address@hidden>
Cc: Gal Hammer <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
---
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 <address@hidden>
+ *
+ * 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
- [Qemu-devel] Windows does not support DataTableRegion at all [was: docs: describe QEMU's VMGenID design], Laszlo Ersek, 2015/09/13
- Re: [Qemu-devel] Windows does not support DataTableRegion at all [was: docs: describe QEMU's VMGenID design], Michael S. Tsirkin, 2015/09/13
- [Qemu-devel] [PATCH FYI 00/13] ACPI stuff for the DataTableRegion()-based VMGenID, Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 01/13] docs: describe QEMU's VMGenID design, Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 02/13] hw/acpi: add i386 callbacks for injecting GPE 04 when the VMGENID changes, Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 03/13] hw/acpi: rename "AcpiBuildTables.table_data" to "main_blob", Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 04/13] hw/acpi: allow RSDT entries to be relocated to various fw_cfg blobs, Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 05/13] hw/acpi: add more flexible acpi_add_table() and build_header() variants, Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 06/13] hw/acpi: introduce ACPI_BUILD_QEMUPARAM_FILE, Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 07/13] hw/acpi: introduce the AcpiQemuParamTable structure,
Laszlo Ersek <=
- [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
- [Qemu-devel] [PATCH FYI 10/13] hw/acpi: add AML generator function for DataTableRegion(), Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 09/13] hw/acpi: expose more parameters for aml_method(), Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 11/13] hw/acpi: add AML generator function for AccessAs(), Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 12/13] hw/acpi: add AML generator function for CreateQWordField(), Laszlo Ersek, 2015/09/13
- [Qemu-devel] [PATCH FYI 13/13] hw/i386: generate AML for the VMGENID device (WIP), Laszlo Ersek, 2015/09/13