[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] acpi: Extract acpi info description into a separate ASL file



commit e8c4e3af734df1b73f25f459385fe7683dffcc5f
Author:     Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
AuthorDate: Wed Sep 28 09:21:47 2016 -0400
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Sep 28 14:30:38 2016 +0100

    acpi: Extract acpi info description into a separate ASL file
    
    This code will be needed by PVH guests who don't want to use full DSDT.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 .gitignore                                       |  2 +-
 tools/firmware/hvmloader/acpi/Makefile           |  8 +++++---
 tools/firmware/hvmloader/acpi/dsdt.asl           | 19 -----------------
 tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl | 26 ++++++++++++++++++++++++
 4 files changed, 32 insertions(+), 23 deletions(-)

diff --git a/.gitignore b/.gitignore
index eeabe0b..e67b7e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -129,7 +129,7 @@ tools/firmware/extboot/extboot.img
 tools/firmware/extboot/signrom
 tools/firmware/hvmloader/acpi/mk_dsdt
 tools/firmware/hvmloader/acpi/dsdt*.c
-tools/firmware/hvmloader/acpi/dsdt_*.asl
+tools/firmware/hvmloader/acpi/dsdt_*cpu*.asl
 tools/firmware/hvmloader/acpi/ssdt_*.h
 tools/firmware/hvmloader/hvmloader
 tools/firmware/hvmloader/roms.h
diff --git a/tools/firmware/hvmloader/acpi/Makefile 
b/tools/firmware/hvmloader/acpi/Makefile
index 45de14a..f63e734 100644
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/firmware/hvmloader/acpi/Makefile
@@ -36,14 +36,16 @@ ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
 mk_dsdt: mk_dsdt.c
        $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_xeninclude) -o $@ mk_dsdt.c
 
-dsdt_anycpu_qemu_xen.asl: dsdt.asl mk_dsdt
+dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl mk_dsdt
        awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
+       cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
        ./mk_dsdt --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
        mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
-dsdt_%cpu.asl: dsdt.asl mk_dsdt
+dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl mk_dsdt
        awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
+       cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
        ./mk_dsdt --debug=$(debug) --maxcpu $*  >> $@.$(TMP_SUFFIX)
        mv -f $@.$(TMP_SUFFIX) $@
 
@@ -69,7 +71,7 @@ acpi.a: $(OBJS)
 
 clean:
        rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz $(DEPS)
-       rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt dsdt_*.asl 
*.$(TMP_SUFFIX)
+       rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt dsdt_*cpu*.asl 
*.$(TMP_SUFFIX)
 
 distclean: clean
 
diff --git a/tools/firmware/hvmloader/acpi/dsdt.asl 
b/tools/firmware/hvmloader/acpi/dsdt.asl
index bd65823..4f6db79 100644
--- a/tools/firmware/hvmloader/acpi/dsdt.asl
+++ b/tools/firmware/hvmloader/acpi/dsdt.asl
@@ -43,25 +43,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0)
 
     Scope (\_SB)
     {
-       /* ACPI_INFO_PHYSICAL_ADDRESS == 0xFC000000 */
-       OperationRegion(BIOS, SystemMemory, 0xFC000000, 40)
-       Field(BIOS, ByteAcc, NoLock, Preserve) {
-           UAR1, 1,
-           UAR2, 1,
-           LTP1, 1,
-           HPET, 1,
-           Offset(2),
-           NCPU, 16,
-           PMIN, 32,
-           PLEN, 32,
-           MSUA, 32, /* MADT checksum address */
-           MAPA, 32, /* MADT LAPIC0 address */
-           VGIA, 32, /* VM generation id address */
-           LMIN, 32,
-           HMIN, 32,
-           LLEN, 32,
-           HLEN, 32
-       }
 
         /* Fix HCT test for 0x400 pci memory:
          * - need to report low 640 MB mem as motherboard resource
diff --git a/tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl 
b/tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl
new file mode 100644
index 0000000..0136dce
--- /dev/null
+++ b/tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl
@@ -0,0 +1,26 @@
+
+    Scope (\_SB)
+    {
+       /*
+        * BIOS region must match struct acpi_info in build.c and
+        * be located at ACPI_INFO_PHYSICAL_ADDRESS = 0xFC000000
+        */
+       OperationRegion(BIOS, SystemMemory, 0xFC000000, 40)
+       Field(BIOS, ByteAcc, NoLock, Preserve) {
+           UAR1, 1,
+           UAR2, 1,
+           LTP1, 1,
+           HPET, 1,
+           Offset(2),
+           NCPU, 16,
+           PMIN, 32,
+           PLEN, 32,
+           MSUA, 32, /* MADT checksum address */
+           MAPA, 32, /* MADT LAPIC0 address */
+           VGIA, 32, /* VM generation id address */
+           LMIN, 32,
+           HMIN, 32,
+           LLEN, 32,
+           HLEN, 32
+       }
+    }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.