Hi Geert,

On 11/05/2013 03:15 PM, Geert Uytterhoeven wrote:
Hi,

I'm trying to play a bit with Linux on OpenRISC using a DE0-Nano board.
Basically I followed the instructions on http://kevinmehall.net/openrisc/guide/.
That works fine (most of the time).

Great to have you looking into this stuff! Some more experienced "Linux eyes" on this code is very much welcome.

PC is 0x0028c174:

     c028c11c <enable_mmu>:
     c028c11c:       b7 c0 00 11     l.mfspr r30,r0,0x11
     c028c120:       1b 80 00 00     l.movhi r28,0x0
     c028c124:       ab 9c 00 60     l.ori r28,r28,0x60
     c028c128:       e3 de e0 04     l.or r30,r30,r28
     c028c12c:       c0 00 f0 11     l.mtspr r0,r30,0x11
     c028c130:       15 00 00 00     l.nop 0x0
     c028c134:       15 00 00 00     l.nop 0x0
     c028c138:       15 00 00 00     l.nop 0x0
     c028c13c:       15 00 00 00     l.nop 0x0
     c028c140:       15 00 00 00     l.nop 0x0
     c028c144:       15 00 00 00     l.nop 0x0
     c028c148:       15 00 00 00     l.nop 0x0
     c028c14c:       15 00 00 00     l.nop 0x0
     c028c150:       15 00 00 00     l.nop 0x0
     c028c154:       15 00 00 00     l.nop 0x0
     c028c158:       15 00 00 00     l.nop 0x0
     c028c15c:       15 00 00 00     l.nop 0x0
     c028c160:       15 00 00 00     l.nop 0x0
     c028c164:       15 00 00 00     l.nop 0x0
     c028c168:       15 00 00 00     l.nop 0x0
     c028c16c:       15 00 00 00     l.nop 0x0
     c028c170:       15 00 00 05     l.nop 0x5
--> c028c174:       84 79 00 00     l.lwz r3,0x0(r25)

See commit dec830189e1e192a80f574243a2dc31bdc1c4fc5. r25 is supposed to contain a pointer to the FDT at this point... since you're using a built-in DTB this value will presumably be garbage and there's no sanity checking on the value.

r3 (see patch) should really contain a "no FDT" value when the kernel is launched but I don't see that that's being done.

Stefan... any thoughts on this? I take it you never use a built-in kernel? What does u-boot do if there's no FDT to pass to the kernel?

/Jonas
_______________________________________________
Linux mailing list
Linux@lists.openrisc.net
http://lists.openrisc.net/listinfo/linux

Reply via email to