Forum Discussion
Altera_Forum
Honored Contributor
21 years agouClinux .data segment in SDRAM?
For a number of reasons, I'd like to run my kernel in SRAM but allocate data memory (i.e. socket buffers) in SDRAM. This seems possible with a NIOS 'Hello World' application, or the like, but these options aren't readily apparent when creating a kernel project in Eclipse. Is there a config file I can tweak, or other steps to be performed to accomplish putting .DATA in SDRAM? I've considered actually rewriting appropriate allocation routines in the kernel, but that feels very dangerous. Any help would be appreciated.
Thanks in advance, Ryan22 Replies
- Altera_Forum
Honored Contributor
<div class='quotetop'>QUOTE </div>
--- Quote Start --- 2) I get Perror: Bad Address when I try to send an SDRAM buffer over a TCP socket, regardless of the size of the buffer. Googling for this perror I see that it's caused by an 'invalid address'.[/b] --- Quote End --- In (the unlikely) case anyone has this same problem, I was able to remedy this situation by editing 'access_ok()' in 'include/asm-nios2nommu/uaccess.h' to allow addresses in SDRAM. Out of the box, the function checks that the given address is between nasys_program_mem and nasys_program_mem_end. My SDRAM is not in this range. YMMV. Ryan Quantapoint - Altera_Forum
Honored Contributor
good work! I also missed this when I tried it.