[LOADER] Remove check for VIRT_BASE existence: it's not needed

to prevent xend crashign (when Aravindh's latest patch is
applied) and breaks ia64. Also, ensure we set a reasonable
default for elf_paddr_offset.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-05-21 09:55:15 +01:00
1 parent 1dfbe29c87
commit e699658dbb
2 files changed
+25 -14

No files matched your search

+14 -11
View File
@@ -148,14 +148,9 @@ static int parseelfimage(const char *image,
dsi->xen_guest_string = guestinfo;
if ( (p = strstr(guestinfo, "VIRT_BASE=")) == NULL )
{
ERROR("Malformed ELF image. No VIRT_BASE specified");
return -EINVAL;
}
virt_base = strtoul(p+10, &p, 0);
virt_base = 0;
if ( (p = strstr(guestinfo, "VIRT_BASE=")) != NULL )
virt_base = strtoul(p+10, &p, 0);
dsi->elf_paddr_offset = virt_base;
if ( (p = strstr(guestinfo, "ELF_PADDR_OFFSET=")) != NULL )
dsi->elf_paddr_offset = strtoul(p+17, &p, 0);
@@ -172,10 +167,18 @@ static int parseelfimage(const char *image,
kernend = vaddr + phdr->p_memsz;
}
if ( virt_base )
dsi->v_start = virt_base;
else
dsi->v_start = virt_base;
if ( dsi->v_start == 0 )
{
/*
* Legacy compatibility and images with no __xen_guest section:
* assume header addresses are virtual addresses, and that
* guest memory should be mapped starting at kernel load address.
*/
dsi->v_start = kernstart;
if ( dsi->elf_paddr_offset == 0 )
dsi->elf_paddr_offset = dsi->v_start;
}
dsi->v_kernentry = ehdr->e_entry;
if ( (p = strstr(guestinfo, "VIRT_ENTRY=")) != NULL )
+11 -3
View File
@@ -103,10 +103,18 @@ int parseelfimage(struct domain_setup_info *dsi)
kernend = vaddr + phdr->p_memsz;
}
if ( virt_base )
dsi->v_start = virt_base;
else
dsi->v_start = virt_base;
if ( dsi->v_start == 0 )
{
/*
* Legacy compatibility and images with no __xen_guest section:
* assume header addresses are virtual addresses, and that
* guest memory should be mapped starting at kernel load address.
*/
dsi->v_start = kernstart;
if ( dsi->elf_paddr_offset == 0 )
dsi->elf_paddr_offset = dsi->v_start;
}
dsi->v_kernentry = ehdr->e_entry;
if ( (p = strstr(guestinfo, "VIRT_ENTRY=")) != NULL )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.