aboutsummaryrefslogtreecommitdiff
path: root/include/hw/acpi
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2021-09-24 08:27:58 -0400
committerMichael S. Tsirkin <mst@redhat.com>2021-10-05 17:30:57 -0400
commita86d86ac0ae39b7e8fcce08fffd2e0ab5aa287df (patch)
tree0ca939a5b02b6d2bae396eee817629ab9160038e /include/hw/acpi
parent88b1045eadd699335ffab0c9235f096f3a8cf771 (diff)
downloadqemu-a86d86ac0ae39b7e8fcce08fffd2e0ab5aa287df.zip
qemu-a86d86ac0ae39b7e8fcce08fffd2e0ab5aa287df.tar.gz
qemu-a86d86ac0ae39b7e8fcce08fffd2e0ab5aa287df.tar.bz2
acpi: arm/virt: build_spcr: use acpi_table_begin()/acpi_table_end() instead of build_header()
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. while at it, replace packed structure with endian agnostic build_append_FOO() API. PS: Spec is Microsoft hosted, however 1.02 is no where to be found (MS lists only the current revision) and the current revision is 1.07, so bring comments in line with 1.07 as this is the only available spec. There is no content change between originally implemented 1.02 (using QEMU code as reference) and 1.07. The only change is renaming 'Reserved2' field to 'Language', with the same 0 value. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Message-Id: <20210924122802.1455362-32-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/acpi')
-rw-r--r--include/hw/acpi/acpi-defs.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
index 6f2f08a..012c4ff 100644
--- a/include/hw/acpi/acpi-defs.h
+++ b/include/hw/acpi/acpi-defs.h
@@ -118,38 +118,6 @@ typedef struct AcpiFadtData {
#define ACPI_FADT_ARM_PSCI_USE_HVC (1 << 1)
/*
- * Serial Port Console Redirection Table (SPCR), Rev. 1.02
- *
- * For .interface_type see Debug Port Table 2 (DBG2) serial port
- * subtypes in Table 3, Rev. May 22, 2012
- */
-struct AcpiSerialPortConsoleRedirection {
- ACPI_TABLE_HEADER_DEF
- uint8_t interface_type;
- uint8_t reserved1[3];
- struct AcpiGenericAddress base_address;
- uint8_t interrupt_types;
- uint8_t irq;
- uint32_t gsi;
- uint8_t baud;
- uint8_t parity;
- uint8_t stopbits;
- uint8_t flowctrl;
- uint8_t term_type;
- uint8_t reserved2;
- uint16_t pci_device_id;
- uint16_t pci_vendor_id;
- uint8_t pci_bus;
- uint8_t pci_slot;
- uint8_t pci_func;
- uint32_t pci_flags;
- uint8_t pci_seg;
- uint32_t reserved3;
-} QEMU_PACKED;
-typedef struct AcpiSerialPortConsoleRedirection
- AcpiSerialPortConsoleRedirection;
-
-/*
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
*/
struct AcpiFacsDescriptorRev1 {