Add folder structure documentation for i386

As the project grows, it's a good idea to have an overview of the
project as a big picture. The newly added file will provide that big
picture for when the project is too big to read through for making a
small change. It contains unimplemented things in the described
folder structure (AHCI) as well as a documentation folder, which also
doesn't exist yet.
This commit is contained in:
Eric-Paul Ickhorn 2024-08-17 19:01:28 +02:00
parent c249510163
commit f0fcefc5eb
Signed by: epickh
GPG Key ID: 1358818BAA38B104
1 changed files with 45 additions and 0 deletions

45
i386/folder-structure.md Normal file
View File

@ -0,0 +1,45 @@
# 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/)