Forum Discussion
Altera_Forum
Honored Contributor
21 years agoThanks for the response Wentao,
<div class='quotetop'>QUOTE </div> --- Quote Start --- If my understanding is right, you want to put kernel image (text, data and bss) in sram, while make the entire sdram system memory[/b] --- Quote End --- No, this is not quite what I'm going for. Let me explain further. Currently, I have 16MB of onboard SRAM and up to 1GB of SDRAM. My entire kernel and user-level code runs completely in SRAM at the moment. I can explicitly address and store data in SDRAM from my code (but all OS-allocated memory is in SRAM). Basically, the problem here is that I want to be able to DMA data directly from SDRAM to ethernet; with my current setup, this cannot be done, because all kernel data structures are allocated in SRAM. So, calling a socket send() with an SDRAM buffer results in a copy from SDRAM to the SRAM socket buffer. I _think_ this can be mitigated by moving the kernel .DATA and .BSS segments to SDRAM. Another option is to modify the kernel to allocate socket buffers in SDRAM, but I forsee problems with this. I can edit the kernel linker script to put .DATA and .BSS in sdram. But, my SDRAM sits at 0x0 to 0x3FFFFFFF, with SRAM beginning at 0x40000000. I'm guessing this is a problem as well, as my kernel linked this way will not boot. Hope this makes more sense. Ryan