qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: imammedo@redhat.com, dgilbert@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/4] pc: rename ssdt-misc to dsdt-common
Date: Wed, 24 Dec 2014 17:07:36 +0100	[thread overview]
Message-ID: <1419437261-21113-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1419437261-21113-1-git-send-email-pbonzini@redhat.com>

All the changes to generated files are in the header, so there is
no need to rebuild test data.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/Makefile.objs                              |  2 +-
 hw/i386/acpi-build.c                               | 36 +++++++++++-----------
 hw/i386/{ssdt-misc.dsl => acpi-dsdt-common.dsl}    |  8 ++---
 ...ex.generated => acpi-dsdt-common.hex.generated} | 30 +++++++++---------
 hw/i386/acpi-dsdt.dsl                              |  2 +-
 5 files changed, 39 insertions(+), 39 deletions(-)
 rename hw/i386/{ssdt-misc.dsl => acpi-dsdt-common.dsl} (94%)
 rename hw/i386/{ssdt-misc.hex.generated => acpi-dsdt-common.hex.generated} (93%)

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 e723fe1..c0b3c04 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"
 
@@ -1061,38 +1061,38 @@ static void patch_pci_windows(PcPciInfo *pci, uint8_t *start, unsigned size)
     }
 }
 
-#define SSDT_MISC_SIZE (sizeof(ssdt_misc_aml) - sizeof(AcpiTableHeader))
+#define DSDT_COMMON_SIZE (sizeof(dsdt_common_aml) - sizeof(AcpiTableHeader))
 
 static void
-fill_ssdt_misc(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
-               PcPciInfo *pci)
+fill_dsdt_common(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
+                 PcPciInfo *pci)
 {
     MachineState *machine = MACHINE(qdev_get_machine());
     uint32_t nr_mem = machine->ram_slots;
-    uint8_t *ssdt_ptr;
+    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(dest, ssdt_ptr + sizeof(AcpiTableHeader), SSDT_MISC_SIZE);
-    g_free(ssdt_ptr);
+    memcpy(dest, dsdt_ptr + sizeof(AcpiTableHeader), DSDT_COMMON_SIZE);
+    g_free(dsdt_ptr);
 }
 
 static void
@@ -1444,10 +1444,10 @@ build_dsdt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
 
     assert(misc->dsdt_code && misc->dsdt_size);
 
-    size = misc->dsdt_size + SSDT_MISC_SIZE;
+    size = misc->dsdt_size + DSDT_COMMON_SIZE;
     dsdt = acpi_data_push(table_data, size);
     memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
-    fill_ssdt_misc(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);
+    fill_dsdt_common(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);
 
     memset(dsdt, 0, sizeof *dsdt);
     build_header(linker, table_data, dsdt, "DSDT", size, 1);
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 93%
rename from hw/i386/ssdt-misc.hex.generated
rename to hw/i386/acpi-dsdt-common.hex.generated
index cbcf61d..5127845 100644
--- a/hw/i386/ssdt-misc.hex.generated
+++ b/hw/i386/acpi-dsdt-common.hex.generated
@@ -4,8 +4,8 @@ static unsigned char acpi_pci64_length[] = {
 static unsigned char acpi_s4_pkg[] = {
 0x99
 };
-static unsigned char ssdt_mctrl_nr_slots[] = {
-0x7d
+static unsigned char acpi_s4_name[] = {
+0x92
 };
 static unsigned char acpi_s3_name[] = {
 0x86
@@ -16,7 +16,10 @@ static unsigned char acpi_pci32_start[] = {
 static unsigned char acpi_pci64_valid[] = {
 0x43
 };
-static unsigned char ssdp_misc_aml[] = {
+static unsigned char dsdt_isa_pest[] = {
+0xda
+};
+static unsigned char dsdt_common_aml[] = {
 0x53,
 0x53,
 0x44,
@@ -26,7 +29,7 @@ static unsigned char ssdp_misc_aml[] = {
 0x0,
 0x0,
 0x1,
-0x3,
+0x2f,
 0x42,
 0x58,
 0x50,
@@ -39,8 +42,8 @@ static unsigned char ssdp_misc_aml[] = {
 0x53,
 0x44,
 0x54,
-0x53,
-0x55,
+0x43,
+0x4f,
 0x1,
 0x0,
 0x0,
@@ -49,9 +52,9 @@ static unsigned char ssdp_misc_aml[] = {
 0x4e,
 0x54,
 0x4c,
-0x28,
-0x8,
-0x14,
+0x13,
+0x9,
+0x12,
 0x20,
 0x10,
 0x4c,
@@ -382,12 +385,6 @@ static unsigned char ssdp_misc_aml[] = {
 0x4d,
 0x58
 };
-static unsigned char ssdt_isa_pest[] = {
-0xda
-};
-static unsigned char acpi_s4_name[] = {
-0x92
-};
 static unsigned char acpi_pci64_start[] = {
 0x4d
 };
@@ -397,3 +394,6 @@ static unsigned char acpi_pci64_end[] = {
 static unsigned char acpi_pci32_end[] = {
 0x39
 };
+static unsigned char dsdt_mctrl_nr_slots[] = {
+0x7d
+};
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

  parent reply	other threads:[~2014-12-24 16:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
2015-01-19 15:15   ` Igor Mammedov
2015-01-19 15:41     ` Paolo Bonzini
2015-01-19 17:14       ` Igor Mammedov
2015-01-19 17:26         ` Paolo Bonzini
2015-01-19 19:29           ` Michael S. Tsirkin
2015-01-19 19:33             ` Michael S. Tsirkin
2015-01-19 19:57               ` Paolo Bonzini
2015-01-19 21:27                 ` Michael S. Tsirkin
2015-01-20  9:59             ` Igor Mammedov
2015-01-20 10:34               ` Paolo Bonzini
2015-01-20 10:35               ` Michael S. Tsirkin
2015-01-20 12:41                 ` Igor Mammedov
2015-01-20 12:56                   ` Michael S. Tsirkin
2015-01-19 15:31   ` Michael S. Tsirkin
2014-12-24 16:07 ` Paolo Bonzini [this message]
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 3/4] pc: move common parts of the DSDT to dsdt-common Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl Paolo Bonzini
2015-01-19 15:26   ` Michael S. Tsirkin
2015-01-19 15:33     ` Paolo Bonzini
2015-01-19 15:38       ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm Paolo Bonzini
2015-01-19 15:33   ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 6/4] pc: clean up pre-2.1 compatibility code Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables Paolo Bonzini
2015-01-19 15:36   ` Michael S. Tsirkin

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=1419437261-21113-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@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).