[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Small plan9 loader patch from Tim Newsham.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 77d8b5e40da7f3dac219d3f47b4dc0cb4cea9c7c # Parent fb90dd31c6d7d6f88cce1190a6ef0d74a883ef07 Small plan9 loader patch from Tim Newsham. diff -r fb90dd31c6d7 -r 77d8b5e40da7 tools/libxc/xc_load_aout9.c --- a/tools/libxc/xc_load_aout9.c Wed Sep 7 02:31:24 2005 +++ b/tools/libxc/xc_load_aout9.c Wed Sep 7 09:42:47 2005 @@ -14,7 +14,6 @@ #define round_pgup(_p) (((_p)+(PAGE_SIZE-1))&PAGE_MASK) -#define round_pgdown(_p) ((_p)&PAGE_MASK) #define KZERO 0x80000000 #define KOFFSET(_p) ((_p)&~KZERO) @@ -49,7 +48,7 @@ struct domain_setup_info *dsi) { struct Exec ehdr; - unsigned long start, txtsz, end; + unsigned long start, dstart, end; if (!get_header(image, image_size, &ehdr)) { ERROR("Kernel image does not have a a.out9 header."); @@ -61,9 +60,9 @@ return -EINVAL; } - start = round_pgdown(ehdr.entry); - txtsz = round_pgup(ehdr.text); - end = start + txtsz + ehdr.data + ehdr.bss; + start = ehdr.entry; + dstart = round_pgup(start + ehdr.text); + end = dstart + ehdr.data + ehdr.bss; dsi->v_start = KZERO; dsi->v_kernstart = start; @@ -85,19 +84,18 @@ struct domain_setup_info *dsi) { struct Exec ehdr; - unsigned long start, txtsz; + unsigned long start, dstart; if (!get_header(image, image_size, &ehdr)) { ERROR("Kernel image does not have a a.out9 header."); return -EINVAL; } - start = round_pgdown(ehdr.entry); - txtsz = round_pgup(ehdr.text); - copyout(xch, dom, parray, - start, image, sizeof ehdr + ehdr.text); - copyout(xch, dom, parray, - start+txtsz, image + sizeof ehdr + ehdr.text, ehdr.data); + start = ehdr.entry; + dstart = round_pgup(start + ehdr.text); + copyout(xch, dom, parray, start, image + sizeof ehdr, ehdr.text); + copyout(xch, dom, parray, dstart, + image + sizeof ehdr + ehdr.text, ehdr.data); /* XXX load symbols */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |