Multiprocessing bootup sequence for BSP

gregory.menke at gsfc.nasa.gov gregory.menke at gsfc.nasa.gov
Thu Apr 10 15:47:08 UTC 2003


John Phillips writes:
 > 
 >   I'm trying to put together a BSP for a cpu which has many MIPS cores 
 > connected via a fully coherent memory system, and I guess I'm fishing for 
 > ideas about how to structure my memory map and bootup sequence.  The problem 
 > is that, with one RTEMS memory image, the processors executing the code will 
 > overwrite each other's bss sections, etc.  However, having a single RTEMS 
 > image for each processor seems wasteful, as the cpus could and should share 
 > one text section.  Also, at bootup I'd certainly like to have only one copy 
 > of the RTEMS image in ROM, from which I'd like to derive all of the images 
 > which all of the cpus use.  Any suggestions?

That sounds like a nifty project.  The mips memory map is fairly
traditional, so I think it shouldnt' be too much trouble to at least
move .data and .bss to whatever arbitrary addresses you want.  The
ordering of sections within .data and .bss is important, so they
should move as a block.

I think you would want to only share .text.  If possible, I think the
easiest approach would be to use processor-local memory for the .data
and .bss.  If thats not available and you can't use TLB's to create
something analagous, I think the only other approach will have to be
multiple images.  All the symbol references for .bss and .data refer
to absolute addresses (excluding gp relative of course- but its still
relative to the absolute gp anyhow).

As far as bootup goes, its also simple on MIPS.  On the Mongoose (and
jmr also?) the bootloader is a little location independent routine
that copies the binary image (objcopy'ed from the ELF executable to a
simple binary file) from its eprom'ed location to the addresses it is
linked to execute from.  Once the image is copied, the bootloader
jumps to the start.  I think this is probably not what you want, but
its easy to modify the algorithm- its in start.S.  Once the image
starts up, it does the conventional things; configuring cpu, clearing
.bss, configuring hardware, etc...

Gregm




More information about the users mailing list