Returning from C functions after setup mmu - Raspberry Pi Forums


i'm having hard time understanding why returning c functions wont work.

code loaded @ 8000 run @ 0x80008000 after nmu configured. initialy runs @ 0x8000

linker.ld: .init 0x80008000 : at(0x8000)

boot on entry.s there is, sequence:
- cpu put in svc interrupts disabled
- stack pointer set 0x2000
- call c function (bl main1)
- stack pointer relocated 0x80002xxxx
- call c function (bl main2)
- loopq

on main1()
- call uartinit
- put msg ok
- call mmuinit

on mmuinit
set tables 0x3000 0x4000, , 0x4000 0x8000
va 0x80000000 maped pa 0x, , devspace taked in account.
@ end, mmu enable, put msg using virtual address show ok
next function should return, never did. because next message never shows.

sometimes, small changes in code, strings _puts sending stops , every thing hangs.
if full message was: "this long message", prints: "this lon" , hangs.

experiences kind of situation enabling mmu?

where mmu init code physically? have mapped space @ same address executing yes? can exit mmu on? likeise return address points @ valid address mmu on?


raspberrypi



Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'