Skip to contentSkip to conversation

ppc boot entry point

DISCUSSION Dave B. Sharp 4 participants 4 messages Oct 3, 2005

lore
Share & tools
lore
#0 lore raw

Hey there,
Can anyone tell me how to find te entry point (i.e. address) into the kernel, when control is passed from the boot loader?
Where are the arguements such as the boot parameters. I am compiling for a generic ppc kernel at this point.
Cheers
Dave Sharp

__________________________________________________________
Find your next car at http://autos.yahoo.ca

#1 lore raw
Quoted 4 lines · Dave B. Sharp

Hey there,
Can anyone tell me how to find te entry point (i.e. address) into the kernel, when control is passed from the boot loader?

Look at System.map. phys_startup_32 and startup_32. The former is the physical (bus) address where it must be loaded, the latter is the virtual address after it starts.

Quoted 5 lines

Where are the arguements such as the boot parameters. I am compiling for a generic ppc kernel at this point.
Cheers
Dave Sharp

Look at address, boot_params, also shown in System.map. That's where they end up being relocated.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13 on an i686 machine (5589.55 BogoMips). Warning : 98.36% of all statistics are fiction.

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

#2 lore raw
In reply to Dave B. Sharp
Quoted 6 lines · Dave B. Sharp

Hey there,
Can anyone tell me how to find te entry point (i.e. address) into the kernel, when control is passed from the boot loader?
Where are the arguements such as the boot parameters. I am compiling for a generic ppc kernel at this point.

This is PowerPC specific stuff. Setting aside pmac's, and boards which use U-Boot, and other boards with a firmware that sets up the environment directly for the vmlinux file (which is the kernel proper) to run, the code under arch/ppc/boot/simple/ is typically run. This code is linked to run at 8mb and will relocate itself there, regardless of where the firmware actually loaded it into memory. This linked address may be changed by enabling the ADVANCED_OPTIONS option and choosing an alternate address. This really only makes sense on machines where loading at 8mb won't work as you have 8mb or less of memory.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#3 lore raw
Quoted 10 lines · Tom Rini
Quoted 6 lines · Dave B. Sharp

Hey there,
Can anyone tell me how to find te entry point (i.e. address) into the kernel, when control is passed from the boot loader?
Where are the arguements such as the boot parameters. I am compiling for a generic ppc kernel at this point.

This is PowerPC specific stuff.

Yes, it is. In addition to your comments, Tom, it's worth looking in the corresponding head.S, head_4xx.S or whatever files to see that the kernel is called much like a regular function with arguments in registers r3 upwards. You'll find most of what you want to know by going through from early_init onwards.

Jon.