[EMAIL PROTECTED] writes:

> I currenlty need to load things into SDRAM from a paged flash that is
> larger than the 1Meg window available.  To survive this, I currently
> put a copy of linuxbios at the top of every page.
> 
> This is annoying because it wastes flash space and I have to break up
> large blocks of data into 960K chunks, putting one chunk on each page
> with the copy of linuxbios.
> 
> It seems it would be better to be executing code from SDRAM when this
> accessing the other pages of the flash.  
> 
> I see two options:
> 
> - Copy the functions the are needed into SDRAM
> - Copy all of Linuxbios into SDRAM and run all of it from there.

Use option 2.

> Questions:
> 
> - What will bite me if I try the second option?  The only absolute jump
>   that I know about is when switching to protected mode.  
> - How relocatable is the code?  
> - What about references to static contants?
> - Do I need to create a special linker segment for this?
> - Should I compile linuxbios to be located someplace else from the start
>   and copy it there before doing much of anything?

Mostly what needs to be done is:
Hack the initial assembly so it does the copy.
Use:
biosbase & rambase
in the config language to tell where you have put the linuxbios.
biosbase is where the read only code goes.
rambase is where in ram the writeable data goes.

They are broken in the main tree (no one used them appearently) but I
fixed them in my copy.  I also reduced the number of options dealing
with ram as it was pretty much a mess.


> I'm sure I can figure this out, but I suspect that someone on this list
> already knows all the answers. ;-)  Doesn't the DoC stuff already deal
> with this sort of problem?

Yes.  As does the alpha as I can't read directly out of rom.

Eric

Reply via email to