After the MultiBoot boot loader loads the kernel executable image, it searches through the beginning of the image for the MultiBoot header which provides important information about the OS being loaded. The boot loader performs its activities, then shuts itself down and jumps to the OS kernel entrypoint defined in the kernel's MultiBoot header. In one processor register the boot loader passes to the kernel the address of a MultiBoot information structure, containing various information passed from the boot loader to the OS, organized in a standardized format defined by the MultiBoot specification.
In the OSKit's MultiBoot startup code,
the kernel entrypoint is a short code fragment in multiboot.o
which sets up the initial stack and performs other minimal initialization
so that ordinary 32-bit C code can be run safely.
This code fragment then calls the C function multiboot_main,
with a pointer to the MultiBoot information structure as its argument.
Normally, the multiboot_main function comes from libkern.a;
it performs other high-level initialization
to create a convenient, stable 32-bit environment,
and then calls the familiar main routine,
which the client OS must provide.