Skip to contentSkip to conversation

calling printk early enough kills dom0 boot on x86-64

PATCH Muli Ben-Yehuda 1 participant 1 message Jun 7, 2006

lore
Share & tools
lore
#0 lore raw

If I apply the following patch and boot with it on x86-64, dom0 boot hangs in random places. I found it while adding full ioremap support. I suspect an overflow in the console subsystem due to ioremap being called before the console is fuly set up, but did not have time to fully investigate yet. If anyone wants to take a stab at fixing this, please do :-)

Cheers,
Muli

xen/include/asm-x86/io.h +8 -1
diff -r c191c649cdb3 xen/include/asm-x86/io.h
@@ -6,7 +6,14 @@
 #include <asm/page.h>
 
 /* We don't need real ioremap() on Xen/x86. */
-#define ioremap(x,l) (__va(x))
+static inline void* ioremap(unsigned long x, unsigned long l)
+{
+     printk("ieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!\n");
+     printk("ieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!\n");
+     printk("ieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!\n");
+     printk("ieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!\n");
+    return __va(x);
+}
 
 #define readb(x) (*(volatile char *)(x))
 #define readw(x) (*(volatile short *)(x))