TEXT section in RAM - how?

Craig Graham craig at data-uncertain.co.uk
Thu Apr 5 10:38:22 UTC 2001


On Wednesday 04 April 2001 21:03, Sturniolo Jose wrote:
> Hi Ilya,
> 	I have a linkcmds and c code that allow to do the following:
> - De-compresion of Text and Data area, after the first DRAM, SRAM registers
> configuration
> - No Copy of Text,Data area, because the de-compresor work from ROM to RAM
> directly.
> - The compression method is GZIP (the code was borrowed from LINUX kernel)
>
> This method was used because I need a large ROM capacity. It has a
> "negative effect", that is the neccesary time to decompress the kernel,
> about 15 seconds (with a 25MHZ processor) in each boot.

Depending on your system architecture, you might find that it's actually 
quicker to copy the gzipped image to DRAM before you unpack it - we found 
this using a gzip'ed boot loader on our own system - copying the gzip'ed 
image to RAM before unpacking was around 3x faster than unpacking direct from 
the ROM's. 

I'm thinking it's 'coz gzip will do multiple single byte reads from the ROM - 
worst case you have approx N accesses to the ROM for an N byte file , whereas 
doing a full word width copy from ROM to RAM does the minimum number of 
accesses (N/4 for an N byte file on a 32bit CPU with 32bit ROM's).

> Regards, José.

Craig.



More information about the users mailing list