summaryrefslogtreecommitdiff
path: root/README.md
blob: 87e6b9349a38beb286e577a6246d9315115c1188 (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
## Disclaimer
-----------------------
For now, assumes that A20 is already enabled on your device by BIOS.

## Why Bash?
-----------------------
I like it more, and feels more customizable than makefile.
This project is not going to be permanent anyways, just some bootloader.

## Disk Mapping
-----------------------
0x0 - 0x200 -> Master Boot Record (MBR)
0x200 - 0x9ff -> Stage 1
*  -  * -> Stage 2

## Memory Mapping
-----------------------
0x7c00 - 0x7e00 -> BIOS MBR
0x7e00 - 0x9200 -> stage 1

## Stages
-----------------------
- early stage 1 (MBR)
The only duty of this stage is to load the stage 1 bootloader.

- stage 1
1. Detects available video memory, and RAM memory.
2. Switches to 32-bit execution and protected mode.

- stage 2
1. Switches to 64-bit execution (long mode).
2. Implements a FAT driver to load a kernel (or OS) file from disk.