Xyris  0.5
Loader.cpp File Reference
+ Include dependency graph for Loader.cpp:

Go to the source code of this file.

Functions

void stage2Entry (void *info, uint32_t magic)
 

Detailed Description

Bootloader agnostic pre-kernel initialization.

Author
Keeton Feavel (keeto.nosp@m.n@xy.nosp@m.r.is)
Version
0.1
Date
2021-12-15

Definition in file Loader.cpp.

Function Documentation

◆ stage2Entry()

void stage2Entry ( void *  info,
uint32_t  magic 
)

Bootloader agnostic pre-kernel entry initialization. Stage2 should not access any bootloader information and should only perform bootloader agnostic tasks before entering the kernel proper.

Bootloader to kernel stage 2. This stage is responsible for handling any generic, catch all, preparations before calling into the kernel's main function. Stage 2 should be bootloader independent.

Definition at line 23 of file Loader.cpp.

24 {
25  // Call global constructors
26  _init();
27  // Enter the high-level kernel
28  kernelEntry(info, magic);
29  // Call global destructors
30  _fini();
31  // By this point the kernel should have full execution
32  // So, this should never be called unless the kernel returns
33  panic("Execution returned to stage2!");
34 }
kernelEntry
void kernelEntry(void *info, uint32_t magic)
Kernel entry point. Performs all kernel initialization and starts the init process(es)....
Definition: Entry.cpp:82
_init
void _init()
Global constructor.
_fini
void _fini()
Global destructor.
panic
void panic(const char *msg)
Halt the system and print the provided message on the panic screen.
Definition: Panic.cpp:82