hvmloader/acpi/dsdt: Move IO port range reservation
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 28 Oct 2011 16:14:35 +0000 (17:14 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 28 Oct 2011 16:14:35 +0000 (17:14 +0100)
This patch move the IO port range reservation from the dsdt.asl to
mk_dsdt.  This IO port range need to be generated by mk_dsdt, because
qemu-xen use different port. The IO port for qemu-xen will be added in
a later patch.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/acpi/dsdt.asl
tools/firmware/hvmloader/acpi/mk_dsdt.c

index 1bcee861515dfe0006b1b2c980fefd5f392e3755..0549d7b6073dd1512a1d911b19e2fc5ddc2e9e97 100644 (file)
@@ -100,20 +100,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0)
            Name (_ADR, 0x00)
            Name (_BBN, 0x00)
 
-           /*
-            * Reserve the IO port ranges [0x10c0, 0x1101] and [0xb044, 0xb047].
-            * Or else, for a hotplugged-in device, the port IO BAR assigned
-            * by guest OS may conflict with the ranges here.
-            */
-           Device(HP0)
-           {
-               Name(_HID, EISAID("PNP0C02"))
-               Name(_CRS, ResourceTemplate() {
-                   IO (Decode16, 0x10c0, 0x10c0, 0x00, 0x82)
-                   IO (Decode16, 0xb044, 0xb044, 0x00, 0x04)
-               })
-           }
-
            /* Make cirrues VGA S3 suspend/resume work in Windows XP/2003 */
            Device (VGA)
            {
index 2b21364902709b80c0289cfd72791c539b6837c1..ea3be143027842ccb190948475cb3e8b559547c6 100644 (file)
@@ -215,6 +215,19 @@ int main(int argc, char **argv)
     /**** PCI0 start ****/
     push_block("Scope", "\\_SB.PCI0");
 
+    /*
+     * Reserve the IO port ranges [0x10c0, 0x1101] and [0xb044, 0xb047].
+     * Or else, for a hotplugged-in device, the port IO BAR assigned
+     * by guest OS may conflict with the ranges here.
+     */
+    push_block("Device", "HP0"); {
+        stmt("Name", "_HID, EISAID(\"PNP0C02\")");
+        stmt("Name", "_CRS, ResourceTemplate() {"
+             "  IO (Decode16, 0x10c0, 0x10c0, 0x00, 0x82)"
+             "  IO (Decode16, 0xb044, 0xb044, 0x00, 0x04)"
+             "}");
+    } pop_block();
+
     /*** PCI-ISA link definitions ***/
     /* BUFA: List of ISA IRQs available for linking to PCI INTx. */
     stmt("Name", "BUFA, ResourceTemplate() { "