Hi,
I generate in the same way which is shown in
http://www.rte.se/blog/blogg-modesty-corex/installing-linux/2.11
But maybe I am doing something wrong.
Linux kernel works with or1ksim, however, I see 2 strange things:
1. Stack dump
init started: BusyBox v1.19.0.g------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at kernel/irq/handle.c:146 0xc0044fcc()
irq 2 handler 0xc0156eb8 enabled interrupts
Modules linked in:
CPU: 0 PID: 1 Comm: init Tainted: G W
3.13.0-rc7-or1ksim-13847-g43e4944-dirty #12
Stack dump [0xc7019c28]:
sp + 00: 0xc7019c28
sp + 04: 0xc7019c74
sp + 08: 0x00000009
sp + 12: 0xc0044fcc
sp + 16: 0x00000092
sp + 20: 0xc025562f
sp + 24: 0xc7019ea0
sp + 28: 0xc000acc0
sp + 32: 0x00000000
sp + 36: 0x00000001
sp + 40: 0xc025562f
sp + 44: 0x00000092
sp + 48: 0xc0044fcc
sp + 52: 0xc7019c84
sp + 56: 0x00000001
sp + 60: 0x00000000
sp + 64: 0x00000000
sp + 68: 0x00000002
sp + 72: 0xc000ad74
sp + 76: 0xc0255643
sp + 80: 0xc7019c84
sp + 84: 0xc70aee70
sp + 88: 0xc0044fcc
sp + 92: 0x00000002
sp + 96: 0xc0156eb8
sp + 100: 0xc70703d4
sp + 104: 0xc028f40c
sp + 108: 0xc03fa070
sp + 112: 0x00000000
sp + 116: 0x000000c7
sp + 120: 0xc7019ea0
sp + 124: 0x00000000
sp + 128: 0x00000000
sp + 132: 0xc7019e38
sp + 136: 0xc0045014
sp + 140: 0xc70703d4
sp + 144: 0xc0047b20
sp + 148: 0x00000002
sp + 152: 0xc00445ac
sp + 156: 0x00000002
sp + 160: 0xc0004ca8
sp + 164: 0xc7064714
sp + 168: 0xc7002b00
sp + 172: 0x000000c7
sp + 176: 0x000000c7
sp + 180: 0xc0005580
sp + 184: 0x0000807f
sp + 188: 0xc7019df0
sp + 192: 0xc7064714
sp + 196: 0xc7002b00
sp + 200: 0x00000001
sp + 204: 0x00000000
sp + 208: 0x00000001
sp + 212: 0x00000000
sp + 216: 0x00000000
sp + 220: 0xc00b9428
sp + 224: 0xc7018000
sp + 228: 0x00000001
sp + 232: 0x00000000
sp + 236: 0x0000001f
sp + 240: 0xc7002b00
sp + 244: 0x00000005
sp + 248: 0x000000c7
sp + 252: 0x00000000
sp + 256: 0x000000c7
sp + 260: 0x00008079
sp + 264: 0x000000c7
sp + 268: 0x0000000f
sp + 272: 0xc7019ea0
sp + 276: 0x00000000
sp + 280: 0x00000000
sp + 284: 0xffffffff
sp + 288: 0x00000000
sp + 292: 0xfffffff9
sp + 296: 0xc7019e38
sp + 300: 0xc009e6b8
sp + 304: 0xc7019e28
sp + 308: 0x00000000
sp + 312: 0xc00bf718
sp + 316: 0xffffffff
sp + 320: 0x01ffffff
sp + 324: 0x00000068
sp + 328: 0x00000000
sp + 332: 0x00000000
sp + 336: 0x000000a8
sp + 340: 0xc70aa000
sp + 344: 0xc7019dac
sp + 348: 0xc0424ce0
sp + 352: 0x00000000
sp + 356: 0xffffffe5
sp + 360: 0xc70647c0
sp + 364: 0xfffffffd
sp + 368: 0x00000000
sp + 372: 0x00000000
sp + 376: 0xc0424ce0
sp + 380: 0x00000000
sp + 384: 0xffffffe5
sp + 388: 0xc7064714
sp + 392: 0xfffffffd
sp + 396: 0x00000000
sp + 400: 0xc00790b0
sp + 404: 0xfffffffd
sp + 408: 0x000ce19c
sp + 412: 0x00000000
sp + 416: 0xc70647c4
sp + 420: 0x00000000
sp + 424: 0xc7064714
sp + 428: 0xc7002b00
sp + 432: 0x000000c7
sp + 436: 0x000000c7
sp + 440: 0x000000c7
sp + 444: 0xc7019ea0
sp + 448: 0x00000000
sp + 452: 0xc00b9380
sp + 456: 0x00000002
sp + 460: 0x19a14780
sp + 464: 0x00000002
sp + 468: 0x19a14780
sp + 472: 0x00000000
sp + 476: 0x00000000
sp + 480: 0xc007b434
sp + 484: 0xc7019e88
sp + 488: 0x000ce19c
sp + 492: 0x00000000
sp + 496: 0xc70af4a0
sp + 500: 0x00002820
sp + 504: 0xc70af4a8
sp + 508: 0x00000001
sp + 512: 0x000000c7
sp + 516: 0x00000f39
sp + 520: 0x0013c137
sp + 524: 0x00000000
sp + 528: 0x00000000
sp + 532: 0x00001000
sp + 536: 0xc7019ecc
sp + 540: 0xc70af4a0
sp + 544: 0xc7019ecc
sp + 548: 0x0013c070
sp + 552: 0x00000000
sp + 556: 0x00000000
sp + 560: 0x0013d084
sp + 564: 0x00000001
sp + 568: 0x00000000
sp + 572: 0x00000000
sp + 576: 0xc009d5b8
sp + 580: 0xc70af4a0
sp + 584: 0x00000000
sp + 588: 0x00000000
sp + 592: 0x00000000
sp + 596: 0xc70012a0
sp + 600: 0x00000000
sp + 604: 0x00000000
sp + 608: 0x00000000
sp + 612: 0x000000c7
sp + 616: 0x00001000
sp + 620: 0x00000000
sp + 624: 0x00000000
sp + 628: 0x00000000
sp + 632: 0x0013c070
sp + 636: 0x00001000
sp + 640: 0x00001000
sp + 644: 0xc009e484
sp + 648: 0xfffffff7
sp + 652: 0xc70af4a0
sp + 656: 0x00001000
sp + 660: 0x0013c070
sp + 664: 0x00000000
sp + 668: 0x00000000
sp + 672: 0xc009e720
sp + 676: 0x00000000
sp + 680: 0x00000000
sp + 684: 0x0013c028
sp + 688: 0x00000000
sp + 692: 0x0013c028
sp + 696: 0x001334f8
sp + 700: 0x00000000
sp + 704: 0x7fa71e20
sp + 708: 0xc0005698
sp + 712: 0x0000847e
sp + 716: 0x7fa71dac
sp + 720: 0x0013c028
sp + 724: 0x00000003
sp + 728: 0x0013c070
sp + 732: 0x00001000
sp + 736: 0x7fa71e64
sp + 740: 0x00000000
sp + 744: 0x00000000
sp + 748: 0x00109df4
sp + 752: 0x00000000
sp + 756: 0x0000003f
sp + 760: 0x00000000
sp + 764: 0x000e7994
sp + 768: 0x0013d078
sp + 772: 0x0000807e
sp + 776: 0x7fa71f28
sp + 780: 0xfffffff9
sp + 784: 0x001334f8
sp + 788: 0x00008079
sp + 792: 0x001334f9
sp + 796: 0x0000000f
sp + 800: 0x00000004
sp + 804: 0x00000000
sp + 808: 0x7fa71f24
sp + 812: 0xffffffff
sp + 816: 0x00000000
sp + 820: 0xfffffff9
sp + 824: 0x00000000
sp + 828: 0x00008079
sp + 832: 0x00000000
sp + 836: 0x00000000
sp + 840: 0x000e8054
sp + 844: 0x0000003f
sp + 848: 0x00000000
sp + 852: 0x00000000
sp + 856: 0x00000000
sp + 860: 0x00000000
sp + 864: 0x00000000
sp + 868: 0x00000000
sp + 872: 0x00000000
sp + 876: 0x00000000
sp + 880: 0x00000000
sp + 884: 0x00000000
sp + 888: 0x00000000
sp + 892: 0x00000000
sp + 896: 0x00000000
sp + 900: 0x00000000
sp + 904: 0x00000000
sp + 908: 0x00000000
sp + 912: 0x00000000
sp + 916: 0x00000000
sp + 920: 0x00000000
sp + 924: 0x00000000
sp + 928: 0x00000000
sp + 932: 0x00000000
sp + 936: 0x00000000
sp + 940: 0x00000000
sp + 944: 0x00000000
sp + 948: 0x00000000
sp + 952: 0x00000000
sp + 956: 0x00000000
sp + 960: 0x00000000
sp + 964: 0x00000000
sp + 968: 0x00000000
sp + 972: 0x00000000
sp + 976: 0x00000000
sp + 980: 0x00000000
[<c0044fcc>]
[<c000acc0>]
[<c0044fcc>]
[<c000ad74>]
[<c0044fcc>]
[<c0156eb8>]
[<c0045014>]
[<c0047b20>]
[<c00445ac>]
[<c0004ca8>]
[<c0005580>]
[<c00b9428>]
[<c009e6b8>]
[<c00bf718>]
[<c00790b0>]
[<c00b9380>]
[<c007b434>]
[<c009d5b8>]
[<c009e484>]
[<c009e720>]
[<c0005698>]
=======================
---[ end trace b64f93fd77ce5950 ]---
2. Please press Enter to activate this console. ifconfig: SIOCSIFADDR: No
such device
I am not suer if this is ok. Maybe this causes issues in simulation with
hardware
I have 3 files:
- vmlinux - binary file
- vmlinus.vmem - file for RTL simulation
- vmlinux.asm - asembler
I see something strange in these files:
- vmlinux
beginning of file contains some data and next some data are from address
00002100 (I think this is part for Reset exception)
- vmlinux.vmem
@00000000 7f454c46 01020100 00000000 00000000
@00000004 0002005c 00000001 c0000000 00000034
@00000008 0043e63c 00000000 00340020 00020028
@0000000c 001c0019 00000001 00002000 c0000000
@00000010 00000000 002791a0 0027a000 00000007
@00000014 00002000 00000001 0027c000 c027a000
@00000018 0027a000 0017f59c 00193ed8 00000007
@0000001c 00002000 00000000 00000000 00000000
... zeros
@00000840 19e0c029 a9ef8000 19a04000 e1ad7800
@00000844 44006800 15000000 00000000 00000000
@00000848 00000000 00000000 00000000 00000000
@0000084c 00000000 00000000 00000000 00000000
@00000850 00000000 00000000 00000000 00000000
@00000854 00000000 00000000 00000000 00000000
@00000858 00000000 00000000 00000000 00000000
@0000085c 00000000 00000000 00000000 00000000
@00000860 00000000 00000000 00000000 00000000
@00000864 00000000 00000000 00000000 00000000
@00000868 00000000 00000000 00000000 00000000
@0000086c 00000000 00000000 00000000 00000000
@00000870 00000000 00000000 00000000 00000000
@00000874 00000000 00000000 00000000 00000000
@00000878 00000000 00000000 00000000 00000000
@0000087c 00000000 00000000 00000000 00000000
@00000880 d400f078 b7c00040 a7de0001 bc1e0000
@00000884 d400507c 0c00000a d4000880 1820c028
@00000888 a8218b30 1bc04000 e3de0800 855e0000
@0000088c 1bc04000 e3de5000 843e0038 9c21fef0
@00000890 1bc04000 e3de0800 d41e6030 b5800020
@00000894 d41e6080 b5800040 d41e6000 85800078
@00000898 d41e6078 8580007c d41e6028 85800080
@0000089c d41e6004 d41e2010 b4800030 e1800004
@000008a0 abc00079 c000f040 1bc0c000 abde5078
@000008a4 c000f020 24000000 00000000 00000000
@000008a8 00000000 00000000 00000000 00000000
etc.
As you can see Reset exception code is from address 840 not from 100 address
- vmlinux.asm
./vmlinux: file format elf32-or32
Disassembly of section .text:
c0000000 <_stext>:
...
c0000100: 19 e0 c0 29 l.movhi r15,0xc029
c0000104: a9 ef 80 00 l.ori r15,r15,0x8000
c0000108: 19 a0 40 00 l.movhi r13,0x4000
c000010c: e1 ad 78 00 l.add r13,r13,r15
c0000110: 44 00 68 00 l.jr r13
c0000114: 15 00 00 00 l.nop 0x0
...
c0000200 <_dispatch_bus_fault>:
c0000200: d4 00 f0 78 l.sw 0x78(r0),r30
c0000204: b7 c0 00 40 l.mfspr r30,r0,0x40
I am not sure if these files are ok.
Can I use this vmem file in simulation to put directly to SRAM memory or
should I use some bootloader.
Thank you for any help.
Best Regards,
Piotr
--
View this message in context: http://openrisc.2316802.n4.nabble.com/Simple-linux-with-OR1200-tp4641978p4641981.html
Sent from the OpenRISC mailing list archive at Nabble.com.