Nightloader/i386/folder-structure.md

46 lines
1.6 KiB
Markdown

# i386 Nightloader | Folder Structure
## Legacy BIOS bootsector (bootsector/)
Contains one file, the source of the bootsector. This assembly program
must span the first 512 byte of a legacy Nightloader-booted Partition.
## Legacy BIOS Edition (legacy-boot/)
This edition of the Nightloader is made for older devices that predate
UEFI (or potentially for devices that have unreliable UEFI-support).
This folder contains the assembly sources to create the loader
partition which contains raw machine code that is loaded by the
bootsector and to which the control is handed thereafter.
### Source Folder Structure
#### drivers/
- acpi
Driver for the Avanced Control and Power Interface.
- pci
Driver for the Peripheral Component Interconnect. This is used to
first find and then interact with the builtin devices in a computer,
mostly storage devices, but also network cards, USB keyboards, etc..
- ahci
Driver for AHCI, the ATA Host Controller Interface (ATA meaning
(IBM PC) AT Attachment), storage interface. This is used to interact
with practically every modern consumer SSD and HDD. Older HDDs might
use another interface, but that's not of elevated relevance.
#### memory/
Memory Management functions, A20 line check, GDT setup and, some day
in the future, paging for add-ons execution. This also contains utils
like the allocators (arena, pool) used throughout the bootloader.
#### utility/
Helper functions that make it easier to write the other functionality
but don't fall into any of the other categories on their own.
## Documentation (docs/)