[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] How to restrict kernel from using upper range of SDRAM?
Hi Tom,
Curran, Tom wrote:
I have a customer that has a uCLinux system running on their Spartan 3E
1200E based platform with 32M SDRAM. The RAM interface is handled by
"MCH OPB Synchronous DRAM (SDRAM) Controller (v1.00a)" mapped with
address area 0x8000_0000 till 0x81FF_FFFF. It will boot from SPI flash
and image.bin is loaded to the ram at start up. It all seem to work fine
but they have build the MCH IP to interface to the SDRAM as storage and
they would like to reserve 2M SDRAM for this.
The question is how they can prevent uCLinux in using this address space
in the RAM?
Is there a configuration file somewhere that they can use to define that
for software system the RAM area ends at address 0x81DF_FFFF and that
the address space 0x81E0_0000 till 0x81FF_FFFF is reserved for other
use?
The simplest way to do it is to use the MAIN_MEMORY_SIZE (and
optionally, MAIN_MEMORY_OFFSET) parameters in the MSS file, like this:
BEGIN OS
..
PARAMETER C_MAIN_MEMORY=DDR_SDRAM
PARAMETER C_MAIN_MEMORY_BANK=0
PARAMETER C_MAIN_MEMORY_SIZE=0x1000000
PARAMETER C_MAIN_MEMORY_OFFSET=0x3000
...
END
This will use the named memory controller for main memory, but Linux
will use a region of size 0x100000, with offset 0x3000 from the base
address. Tweak these values as appropriate for your memory map.
You can either manually edit the MSS file or set these in XPS via the
Software Platform Settings dialog boxes.
Of course, after this change you need to re-run
$ make -f system.make libs;
$ petalinux-copy-autoconfig
and rebuild the kernel.
Hope this helps,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/