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] x86: Support discontiguous sets of multib

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Support discontiguous sets of multiboot modules.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Apr 2009 05:55:20 -0700
Delivery-date: Wed, 15 Apr 2009 05:56:25 -0700
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.fraser@xxxxxxxxxx>
# Date 1239719033 -3600
# Node ID 94ffd85005c5e34d4ab70e2e2a3f283b44802e36
# Parent  81d6b5762c4036965f4e92b226a93e6c0925bd92
x86: Support discontiguous sets of multiboot modules.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/setup.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff -r 81d6b5762c40 -r 94ffd85005c5 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Apr 14 14:52:27 2009 +0100
+++ b/xen/arch/x86/setup.c      Tue Apr 14 15:23:53 2009 +0100
@@ -419,7 +419,7 @@ void __init __start_xen(unsigned long mb
     multiboot_info_t *mbi = __va(mbi_p);
     module_t *mod = (module_t *)__va(mbi->mods_addr);
     unsigned long nr_pages, modules_length, modules_headroom;
-    int i, e820_warn = 0, bytes = 0;
+    int i, j, e820_warn = 0, bytes = 0;
     struct ns16550_defaults ns16550 = {
         .data_bits = 8,
         .parity    = 'n',
@@ -614,7 +614,9 @@ void __init __start_xen(unsigned long mb
      * we can relocate the dom0 kernel and other multiboot modules. Also, on
      * x86/64, we relocate Xen to higher memory.
      */
-    modules_length = mod[mbi->mods_count-1].mod_end - mod[0].mod_start;
+    modules_length = 0;
+    for ( i = 0; i < mbi->mods_count; i++ )
+        modules_length += mod[i].mod_end - mod[i].mod_start;
 
     /* ensure mod[0] is mapped before parsing */
     bootstrap_map(mod[0].mod_start, mod[0].mod_end);
@@ -735,8 +737,14 @@ void __init __start_xen(unsigned long mb
             initial_images_start = e;
             e -= modules_headroom;
             initial_images_base = e;
-            move_memory(initial_images_start,
-                        mod[0].mod_start, mod[mbi->mods_count-1].mod_end);
+            e += modules_length + modules_headroom;
+            for ( j = mbi->mods_count-1; j >= 0; j-- )
+            {
+                e -= mod[j].mod_end - mod[j].mod_start;
+                move_memory(e, mod[j].mod_start, mod[j].mod_end);
+                mod[j].mod_end += e - mod[j].mod_start;
+                mod[j].mod_start = e;
+            }
         }
 
         if ( !kexec_crash_area.start && (s < e) &&
@@ -1030,8 +1038,7 @@ void __init __start_xen(unsigned long mb
 
     if ( (initrdidx > 0) && (initrdidx < mbi->mods_count) )
     {
-        _initrd_start = initial_images_start +
-            (mod[initrdidx].mod_start - mod[0].mod_start);
+        _initrd_start = mod[initrdidx].mod_start;
         _initrd_len   = mod[initrdidx].mod_end - mod[initrdidx].mod_start;
     }
 

_______________________________________________
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] x86: Support discontiguous sets of multiboot modules., Xen patchbot-unstable <=