Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI am currently trying to put some functions in SSRAM on the MMU distribution, but having trouble. I added the section to the linker script as before, but offset for the kernel region:
NOTES
+ . = KERNEL_REGION_BASE + SSRAM_BASE;
+ .ssram :
+ {
+ . = ALIGN(4);
+ *(.ssram)
+ }
+
DISCARDS
I then tried adding a couple kernel functions to the section. The results from System.map: c04b59ac A _end
c5000000 T do_sync_write
c5000128 T vfs_write When I add just do_sync_write, the system hangs after "RPC: Registered tcp NFSv4.1 backchannel transport module." When I add both, I get this at the same place: r1: c1c16000 r2: 00000000 r3: 00000000 r4: c1c2b620
r5: c1c681e0 r6: 00007e20 r7: c1c16e1c r8: 6f6f7468
r9: 6f6f0000 r10: c1c43450 r11: c1c681e0 r12: 00000000
r13: c1c681e0 r14: c1c43452 r15: 006c6f6f
ra: c0072514 fp: c01f8000 sp: c1c16e18 gp: 00000000
ea: c5000128 estatus: 00000001
Unaligned access from kernel mode, this might be a hardware
problem, dump registers and restart the instruction
BADADDR 0xc4fff891
cause 7
op-code 0x36bdd976 The address given is not a symbol, which makes me think some data address is getting shifted when I move the functions out of DDR, which makes me think this is a latent problem somewhere, but that's just guesswork. Also, if I use IO_REGION_BASE instead of KERNEL_REGION_BASE, which by my understanding should have the same effect but non-cacheable, I get this link error: fs/built-in.o: In function `vfs_write':
(.text+0x2ec8): relocation truncated to fit: R_NIOS2_CALL26 against `do_sync_write'
fs/built-in.o: In function `do_sync_write':
(.ssram+0xb4): relocation truncated to fit: R_NIOS2_CALL26 against `wait_on_retry_sync_kiocb'