MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / start

Function start

src/init.rs:15–98  ·  view source on GitHub ↗

The start function, which is the main function of the init module

(bootinfo: &'static BootInfo)

Source from the content-addressed store, hash-verified

13
14// The start function, which is the main function of the init module
15pub fn start(bootinfo: &'static BootInfo)
16{
17 /* INITIALIZATION PROCESS
18
19 LibertyOS has a simple initialization process. One by one, the
20 critical functions (needed by the kernel) are initialized, with
21 the order of initialization being dependent on required features
22 for each component, respectively.
23
24 Prior to initializing a component, a line is written to the screen,
25 detailing the process.
26
27 */
28
29
30 // Initialize VGA
31 println!("[INFO] INITIALIZING VGA");
32 crate::graphics::vga::init();
33
34 // Initialize GDT (global descriptor table)
35 println!("[INFO] INITIALIZING GDT");
36 crate::sys::gdt::init();
37
38 // Initialize the IDT (interrupt descriptor table)
39 println!("[INFO] INITIALIZING IDT");
40 crate::sys::idt::init();
41
42 // Initialize the PIC module, enable interrupts
43 println!("[INFO] INITIALIZING PIC");
44 crate::pic::init();
45
46 // Initialize serial input/output
47 println!("[INFO] INITIALIZING SER");
48 crate::ser::init();
49
50 // Initialize keyboard support
51 println!("[INFO] INITIALIZING KEYBOARD SUPPORT");
52 crate::dev::kbd::init();
53
54 // Initialize time-keeping
55 println!("[INFO] INITIALIZING TIME MANAGEMENT");
56 crate::time::init();
57
58 // Initialize basic memory management functions
59 println!("[INFO] INITIALIZING MEMORY MANAGEMENT");
60 crate::mem::init(bootinfo);
61
62
63 // Initialize logger
64// println!("[INFO] INITIALIZING LOGGER");
65// crate::sys::log::init();
66
67
68 // Initialize CPU module
69 println!("[INFO] INITIALIZING CPU MODULE");
70 crate::sys::cpu::init();
71
72 // Initialize PCI support

Callers 1

kernel_mainFunction · 0.85

Calls 1

initFunction · 0.70

Tested by

no test coverage detected