[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH V2 46/46] xen: arm: skanky "appended kernel" option



I'm using this with the ARMv8 Foundation model:

./Foundation_v8pkg/Foundation_v8 \
        --image xen-unstable/xen/xen-arm64 \
        --data flash.img@0x80400000

where flash.img is a zImage (what you would put in Flash in the VE
models)

(disabled by default edit config.h to enable)

Mostly throwing this out there in case others find it useful.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/arch/arm/setup.c         |   14 ++++++++++++++
 xen/include/asm-arm/config.h |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 94e9754..967a8d4 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -368,6 +368,20 @@ void __init start_xen(unsigned long boot_phys_offset,
         + (fdt_paddr & ((1 << SECOND_SHIFT) - 1));
     fdt_size = device_tree_early_init(fdt);
 
+#ifdef CONFIG_KERNEL_APPEND
+    early_info.modules.module[1].start  = boot_phys_offset + (uintptr_t)_end;
+    early_info.modules.module[1].start += (2<<20)-1;
+    early_info.modules.module[1].start &= ~((2<<20)-1);
+
+    early_info.modules.module[1].size = 4<<20;
+    early_info.modules.nr_mods = 1;
+    early_printk("assuming kernel is appended at "
+                 "%"PRIpaddr"-%"PRIpaddr"\n",
+                 early_info.modules.module[1].start,
+                 early_info.modules.module[1].start
+                 + early_info.modules.module[1].size);
+#endif
+
     cpus = smp_get_max_cpus();
     cmdline_parse(device_tree_bootargs(fdt));
 
diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index add70bd..d02ef6c 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -34,6 +34,8 @@
 
 #define CONFIG_DOMAIN_PAGE 1
 
+//#define CONFIG_KERNEL_APPEND 1
+
 #define OPT_CONSOLE_STR "com1"
 
 #ifdef MAX_PHYS_CPUS
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.