#include <oskit/x86/pc/base_multiboot.h>void multiboot_main(oskit_addr_t boot_info_pa);
This is the first C-language function to run, invoked by the minimal startup code fragment in multiboot.o. The default implementation merely copies the MultiBoot information structure passed by the boot loader into the global variable boot_info (see Section 10.14.7), and then calls the following routines to set up the base environment and start the OS:If the client OS does not wish some or all of the above to be performed, it may override the multiboot_main function with a version that does what it needs, or, alternatively, it may instead override the specific functions of interest called by multiboot_main.
- base_cpu_setup
- Initializes the base GDT, IDT, and TSS, so that the processor's segmentation facilities can be used and processor traps can be handled.
- base_multiboot_init_mem
- Finds all physical memory available for general use and adds it to the malloc_lmm so that OS code can allocate memory dynamically.
- base_multiboot_init_cmdline
- Performs basic preprocessing on the command line string passed by the boot loader, splitting it up into standard C argument and environment variable lists.
- main
- This call is what invokes the actual OS code, using standard C-language startup conventions.
- exit
- As per C language conventions, if the main routine ever returns, exit is called immediately, using the return value from main as the exit code.
- boot_info_pa
- The physical address of the MultiBoot information structure as created and passed by the boot loader.
This function had better never return.
- phystokv
- 10.6.2
- boot_info
- 10.14.7
- base_cpu_setup
- 10.6.3
- base_multiboot_init_mem
- 10.14.9
- base_multiboot_init_cmdline
- 10.14.10
- exit
- 9.7.1