Skip to content

Commit

Permalink
Quartz sync: Dec 28, 2024, 2:43 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
FloofyPlasma committed Dec 28, 2024
1 parent dcae74d commit 7da40ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion content/Phase 1/Boot Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ The first stage in the boot process is a power on self test. This is the process

The BIOS then checks the bootable devices for the boot signature magic number. This is located in the first sector which has the byte sequence `0x55AA` at byte offsets 510 and 511. If the BIOS finds this boot sector, it loads it into memory. After its loaded, execution is then transferred to the boot record. On a floppy (which this system is intended to be run from at this current time) all 512 bytes can contain the executable code.

Once the bootloader is loaded, it finds and loads the kernel into memory, and passes control to it.
Once the [[Bootloader|bootloader]] is loaded, it finds and loads the kernel into memory, and passes control to it.

14 changes: 7 additions & 7 deletions content/Phase 1/Bootloader.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ The bootloader has several steps before its completed:

The bootloader process will be divided into stages, and each stage will have specific responsibilities. Here's a rough outline of my bootloader's structure:

##### **Stage 1: Master Boot Record (MBR)**
##### **Stage 1: Master Boot Record (MBR)**

The MBR will be contained within the first 512 bytes of the disk.

- Responsibilities of the MBR:
- The BIOS will load the first 512 bytes into memory at address `0x7C00` after the [[Boot Process|boot process]] is completed.
- The Stage 1 bootloader's primary job is to load the second-stage bootloader from the disk into memory.
- Basic hardware initialization will be performed using [[BIOS Interrupts|BIOS interrupts]] (putting the display into text mode).
- A simple message will be displayed, something like "Loading Stage 1..."
- We will then load the second stage bootloader (placed in sector 2) into memory.
- Once we load the second stage, we will transfer control to it by executing a jump into its memory location.
- The BIOS will load the first 512 bytes into memory at address `0x7C00` after the [[Boot Process|boot process]] is completed.
- The Stage 1 bootloader's primary job is to load the second-stage bootloader from the disk into memory.
- Basic hardware initialization will be performed using [[BIOS Interrupts|BIOS interrupts]] (putting the display into text mode). ❌ (Not enough space)
- A simple message will be displayed, something like "Loading Stage 1..."
- We will then load the second stage bootloader (placed in sector 2) into memory.
- Once we load the second stage, we will transfer control to it by executing a jump into its memory location.

To summarize, the BIOS will load our MBR into `0x7C00`. Then we will want to load Stage 2 of our bootloader from disk. A basic message will be printed to the screen, and we will jump to Stage 2.

Expand Down

0 comments on commit 7da40ad

Please sign in to comment.