This code will be needed by PVH guests who don't want to use full DSDT.
Signed-off-by: Boris Ostrovsky
---
Changes in v4:
* New patch. This used to be done in a later patch but because we now
are trying to keep dsdt.asl GPL-only (in the next patch) it's better
to do this here and not touch dsdt.asl later.
.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(-)
create mode 100644 tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl
diff --git a/.gitignore b/.gitignore
index cc64fc9..6dee857 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 d3e882a..76da073 100644
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/firmware/hvmloader/acpi/Makefile
@@ -33,13 +33,15 @@ 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}' $< > $@
+ cat dsdt_acpi_info.asl >> $@
./mk_dsdt --debug=$(debug) --dm-version qemu-xen >> $@
# 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}' $< > $@
+ cat dsdt_acpi_info.asl >> $@
./mk_dsdt --debug=$(debug) --maxcpu $* >> $@
$(filter dsdt_%.c,$(C_SRC)): %.c: iasl %.asl
@@ -63,7 +65,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
+ rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt dsdt_*cpu*.asl
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 == 0xFC00 */
- OperationRegion(BIOS, SystemMemory, 0xFC00, 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 000..29e962a
--- /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 = 0xFC00
+ */
+ OperationRegion(BIOS, SystemMemory, 0xFC00, 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
+ }
+}
--
1.8.3.1
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel