Re: need help physical memory eboot

From: Steve Maillet \(eMVP\) (nospam1_at_EntelechyConsulting.com)
Date: 12/29/04


Date: Wed, 29 Dec 2004 10:00:58 -0500

There are a few things to consider when shifting between virtual and
physical addresses in a boot loader.
1) when reading the addresses of records in the BIN file they ___MAY___
need to be translated (see #2 for more details) from a virtual address to a
physical one in the boot loader. translating in the boot loader is not
usually a good idea as it means any changes in virtual mapping requires
changing the boot loader and is easy to forget or get wrong.

2) ROMOFFSET setting effects the BIN file record addresses used by the boot
loader. To prevent the need for modifying the boot loader for any changes
in mapping you specify a ROMOFFSET in the Config.bib file that is added to
all virtual addresses to get the physical address used for that address.
When PB generates the BIN file it will create the BIN file records marked
with the address of each record as ( record Address = Virtual Address +
ROMOFFSET) using unsigned math and "roll over" allows you to have a BIN file
with all the addresses marked as physical addresses for the bootloader. If
you want the boot loader to use virtual addresses then ROMOFFSET should be
0. This is still another item you could get wrong but it's in the config.bib
file for the OS image, which needs adjustment upon any changes to the memory
location of the OS.

-- 
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com