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

Re: [Xen-devel] dom0 kernel didnot boot while transplanting the xen-4.7 on OMAP5432 uEVM board



On Tue, 23 Feb 2016, five wrote:
> setenv xen_bootargs 'sync_console console=dtuart dtuart=serial2'
> setenv dom0_bootargs 'console=hvc0,115200n8 earlyprintk=xen debug 
> ignore_loglevel root=/dev/mmcblk0p2 rw

[...]

> (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):


diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c
index 4307653..a0aae79 100644
--- a/arch/arm/kernel/early_printk.c
+++ b/arch/arm/kernel/early_printk.c
@@ -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 = {
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 7a3d146..20bbf75 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -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())

_______________________________________________
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®.