[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Kernel BRAM usage
Hi Falk,
Brettschneider Falk wrote:
Super feature! :-)
Since we use parts of the BRAM also in our user app, I need to setup 2 "partitions", one for Linux and one for the user app. Is there a way to get to know how much BRAM the kernel uses, if I check some of the menu items on/off?
There's a couple of things you can do here.
In the MSS file you should be able to override the LMB memory size and
offset
BEGIN OS
..
PARAMTER LMB_MEMORY_SIZE = ...
PARAMETER LMB_MEMORY_OFFSET = ...
END
Via autoconfig / Kconfig.auto this will modify the kernel's perspective
on how much BRAM there is. If you set these up to create a region that
is disjoint from your app's usage, you should be fine. Note if you look
at the modified kernel link script vmlinux.ld.S, and the pingping_bram()
function in kernel/setup.c, you'll see that we have an 0x100 byte offset
already - this is to skip past the interrupt vectors etc. So, you'll
"waste" 256 bytes if you move the offset to anywhere other than zero.
This could probably be made a bit smarter.
After kernel build you can look at linux-2.6.x/System.map, and see the
addresses at which various symbols have been placed. BRAM-based code
and data will appear first at low addresses, so you can see roughly how
much has been used.
Trial and error should determine approximate BRAM usage figures for each
of the "standard" options - these could easily be added to the
menuconfig help to give a guide. Any volunteers to gather the data? :)
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/