summaryrefslogtreecommitdiff
path: root/src/README
blob: 2108947af3ce9aba0d784305eca213a4777f2946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
boot
----

Simple bootloader, loading in two phases and loading the kernel itself

* boot.bin - boot sector (stage 1 and 2, total 2k), offset 0x7c00
  * boot.asm - the main boot sector code using:
* kernel.bin - linked kernel with fix start offset 0x8800
  * boot_gdt.asm - the early GDT, flat memory model, no protection
  * stage1_functions.asm - real mode functions of the bootloader (stage 1 and 2)
  * stage2_real_functions.asm - real mode functions for stage 2
  * stage2_a20.asm - various methods to enable the A20 address line
  * stage2_check_magic.asm - function to make sure the image contains a magic marker
  * stage2_switch_mode.asm - early GTD loading and switching from real to protected mode
  * stage2_pm_functions.asm - protected mode helper functions for stage 2
  * kernel.c - Kernel C entry point 'kernel_main'
* magic.bin (512 bytes magic marker sector)
  * magic.asm

kernel
------

Kernel main and utility routines like early consoles.

* kernel.c - kernel helper functions
* console.c - the kernel console, can use VGA or serial port for now
* vga.c - VGA basic output routines for early kernel output
* serial.c - serial output to COM1 (only sequential ASCII chars, no terminal)

hardware
--------

Hardware abstraction layer.

* port.c, port.asm - I/O ports
* interrupts.c, interrups.asm - interrupt handlers
* pci.c - PCI introspection and driver initialization

drivers
-------

Driver framework and specific drivers.

* driver.c - generic driver manager
* keyboard.c - PS/2 keyboard
* mouse.c - PS/2 mouse
* vga.c - standard VGA video driver

libc
----

Stub C library implementation.

C library definitions
* stddef.h - definition of NULL, size_t
* limits.h - domain range constants like INT_MAX

C library routines
* string.c - string, memory functions
* stdlib.c - UNIX standard library functions
* stdio.c - I/O functions, printing
* setjmp - setjmp/longjmp implementation (in assembly)