dom0 kernel didnot boot while transplanting the xen-4.7 on OMAP5432 uEVM board
hi !
I am transplanting the xen-4.7 on my OMAP5432 uEVM board,but after booting the xen ,the dom0 kernel didnot boot successfully(no console output while booting the dom0 kernel).I followed my step from this link: Xen_ARM_with_Virtualization_Extensions/OMAP5432_uEVM
my u-boot command and boot log are as follow:
Is there any mistake i have made? could you give me some advice?
my U-boot command :
-------------------------------------------------------------------------------------------------------------------------------
setenv dtb_addr_r 0x825f0000
setenv xen_addr_r 0x90000000
setenv kernel_addr_r 0xa0000000
setenv xen_bootargs 'sync_console console=dtuart dtuart=serial2'
setenv dom0_bootargs 'console=hvc0,115200n8 earlyprintk=xen debug ignore_loglevel root=/dev/mmcblk0p2 rw rootwait fixrtc' fatload mmc 0:1 $dtb_addr_r omap5-uevm.dtb
fatload mmc 0:1 $xen_addr_r xen-uImage
fatload mmc 0:1 $kernel_addr_r zImage
fdt addr $dtb_addr_r
fdt resize
fdt set /chosen xen,xen-bootargs \"$xen_bootargs\"
fdt resize
fdt set /chosen xen,dom0-bootargs \"$dom0_bootargs\"
fdt mknode /chosen modules
fdt set /chosen/modules '#address-cells' <1>
fdt set /chosen/modules '#size-cells' <1>
fdt mknode /chosen/modules module@0
fdt set /chosen/modules/module@0 compatible xen,linux-zimage xen,multiboot-module
fdt set /chosen/modules/module@0 reg <$kernel_addr_r 0xa00000>
bootm $xen_addr_r - $dtb_addr_r
-------------------------------------------------------------------------------------------------------------------------------
my boot log :
-------------------------------------------------------------------------------------------------------------
## Booting kernel from Legacy Image at 90000000 ...
Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 787308 Bytes = 768.9 KiB
Load Address: 80200000
Entry Point: 80200000
Verifying Checksum ... OK
## Flattened Device Tree blob at 825f0000
Booting using the fdt blob at 0x825f0000 Loading Kernel Image ... OK
OK
reserving fdt memory region: addr=825f0000 size=d000 Loading Device Tree to beeef000, end beefefff ... OK
Starting kernel ...
- UART enabled -
- CPU 00000000 booting -
- Xen starting in Hyp mode -
- Zero BSS -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) Checking for initrd in /chosen
(XEN) RAM: 0000000080000000 - 00000000beffffff
(XEN)
(XEN) MODULE[0]: 00000000beeef000 - 00000000beeff000 Device Tree
(XEN) MODULE[1]: 00000000a0000000 - 00000000a0a00000 Kernel
(XEN) RESVD[0]: 00000000825f0000 - 00000000825fd000
(XEN)
(XEN) Command line: sync_console console=dtuart dtuart=serial2
(XEN) Placing Xen at 0x00000000bec00000-0x00000000bee00000
(XEN) Update BOOTMOD_XEN from 0000000080200000-0000000080309701 => 00000000bec00000-00000000bed09701
(XEN) Xen heap: 00000000bc000000-00000000be000000 (8192 pages)
(XEN) Dom heap: 249856 pages
(XEN) Domain heap initialised
(XEN) Platform: TI OMAP5
(XEN) Looking for dtuart at "serial2", options ""
(XEN) omap-uart: Unable to retrieve the IRQ
(XEN) Unable to initialize dtuart: -22
(XEN) Bad console= option 'dtuart'
Xen 4.7-unstable
(XEN) Xen version 4.7-unstable (root@) (arm-linux-gnueabihf-gcc (Linaro GCC 5.1-2015.08) 5.1.1 20150608) debug=y Tue Jan 26 18:21:04 CST 2016 (XEN) Latest ChangeSet: Tue Jan 19 17:47:19 2016 +0000 git:1949868
(XEN) Console output is synchronous.
(XEN) Processor: 412fc0f2: "ARM Limited", variant: 0x2, part 0xc0f, rev 0x2
(XEN) 32-bit Execution:
(XEN) Processor Features: 00001131:00011011
(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN) Extensions: GenericTimer Security
(XEN) Debug Features: 02010555 (XEN) Auxiliary Features: 00000000 (XEN) Memory Model Features: 10201105 20000000 01240000 02102211
(XEN) ISA Features: 02101110 13112111 21232041 11112131 10011142 00000000 (XEN) Set AuxCoreBoot1 to 00000000bec0004c (0020004c)
(XEN) Set AuxCoreBoot0 to 0x20
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 6144 KHz (XEN) GICv2: WARNING: The GICC size is too small: 0x1000 expected 0x2000 (XEN) GICv2 initialization:
(XEN) gic_dist_addr=0000000048211000 (XEN) gic_cpu_addr=0000000048212000 (XEN) gic_hyp_addr=0000000048214000 (XEN) gic_vcpu_addr=0000000048216000 (XEN) gic_maintenance_irq=25
(XEN) GICv2: 192 lines, 2 cpus, secure (IID 0000043b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 16 KiB.
(XEN) VFP implementer 0x41 architecture 4 part 0x30 variant 0xf rev 0x0 (XEN) Bringing up CPU1
- CPU 00000001 booting -
- Xen starting in Hyp mode -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) CPU 1 booted.
(XEN) Brought up 2 CPUs
(XEN) P2M: 40-bit IPA
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80003558
(XEN) I/O virtualisation disabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 00000000a0000000
(XEN) Allocating 1:1 mappings totalling 128MB for dom0:
(XEN) BANK[0] 0x000000a8000000-0x000000b0000000 (128MB)
(XEN) Grant table range: 0x000000bec00000-0x000000bec62000
(XEN) Loading zImage from 00000000a0000000 to 00000000afc00000-00000000aff6cf48 (XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading dom0 DTB to 0x00000000afa00000-0x00000000afa0ce28 (XEN) Scrubbing Free RAM on 1 nodes using 2 CPUs
(XEN) ....done.
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) **********************************************
(XEN) ******* WARNING: CONSOLE OUTPUT IS SYNCHRONOUS
(XEN) ******* This option is intended to aid debugging of Xen by ensuring (XEN) ******* that all output is synchronously delivered on the serial line. (XEN) ******* However it can introduce SIGNIFICANT latencies and affect (XEN) ******* timekeeping. It is NOT recommended for production use! (XEN) **********************************************
(XEN) 3... 2... 1...
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen) (XEN) Freed 284kB init memory.
------------------------------------------------------------------------------------------------------------------------
[no any output after here]
Thank you very much!
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · five
setenv
xen_bootargs'sync_consoleconsole=dtuart dtuart=serial2'
setenvdom0_bootargs'console=hvc0,115200n8 earlyprintk=xen debugignore_loglevelroot=/dev/mmcblk0p2 rw
[...]
Quoted 5 lines
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen) (XEN) Freed 284kB init memory.
--------------------------------------------------------------------------------------------------------------
----------
[no any output after here]
I don't know what is the underlying issue, but to find out you need to get earlyprintk to work in Dom0 first.
The command line parameter earlyprintk=xen for dom0 is wrong: there is no Xen specific earlyprintk support for the arm architecture in Linux. The command line argument should be just "earlyprintk". Also for that to work, you need DEBUG_LL enabled in your kernel config and the appropriate DEBUG_OMAP option, probably DEBUG_OMAP2PLUS_UART, see arch/arm/Kconfig.debug. Once you do that, Linux prints to a virtual uart emulated by Xen, that matches the one in hardware.
Alternatively if you have any issues with that, you can always hack the earlyprintk code in Linux, and force it it to go through xen_raw_console_write. Like this (not compiled, not tested):
arch/arm/kernel/early_printk.c +2 -12
@@ -12,21 +12,11 @@#include <linux/console.h> #include <linux/init.h> -extern void printch (int ); - -static void early_write (const char *s,unsigned n) -{ -while (n-- >0 ) { -if (*s =='\n' ) -printch ('\r' ); -printch (*s); - s++; - } -} +void xen_raw_console_write (const char *str);static void early_console_write (struct console *con,const char *s,unsigned n) { -early_write (s, n); +xen_raw_console_write (s); }static struct console early_console_dev = {
drivers/tty/hvc/hvc_xen.c +1 -1
@@ -642,7 +642,7 @@ void xen_raw_console_write(const char *str)ssize_t len =strlen (str);int rc =0 ; -if (xen_domain ()) { +if (1 ||xen_domain ()) { rc =dom0_write_console (0 , str, len);#ifdef CONFIG_X86 if (rc == -ENOSYS &&xen_hvm_domain ())