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

[Xen-devel] xen/arm: How to hide console UART from dom0?



Current mainline Xen crashes for me during dom0 boot because the console
UART is exposed to dom0 in the DTB and nothing is mapped there, which
causes it to fault trying to access it.

My, unsuitable for upstream, local hack is:

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 0abacda..5d4916c 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -231,6 +231,7 @@ static int fdt_next_dom0_node(const void *fdt, int node,
                               int *depth_out)
 {
     int depth = *depth_out;
+    const char *name;
 
     while ( (node = fdt_next_node(fdt, node, &depth)) &&
             node >= 0 && depth >= 0 )
@@ -250,7 +251,16 @@ static int fdt_next_dom0_node(const void *fdt, int node,
                                        "xen,multiboot-module" ) == 0 )
             continue;
 
+        name = fdt_get_name(fdt, node, NULL);
+        if (!strcmp(name, "uart@0c0000"))
+        {
+            printk("Skipping %s\n", name);
+            continue;
+        }
+
         /* We've arrived at a node which dom0 is interested in. */
+        printk("Node %s to dom0\n", name);
+
         break;
     }
 
I tried seeing if I could remember the name of the console DT device but
in dt_uart_init I get:
        dt_node_full_name
        => /smb/motherboard/iofpga@3,00000000/uart@0c000
        dt_node_name => uart
Neither of which match the required "uart@0c000" which
fdt_next_dom0_node has in its hand.

Julien, I know you have longer term plans to create dom0's device tree
from Xen's unflattened device tree using the used_by field but I suppose
that won't be happening for 4.3 at this stage? Is there a better short
term hack we can make here? How do you work around this issue?

Ian.


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