Eric-Paul Ickhorn
94e5e70305
The setup_drivers routine existed locally for some time now, so now it also exists in the repository. It has gone through two iterations: 1. The drivers are all listed in a null-terminated array of function pointers to initialization functions (this didn't work and the time for debugging just wasn't there). 2. All drivers (currently, only the PCI driver, because that's the only one that exists) are initialized after each other; their initialization functions are called manually. It might be possible that the bug from the first iteration was due to the memory space being offset by 128 or 256 bytes; it might be useful to use that concept again because then, it will be easier to add new drivers. That's not of high importance now, though. |
||
---|---|---|
.. | ||
src-asm | ||
README.md | ||
build.bash |
README.md
loader
| Nightloader Code Partition
The partition of which the creation code is contained in this directory isn't formatted in any particular way; the partition which is created using this source code contains the instructions and data for giving control over to the next stage. More on the features of the loader can be found here
Features
The loader partition has to perform the following tasks:
- Perform the general setup
- Setup a bigger stack
- Enable the A20 address line
- Enter 32-bit mode (Protected Mode)
- Setup Paging
- Enable the built-in drivers
- Load additional addons
- Find partitions accessible with the existing drivers
- Check the path
/bin/nightloader/
for addons - Load and start those addons
- If any more filesystem drivers were found, repeat the last three steps
- Choose the appropriate action of the three following ones:
- If no operating system was found,
- Send an error to any output
- Halt execution after 30 seconds
- If an operating system was found and there is no
addon to take control
- Display all options onto the screen and let the user choose which operating system to start
- If an operating system was found and there is an
addon which takes the control
- Give the control to that addon and let it handle the task of finding out what to do
- If no operating system was found,
- Execute the action chosen by the user in the last step