[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/4] pc: rename ssdt-misc to dsdt-common
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 2/4] pc: rename ssdt-misc to dsdt-common |
Date: |
Wed, 24 Dec 2014 14:12:41 +0100 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/Makefile.objs | 2 +-
hw/i386/acpi-build.c | 38 +++++++++++-----------
hw/i386/{ssdt-misc.dsl => acpi-dsdt-common.dsl} | 8 ++---
...ex.generated => acpi-dsdt-common.hex.generated} | 4 +--
hw/i386/acpi-dsdt.dsl | 2 +-
5 files changed, 27 insertions(+), 27 deletions(-)
rename hw/i386/{ssdt-misc.dsl => acpi-dsdt-common.dsl} (94%)
rename hw/i386/{ssdt-misc.hex.generated => acpi-dsdt-common.hex.generated}
(96%)
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 9d419ad..fe6b846 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -9,7 +9,7 @@ obj-y += kvmvapic.o
obj-y += acpi-build.o
obj-y += bios-linker-loader.o
hw/i386/acpi-build.o: hw/i386/acpi-build.c hw/i386/acpi-dsdt.hex \
- hw/i386/ssdt-proc.hex hw/i386/ssdt-pcihp.hex hw/i386/ssdt-misc.hex \
+ hw/i386/ssdt-proc.hex hw/i386/ssdt-pcihp.hex
hw/i386/acpi-dsdt-common.hex \
hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex \
hw/i386/q35-acpi-dsdt.hex hw/i386/ssdt-mem.hex \
hw/i386/ssdt-tpm.hex
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index c8088f1..0712dd3 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -715,7 +715,7 @@ 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/acpi-dsdt-common.hex"
#include "hw/i386/ssdt-pcihp.hex"
#include "hw/i386/ssdt-tpm.hex"
@@ -1062,37 +1062,37 @@ static void patch_pci_windows(PcPciInfo *pci, uint8_t
*start, unsigned size)
}
static size_t
-append_ssdt_misc(GArray *table_data, AcpiPmInfo *pm, AcpiMiscInfo *misc,
- PcPciInfo *pci)
+append_dsdt_common(GArray *table_data, AcpiPmInfo *pm, AcpiMiscInfo *misc,
+ PcPciInfo *pci)
{
MachineState *machine = MACHINE(qdev_get_machine());
uint32_t nr_mem = machine->ram_slots;
- size_t size = sizeof(ssdp_misc_aml) - sizeof(AcpiTableHeader);
- uint8_t *ssdt_ptr;
+ size_t size = sizeof(dsdt_common_aml) - sizeof(AcpiTableHeader);
+ uint8_t *dsdt_ptr;
/* Copy header and patch values in the S3_ / S4_ / S5_ packages */
- ssdt_ptr = g_memdup(ssdp_misc_aml, sizeof(ssdp_misc_aml));
+ dsdt_ptr = g_memdup(dsdt_common_aml, sizeof(dsdt_common_aml));
if (pm->s3_disabled) {
- ssdt_ptr[acpi_s3_name[0]] = 'X';
+ dsdt_ptr[acpi_s3_name[0]] = 'X';
}
if (pm->s4_disabled) {
- ssdt_ptr[acpi_s4_name[0]] = 'X';
+ dsdt_ptr[acpi_s4_name[0]] = 'X';
} else {
- ssdt_ptr[acpi_s4_pkg[0] + 1] = ssdt_ptr[acpi_s4_pkg[0] + 3] =
+ dsdt_ptr[acpi_s4_pkg[0] + 1] = dsdt_ptr[acpi_s4_pkg[0] + 3] =
pm->s4_val;
}
- patch_pci_windows(pci, ssdt_ptr, sizeof(ssdp_misc_aml));
+ patch_pci_windows(pci, dsdt_ptr, sizeof(dsdt_common_aml));
- ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
- ssdt_isa_pest[0], 16, misc->pvpanic_port);
+ ACPI_BUILD_SET_LE(dsdt_ptr, sizeof(dsdt_common_aml),
+ dsdt_isa_pest[0], 16, misc->pvpanic_port);
- ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
- ssdt_mctrl_nr_slots[0], 32, nr_mem);
+ ACPI_BUILD_SET_LE(dsdt_ptr, sizeof(dsdt_common_aml),
+ dsdt_mctrl_nr_slots[0], 32, nr_mem);
memcpy(acpi_data_push(table_data, size),
- ssdt_ptr + sizeof(AcpiTableHeader), size);
- g_free(ssdt_ptr);
+ dsdt_ptr + sizeof(AcpiTableHeader), size);
+ g_free(dsdt_ptr);
return size;
}
@@ -1441,17 +1441,17 @@ build_dsdt(GArray *table_data, GArray *linker,
AcpiPmInfo *pm,
AcpiMiscInfo *misc, PcPciInfo *pci)
{
AcpiTableHeader *dsdt;
- size_t ssdt_misc_size;
+ size_t dsdt_common_size;
assert(misc->dsdt_code && misc->dsdt_size);
dsdt = acpi_data_push(table_data, misc->dsdt_size);
memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
- ssdt_misc_size = append_ssdt_misc(table_data, pm, misc, pci);
+ dsdt_common_size = append_dsdt_common(table_data, pm, misc, pci);
memset(dsdt, 0, sizeof *dsdt);
build_header(linker, table_data, dsdt, "DSDT",
- misc->dsdt_size + ssdt_misc_size, 1);
+ misc->dsdt_size + dsdt_common_size, 1);
}
/* Build final rsdt table */
diff --git a/hw/i386/ssdt-misc.dsl b/hw/i386/acpi-dsdt-common.dsl
similarity index 94%
rename from hw/i386/ssdt-misc.dsl
rename to hw/i386/acpi-dsdt-common.dsl
index 1e3baae..f7849c0 100644
--- a/hw/i386/ssdt-misc.dsl
+++ b/hw/i386/acpi-dsdt-common.dsl
@@ -14,9 +14,9 @@
*/
#include "hw/acpi/pc-hotplug.h"
-ACPI_EXTRACT_ALL_CODE ssdp_misc_aml
+ACPI_EXTRACT_ALL_CODE dsdt_common_aml
-DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
+DefinitionBlock ("acpi-dsdt-common.aml", "SSDT", 0x01, "BXPC", "BXSSDTCOMM",
0x1)
{
/****************************************************************
@@ -36,7 +36,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC",
"BXSSDTSUSP", 0x1)
Name(P1E, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
ACPI_EXTRACT_NAME_BUFFER8 acpi_pci64_length
Name(P1L, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
- ACPI_EXTRACT_NAME_DWORD_CONST ssdt_mctrl_nr_slots
+ ACPI_EXTRACT_NAME_DWORD_CONST dsdt_mctrl_nr_slots
Name(MEMORY_SLOTS_NUMBER, 0x12345678)
}
@@ -81,7 +81,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC",
"BXSSDTSUSP", 0x1)
Device(PEVT) {
Name(_HID, "QEMU0001")
/* PEST will be patched to be Zero if no such device */
- ACPI_EXTRACT_NAME_WORD_CONST ssdt_isa_pest
+ ACPI_EXTRACT_NAME_WORD_CONST dsdt_isa_pest
Name(PEST, 0xFFFF)
OperationRegion(PEOR, SystemIO, PEST, 0x01)
Field(PEOR, ByteAcc, NoLock, Preserve) {
diff --git a/hw/i386/ssdt-misc.hex.generated
b/hw/i386/acpi-dsdt-common.hex.generated
similarity index 96%
rename from hw/i386/ssdt-misc.hex.generated
rename to hw/i386/acpi-dsdt-common.hex.generated
index cbcf61d..8f7c778 100644
--- a/hw/i386/ssdt-misc.hex.generated
+++ b/hw/i386/acpi-dsdt-common.hex.generated
@@ -16,7 +16,7 @@ static unsigned char acpi_pci32_start[] = {
static unsigned char acpi_pci64_valid[] = {
0x43
};
-static unsigned char ssdp_misc_aml[] = {
+static unsigned char dsdt_common_aml[] = {
0x53,
0x53,
0x44,
@@ -382,7 +382,7 @@ static unsigned char ssdp_misc_aml[] = {
0x4d,
0x58
};
-static unsigned char ssdt_isa_pest[] = {
+static unsigned char dsdt_isa_pest[] = {
0xda
};
static unsigned char acpi_s4_name[] = {
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index a611e07..e50efeb 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -170,7 +170,7 @@ DefinitionBlock (
Return (0x0)
}
- /* Hotplug notification method supplied by SSDT */
+ /* Hotplug notification method in acpi-dsdt-common.dsl */
External(\_SB.PCI0.PCNT, MethodObj)
}
--
1.8.3.1
- [Qemu-devel] [PATCH 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come), Paolo Bonzini, 2014/12/24
- [Qemu-devel] [PATCH 3/4] pc: move common parts of the DSDT to dsdt-common, Paolo Bonzini, 2014/12/24
- [Qemu-devel] [PATCH 1/4] pc: append ssdt-misc.dsl to the DSDT, Paolo Bonzini, 2014/12/24
- [Qemu-devel] [PATCH 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl, Paolo Bonzini, 2014/12/24
- [Qemu-devel] [PATCH 5/4] pc: introduce new ACPI table sizing algorithm, Paolo Bonzini, 2014/12/24
- [Qemu-devel] [PATCH 2/4] pc: rename ssdt-misc to dsdt-common,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 6/4] pc: clean up pre-2.1 compatibility code, Paolo Bonzini, 2014/12/24
- [Qemu-devel] [PATCH 7/4] pc: go back to smaller ACPI tables, Paolo Bonzini, 2014/12/24
- Re: [Qemu-devel] [PATCH 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come), Paolo Bonzini, 2014/12/24
- Re: [Qemu-devel] [PATCH 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come), Michael S. Tsirkin, 2014/12/24