Re: what is the functionality of kernelrelocate() of eboot code?
- From: daniel <daniel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Aug 2007 09:42:12 -0700
I seems to be still misunderstanding...
Isn't the bootloader moved from rom to ram in order to be run after power on?
Then isn't the bootloader at ram space?
why the relocation should be needed for ram based boot code and global
variables?
"Bruce Eitman [eMVP]" wrote:
..bin/.nb0 doesn't mater, either way it gets put into flash before booting..
The bootloader isn't being run from an OS that does this automatically for
it, so it must do it.
Why are you asking?
--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
"daniel" <daniel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C8418215-E73A-484C-91B6-2431C71F5779@xxxxxxxxxxxxxxxx
Hi Manoj,
Thank you for your instant kind reply.
then, let me check again my understanding to your reply.
The current bootloader code is located at flash rom because its format is
nb0.
But all global variables defined at the bootloader src code are located at
ram.
So the bootloader can't reference that symbols. And so the relocation
should
be needed. Right?
and then I got another question again.
how about bin format boot code? At that case, the relocation should be
needed?
Please let me know more.
"Manoj" wrote:
On 22 Aug, 17:22, daniel <dan...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi, all?
A question is arised to me what purpose of the kernelrelocate()
function is.
From the bootloadermain() the kernelrelocate() is located at the first
position.
Somebody say it is for relocating the global symbos of nk.bin to main
memory.
Is it right? As I known, after downloading the nk.bin is completed the
whole
control is hand over the kernel. The bootloader is useless since that
time.
If so, the kernelrelocate can't be used for relocating the global
symbols of
kernel to memory.
What in the world is the role of the function?
Anybody can clear this question?
Hi Daniel,
First of all,i am not a guru.. But i am ready to share
knowledge and i hope if it is wrong or partial,veterans will correct
it..
Here we go,
Because the ROM image in the .nb0 file may be executed from ROM
(flash
memory) the bootloader's global and static variables cannot in general
be
in the same memory area as the code, so Romimage.exe moves the .data
section it finds in the .exe file to a new location in the .nb0 file.
KernelRelocate copies the .data section from ROM into RAM at runtime,
putting it at the RAM address specified in bootloader BIB file
(boot.bib). Any code that needs to access global variables can
determine where they are by looking at the contents of a
structure pointed at by the global pointer pTOC.
Hope u unterstood...
- Follow-Ups:
- Re: what is the functionality of kernelrelocate() of eboot code?
- From: Bruce Eitman [eMVP]
- Re: what is the functionality of kernelrelocate() of eboot code?
- From: Dean Ramsier
- Re: what is the functionality of kernelrelocate() of eboot code?
- References:
- Re: what is the functionality of kernelrelocate() of eboot code?
- From: Manoj
- Re: what is the functionality of kernelrelocate() of eboot code?
- From: Bruce Eitman [eMVP]
- Re: what is the functionality of kernelrelocate() of eboot code?
- Prev by Date: Re: Error in Makeimg stage: Registry file parser error
- Next by Date: Re: what is the functionality of kernelrelocate() of eboot code?
- Previous by thread: Re: what is the functionality of kernelrelocate() of eboot code?
- Next by thread: Re: what is the functionality of kernelrelocate() of eboot code?
- Index(es):
Relevant Pages
|