xen: arm: Only lookup kernel/initrd bootmodule once while building dom0.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
This commit is contained in:
Ian Campbell committed 2014-07-24 16:23:18 +01:00
1 parent c3412c04b1
commit 0040b649d6
3 files changed
+6 -3

No files matched your search

+3 -3
View File
@@ -405,7 +405,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
int res = 0;
int had_dom0_bootargs = 0;
struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_KERNEL);
const struct bootmodule *mod = kinfo->kernel_bootmodule;
if ( mod && mod->cmdline[0] )
bootargs = &mod->cmdline[0];
@@ -455,7 +455,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
if ( dt_node_path_is_equal(node, "/chosen") )
{
struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_RAMDISK);
const struct bootmodule *mod = kinfo->initrd_bootmodule;
if ( bootargs )
{
@@ -1224,7 +1224,7 @@ static void dtb_load(struct kernel_info *kinfo)
static void initrd_load(struct kernel_info *kinfo)
{
struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_RAMDISK);
const struct bootmodule *mod = kinfo->initrd_bootmodule;
paddr_t load_addr = kinfo->initrd_paddr;
paddr_t paddr, len;
unsigned long offs;
+2
View File
@@ -116,6 +116,7 @@ static void place_modules(struct kernel_info *info,
info->dtb_paddr = modbase;
info->initrd_paddr = info->dtb_paddr + dtb_len;
info->initrd_bootmodule = mod;
}
static paddr_t kernel_zimage_place(struct kernel_info *info)
@@ -383,6 +384,7 @@ int kernel_probe(struct kernel_info *info)
return -ENOENT;
}
info->kernel_bootmodule = mod;
start = mod->start;
size = mod->size;
+1
View File
@@ -23,6 +23,7 @@ struct kernel_info {
paddr_t entry;
/* boot blob load addresses */
const struct bootmodule *kernel_bootmodule, *initrd_bootmodule;
paddr_t dtb_paddr;
paddr_t initrd_paddr;
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.