[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 02/14] libxl/arm: Factor out codes for generating DTB
From: Shannon Zhao <shannon.zhao@xxxxxxxxxx> Factor out codes for generating DTB to prepare for adding ACPI tables generation codes. Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx> --- tools/libxl/libxl_arm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index c6d77e3..9e99159 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -747,10 +747,9 @@ static int copy_partial_fdt(libxl__gc *gc, void *fdt, void *pfdt) #define FDT_MAX_SIZE (1<<20) -int libxl__arch_domain_init_hw_description(libxl__gc *gc, - libxl_domain_build_info *info, - libxl__domain_build_state *state, - struct xc_dom_image *dom) +static int prepare_dtb(libxl__gc *gc, libxl_domain_build_info *info, + libxl__domain_build_state *state, + struct xc_dom_image *dom) { void *fdt = NULL; void *pfdt = NULL; @@ -764,8 +763,6 @@ int libxl__arch_domain_init_hw_description(libxl__gc *gc, /* convenience aliases */ xc_domain_configuration_t *xc_config = &state->config; - assert(info->type == LIBXL_DOMAIN_TYPE_PV); - vers = libxl_get_version_info(CTX); if (vers == NULL) return ERROR_FAIL; @@ -883,6 +880,15 @@ out: return rc; } +int libxl__arch_domain_init_hw_description(libxl__gc *gc, + libxl_domain_build_info *info, + libxl__domain_build_state *state, + struct xc_dom_image *dom) +{ + assert(info->type == LIBXL_DOMAIN_TYPE_PV); + return prepare_dtb(gc, info, state, dom); +} + static void finalise_one_memory_node(libxl__gc *gc, void *fdt, uint64_t base, uint64_t size) { -- 2.0.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |