Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

uClinux .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,

Ryan

22 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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&#39;s caused by an &#39;invalid address&#39;.[/b]

    --- Quote End ---

    In (the unlikely) case anyone has this same problem, I was able to remedy this situation by editing &#39;access_ok()&#39; in &#39;include/asm-nios2nommu/uaccess.h&#39; 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