On Wed, 31 Jul 2013 14:09:10 +0200, Artyom Tarasenko wrote:
I have used exactly the same command line arguments and u-boot source from Gaisler FTP (slightly modified, as vanilla sources did not compile
due to some trivial errors).

Can you please post your patch and the configuration (if there is any)?

I've attached patch to this message. Regarding configuration, I've used
'grsim' target (`make grsim_config`) without changes.

QEMU loads u-boot.bin and it apparently runs some code (it is busy), but there is still no output. I believe that the problem might be as
simple as configuring the I/O devices where the u-boot compiled for
GRSIM/TSIM expects them, but sure the QEMU documentation is rather
poor on this.

Have you tried looking at the trace produced with "-d in_asm,int" option?

After looking in u-boot sources and qemu trace I've found the issue: u-boot relies on AMBA Plug&Play to locate peripherals registers windows and qemu lacks support for AMBA P&P. u-boot hangs in cpu/leon3/cpu_init.c:80 after
failing to find APB master P&P information.

* Trace output: http://wklej.org/hash/7079dfdf93a/txt/
* u-boot objdump part: http://wklej.org/hash/3d16120acf1/txt/

I think that the easiest (but not the best) way to actually run u-boot
on qemu is to modify u-boot code by hardcoding interrupt controller,
timers and UART addresses and completely remove parts of code related
to MCTRL and SDRAM controller initialization.

Jakub
diff -ru u-boot-1.3.3/include/asm-sparc/io.h u-boot-1.3.3-patched/include/asm-sparc/io.h
--- u-boot-1.3.3/include/asm-sparc/io.h	2008-05-19 12:47:11.000000000 +0200
+++ u-boot-1.3.3-patched/include/asm-sparc/io.h	2013-07-31 16:23:23.857211375 +0200
@@ -70,8 +70,6 @@
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
diff -ru u-boot-1.3.3/include/asm-sparc/types.h u-boot-1.3.3-patched/include/asm-sparc/types.h
--- u-boot-1.3.3/include/asm-sparc/types.h	2008-05-19 12:47:11.000000000 +0200
+++ u-boot-1.3.3-patched/include/asm-sparc/types.h	2013-07-26 21:49:05.909801411 +0200
@@ -65,6 +65,9 @@
 /* DMA addresses are 32-bits wide */
 typedef u32 dma_addr_t;
 
+typedef u32 phys_addr_t;
+typedef u32 phys_size_t;
+
 #endif				/* __KERNEL__ */
 #endif				/* __ASSEMBLY__ */
 

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to