loader for ReactOS (2nd try)
PATCH 1/1 loader for ReactOS (2nd try)
Suggestions by Christian Limpach taken into account in the patch below.
Ge van Geldorp.
Signed-off-by Ge van Geldorp <[email protected]>
tools/libxc/xc_private.h +31 -0
@@ -48,6 +48,31 @@#define l2_table_offset (_a) \ ((_a) >> L2_PAGETABLE_SHIFT) +struct xc_domain_setup_info +{ +unsigned long v_start; +unsigned long v_end; +unsigned long v_kernstart; +unsigned long v_kernend; +unsigned long v_kernentry; + +unsigned int load_symtab; +unsigned long symtab_addr; +unsigned long symtab_len; +}; + +typedef int (*parseimagefunc )( +char *image,unsigned long image_size,struct xc_domain_setup_info *dsi); +typedef int (*loadimagefunc )( +char *image,unsigned long image_size,int xch,u32 dom, +unsigned long *parray,struct xc_domain_setup_info *dsi); + +struct xc_load_funcs +{ +parseimagefunc parseimage; +loadimagefunc loadimage; +}; + #define ERROR(_m, _a...) \ fprintf(stderr, "ERROR: " _m "\n" , ## _a )
@@ -249,5 +274,11 @@int pin_table (int xc_handle,unsigned int type,unsigned long mfn,domid_t dom); + +/* image loading */ +int xc_elf_probe ( +char *image,unsigned long image_size,struct xc_load_funcs *funcs); +int xc_bin_probe ( +char *image,unsigned long image_size,struct xc_load_funcs *funcs);#endif /* __XC_PRIVATE_H__ */
tools/libxc/xc_linux_build.c +21 -292
355 lines not on this page · raw message
tools/libxc/Makefile +2 -0
@@ -14,9 +14,11 @@ SRCS := SRCS += xc_sedf.c +SRCS += xc_bin_load.c SRCS += xc_bvtsched.c SRCS += xc_core.c SRCS += xc_domain.c +SRCS += xc_elf_load.c SRCS += xc_evtchn.c SRCS += xc_gnttab.c SRCS += xc_linux_build.c
tools/libxc/xc_elf_load.c new file +303 -0
303 lines not on this page · raw message
tools/libxc/xc_bin_load.c new file +299 -0
299 lines not on this page · raw message
Quoted 1 line · Ge van Geldorp
Suggestions by Christian Limpach taken into account in the patch below.
Thanks! I've applied the patch.
Now, if someone could merge the plan9 builder with this, that would be brilliant! Ron?
christian