WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] hvmloader: Move acpi_info structure out f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvmloader: Move acpi_info structure out from low memory.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 15 Nov 2011 15:11:09 +0000
Delivery-date: Tue, 15 Nov 2011 07:13:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1321301735 0
# Node ID 848049b14ec7fbd28bd4cd756e01609698b60c7a
# Parent  ca618f5deec257150480d89848ab173ace217e5a
hvmloader: Move acpi_info structure out from low memory.

This avoids a conflict with SeaBIOS's memory management. Moreover
there is no reason that acp_info must live below 1MB, and moving it
out actually simplifies our code.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r ca618f5deec2 -r 848049b14ec7 tools/firmware/hvmloader/acpi/build.c
--- a/tools/firmware/hvmloader/acpi/build.c     Mon Nov 14 18:17:44 2011 +0000
+++ b/tools/firmware/hvmloader/acpi/build.c     Mon Nov 14 20:15:35 2011 +0000
@@ -276,7 +276,7 @@
 
 void acpi_build_tables(struct acpi_config *config, unsigned int physical)
 {
-    struct acpi_info *acpi_info = (struct acpi_info 
*)ACPI_INFO_PHYSICAL_ADDRESS;
+    struct acpi_info *acpi_info;
     struct acpi_20_rsdp *rsdp;
     struct acpi_20_rsdt *rsdt;
     struct acpi_20_xsdt *xsdt;
@@ -287,6 +287,9 @@
     unsigned long        secondary_tables[16];
     int                  nr_secondaries, i;
 
+    /* Allocate and initialise the acpi info area. */
+    mem_hole_populate_ram(ACPI_INFO_PHYSICAL_ADDRESS >> PAGE_SHIFT, 1);
+    acpi_info = (struct acpi_info *)ACPI_INFO_PHYSICAL_ADDRESS;
     memset(acpi_info, 0, sizeof(*acpi_info));
 
     /*
diff -r ca618f5deec2 -r 848049b14ec7 tools/firmware/hvmloader/acpi/dsdt.asl
--- a/tools/firmware/hvmloader/acpi/dsdt.asl    Mon Nov 14 18:17:44 2011 +0000
+++ b/tools/firmware/hvmloader/acpi/dsdt.asl    Mon Nov 14 20:15:35 2011 +0000
@@ -61,8 +61,8 @@
 
     Scope (\_SB)
     {
-       /* ACPI_INFO_PHYSICAL_ADDRESS == 0x9F000 */
-       OperationRegion(BIOS, SystemMemory, 0x9F000, 24)
+       /* ACPI_INFO_PHYSICAL_ADDRESS == 0xFC000000 */
+       OperationRegion(BIOS, SystemMemory, 0xFC000000, 24)
        Field(BIOS, ByteAcc, NoLock, Preserve) {
            UAR1, 1,
            UAR2, 1,
diff -r ca618f5deec2 -r 848049b14ec7 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Mon Nov 14 18:17:44 2011 +0000
+++ b/tools/firmware/hvmloader/config.h Mon Nov 14 20:15:35 2011 +0000
@@ -54,18 +54,17 @@
 #define PCI_MEM_END         0xfc000000
 extern unsigned long pci_mem_start, pci_mem_end;
 
-/* Reserved for special BIOS mappings, etc. */
-#define RESERVED_MEMBASE    0xfc000000
 
 /* Memory map. */
 #define SCRATCH_PHYSICAL_ADDRESS      0x00010000
 #define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
-#define ACPI_INFO_PHYSICAL_ADDRESS    0x0009F000
 #define VGABIOS_PHYSICAL_ADDRESS      0x000C0000
 #define HVMLOADER_PHYSICAL_ADDRESS    0x00100000
-
-#define ACPI_INFO_SIZE                     0xC00
-#define ACPI_INFO_PHYSICAL_END (ACPI_INFO_PHYSICAL_ADDRESS + ACPI_INFO_SIZE)
+/* Special BIOS mappings, etc. are allocated from here upwards... */
+#define RESERVED_MEMBASE              0xFC000000
+/* NB. ACPI_INFO_PHYSICAL_ADDRESS *MUST* match definition in acpi/dsdt.asl! */
+#define ACPI_INFO_PHYSICAL_ADDRESS    0xFC000000
+#define RESERVED_MEMORY_DYNAMIC       0xFC001000
 
 extern unsigned long scratch_start;
 
diff -r ca618f5deec2 -r 848049b14ec7 tools/firmware/hvmloader/e820.c
--- a/tools/firmware/hvmloader/e820.c   Mon Nov 14 18:17:44 2011 +0000
+++ b/tools/firmware/hvmloader/e820.c   Mon Nov 14 20:15:35 2011 +0000
@@ -81,55 +81,24 @@
     /* Lowmem must be at least 512K to keep Windows happy) */
     ASSERT ( lowmem_reserved_base > 512<<10 );
 
-    /*
-     * Lowmem reservation must either cover the ACPI info region
-     * entirely or not at all. Sitting half way through suggests
-     * something funny is going on.
-     */
-    ASSERT ( lowmem_reserved_base < ACPI_INFO_PHYSICAL_ADDRESS ||
-             lowmem_reserved_base > ACPI_INFO_PHYSICAL_END );
-
     ASSERT ( bios_image_base < 0x100000 );
 
-    if ( lowmem_reserved_base < ACPI_INFO_PHYSICAL_ADDRESS )
+    /*
+     * 0x0-lowmem_reserved_base: Ordinary RAM.
+     */
+    e820[nr].addr = 0x00000;
+    e820[nr].size = lowmem_reserved_base;
+    e820[nr].type = E820_RAM;
+    nr++;
+
+    /* lowmem_reserved_base-0xA0000: reserved by BIOS implementation. */
+    if ( lowmem_reserved_base < 0xA0000 )
     {
-        /*
-         * 0x0-lowmem_reserved_base: Ordinary RAM.
-         */
-        e820[nr].addr = 0x00000;
-        e820[nr].size = lowmem_reserved_base;
-        e820[nr].type = E820_RAM;
-        nr++;
-    }
-    else
-    {
-        /* 0x0-ACPI_INFO: Ordinary RAM. */
-        e820[nr].addr = 0x00000;
-        e820[nr].size = ACPI_INFO_PHYSICAL_ADDRESS;
-        e820[nr].type = E820_RAM;
-        nr++;
-
-        /* ACPI INFO: Reserved. */
-        e820[nr].addr = ACPI_INFO_PHYSICAL_ADDRESS;
-        e820[nr].size = ACPI_INFO_SIZE;
+        /* Reserved for internal use. */
+        e820[nr].addr = lowmem_reserved_base;
+        e820[nr].size = 0xA0000-lowmem_reserved_base;
         e820[nr].type = E820_RESERVED;
         nr++;
-
-        /* ACPI_INFO-lowmem_reserved_base: Ordinary RAM. */
-        e820[nr].addr = ACPI_INFO_PHYSICAL_END;
-        e820[nr].size = lowmem_reserved_base - ACPI_INFO_PHYSICAL_END;
-        e820[nr].type = E820_RAM;
-        nr++;
-    }
-
-    /* lowmem_reserved_base-0xa00000: reserved by BIOS implementation. */
-    if ( lowmem_reserved_base < 0xA0000 )
-    {
-            /* Reserved for internal use. */
-            e820[nr].addr = lowmem_reserved_base;
-            e820[nr].size = 0xA0000-lowmem_reserved_base;
-            e820[nr].type = E820_RESERVED;
-            nr++;
     }
 
     /*
diff -r ca618f5deec2 -r 848049b14ec7 tools/firmware/hvmloader/rombios.c
--- a/tools/firmware/hvmloader/rombios.c        Mon Nov 14 18:17:44 2011 +0000
+++ b/tools/firmware/hvmloader/rombios.c        Mon Nov 14 20:15:35 2011 +0000
@@ -47,7 +47,6 @@
 {
     /*
      * 0x9E000-0x09F000: Stack.
-     * 0x9F000-0x09C000: ACPI info.
      * 0x9FC00-0x0A0000: Extended BIOS Data Area (EBDA).
      * ...
      * 0xE0000-0x0F0000: PC-specific area. We place various tables here.
diff -r ca618f5deec2 -r 848049b14ec7 tools/firmware/hvmloader/util.c
--- a/tools/firmware/hvmloader/util.c   Mon Nov 14 18:17:44 2011 +0000
+++ b/tools/firmware/hvmloader/util.c   Mon Nov 14 20:15:35 2011 +0000
@@ -343,7 +343,7 @@
     }
 }
 
-static uint32_t reserve = RESERVED_MEMBASE - 1;
+static uint32_t reserve = RESERVED_MEMORY_DYNAMIC - 1;
 
 xen_pfn_t mem_hole_alloc(uint32_t nr_mfns)
 {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvmloader: Move acpi_info structure out from low memory., Xen patchbot-unstable <=