aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/acpi-build.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-02-20 18:22:09 +0000
committerMichael S. Tsirkin <mst@redhat.com>2015-03-01 12:33:22 +0100
commit4ec8d2b3f54dd1dcd9e2a80e529feff4e2603288 (patch)
tree24faf90045af2a49c0c3c321f1d1624f5432a31e /hw/i386/acpi-build.c
parentd31c909e57a131dec7a1e620f36573f2f5fca9e5 (diff)
pc: acpi-build: drop remaining ssdt_misc template
It drops empty ssdt_misc templete. It also hides from user almost all pointer arithmetic when building SSDT which makes resulting code a bit cleaner and concentrating only on composing ASL construct /i.e. a task build_ssdt() should be doing/. Also it makes one binary blob less stored in QEMU source tree by removing need to keep and update hw/i386/ssdt-misc.hex.generated file here in total saving us ~430LOC. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r--hw/i386/acpi-build.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 2700154602..01d988cfd3 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -526,7 +526,6 @@ static inline char acpi_get_hex(uint32_t val)
#define ACPI_SSDT_SIGNATURE 0x54445353 /* SSDT */
#define ACPI_SSDT_HEADER_LENGTH 36
-#include "hw/i386/ssdt-misc.hex"
#include "hw/i386/ssdt-pcihp.hex"
#include "hw/i386/ssdt-tpm.hex"
@@ -850,7 +849,6 @@ build_ssdt(GArray *table_data, GArray *linker,
MachineState *machine = MACHINE(qdev_get_machine());
uint32_t nr_mem = machine->ram_slots;
unsigned acpi_cpus = guest_info->apic_id_limit;
- uint8_t *ssdt_ptr;
Aml *ssdt, *sb_scope, *scope, *pkg, *dev, *method, *crs, *field, *ifctx;
int i;
@@ -860,9 +858,8 @@ build_ssdt(GArray *table_data, GArray *linker,
QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
- /* Copy header and patch values in the S3_ / S4_ / S5_ packages */
- ssdt_ptr = acpi_data_push(ssdt->buf, sizeof(ssdp_misc_aml));
- memcpy(ssdt_ptr, ssdp_misc_aml, sizeof(ssdp_misc_aml));
+ /* Reserve space for header */
+ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader));
scope = aml_scope("\\_SB.PCI0");
/* build PCI0._CRS */