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] [IA64] Change dom0's initrd image load ar

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Change dom0's initrd image load area so that it follows start info.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jan 2007 21:10:29 -0800
Delivery-date: Thu, 18 Jan 2007 21:50:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 awilliam@xxxxxxxxxxxx
# Date 1167947426 25200
# Node ID 613ccf4ca46bbc3a75b0414eb54aed6c5e40cabf
# Parent  912f8af36878c54ec4069a50f629f6ecfae18d21
[IA64] Change dom0's initrd image load area so that it follows start info.

It becomes non-sense to use dom0_size if dom0 memoy is assigned sparsely.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/domain.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff -r 912f8af36878 -r 613ccf4ca46b xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Tue Jan 02 16:42:09 2007 -0700
+++ b/xen/arch/ia64/xen/domain.c        Thu Jan 04 14:50:26 2007 -0700
@@ -1051,10 +1051,11 @@ int construct_dom0(struct domain *d,
        if(initrd_start && initrd_len){
            unsigned long offset;
 
-           pinitrd_start= dom0_size - (PAGE_ALIGN(initrd_len) + 4*1024*1024);
-           if (pinitrd_start <= pstart_info)
-               panic("%s:enough memory is not assigned to dom0", __func__);
-
+           /* The next page aligned boundary after the start info.
+              Note: EFI_PAGE_SHIFT = 12 <= PAGE_SHIFT */
+           pinitrd_start = pstart_info + PAGE_SIZE;
+           if (pinitrd_start + initrd_len >= dom0_size)
+                   panic("%s: not enough memory assigned to dom0", __func__);
            for (offset = 0; offset < initrd_len; offset += PAGE_SIZE) {
                struct page_info *p;
                p = assign_new_domain_page(d, pinitrd_start + offset);
@@ -1109,10 +1110,6 @@ int construct_dom0(struct domain *d,
        /* Copy the OS image. */
        loaddomainelfimage(d,image_start);
 
-       /* Copy the initial ramdisk. */
-       //if ( initrd_len != 0 )
-       //    memcpy((void *)vinitrd_start, initrd_start, initrd_len);
-
        BUILD_BUG_ON(sizeof(start_info_t) + sizeof(dom0_vga_console_info_t) +
                     sizeof(struct ia64_boot_param) > PAGE_SIZE);
 
@@ -1161,8 +1158,7 @@ int construct_dom0(struct domain *d,
        bp->console_info.orig_y = bp->console_info.num_rows == 0 ?
                                  0 : bp->console_info.num_rows - 1;
 
-       bp->initrd_start = dom0_size -
-                    (PAGE_ALIGN(ia64_boot_param->initrd_size) + 4*1024*1024);
+       bp->initrd_start = pinitrd_start;
        bp->initrd_size = ia64_boot_param->initrd_size;
 
        ci = (dom0_vga_console_info_t *)((unsigned char *)si +

_______________________________________________
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] [IA64] Change dom0's initrd image load area so that it follows start info., Xen patchbot-unstable <=