From f0fcefc5ebd5095deb15d3d3df162b561b3f7854 Mon Sep 17 00:00:00 2001 From: Eric-Paul Ickhorn Date: Sat, 17 Aug 2024 19:01:28 +0200 Subject: [PATCH] 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. --- i386/folder-structure.md | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 i386/folder-structure.md diff --git a/i386/folder-structure.md b/i386/folder-structure.md new file mode 100644 index 0000000..cca1e50 --- /dev/null +++ b/i386/folder-structure.md @@ -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/)