Aryeh Friedman wrote:
On 11/24/07, Attilio Rao <[EMAIL PROTECTED]> wrote:
2007/11/24, Aryeh Friedman <[EMAIL PROTECTED]>:
Where do I find the main() [and/or other entery point] for the
kernel.... I tend to understand stuff better if I follow the flow of
exec from the start
It is highly MD.
For IA32 it is in i386/i386/locore.s::btext
For AMD64 I assume something close to that...
I just relized that I actually want to understand everything from POST
on (actually from power on but I know that is very mobo dependant) so
I guess the question is where do I find the first executed statement
for BTX (I know how to disamble the MBR so that part is not an issue)
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
As Attilio said:
for the kernel, execution starts (for the x86) in
/usr/src/sys/i386/i386/locore.s
at around line 205.
look for:
/**********************************************************************
*
* This is where the bootblocks start us, set the ball rolling...
*
*/
NON_GPROF_ENTRY(btext)
it then skips to sys/kern/init_main.c (mi_startup) (from memory)
and that jumps back to machdep.c (cpu_startup())
I suggest of course that you also read the bootblocks.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"