Repository navigation
Bootloaders x86 bootloader
Teaching-scale x86 bootloader.
| Type | OS bootloader (type2) |
| Upstream | https://github.com/lukearend/x86-bootloader |
| CVEs attributed | 0 |
| Vulnerability-fixing commits | 0 naming a CVE, 0 keyword-matched |
| CVEs with a linked fix | 0 |
A minimal MBR loader demonstrating the real-mode to protected-mode transition.
Type 2: it starts after BIOS and loads a kernel.
See Boot-Stages for the eight-stage model these phases map onto.
- boot sector -- 512 bytes loaded by BIOS to 0x7C00, ending in the 0xAA55 signature.
- disk read -- Uses INT 0x13 to read the rest of the loader and the kernel off the disk.
- GDT and A20 -- Sets up a flat global descriptor table and enables the A20 line.
- protected mode -- Sets the PE bit in CR0 and far-jumps to flush the pipeline into 32-bit code.
- kernel entry -- Calls into the C kernel it loaded.
This is a teaching implementation, so the mechanisms are the bare ones: BIOS interrupts for disk and screen while still in real mode, and fixed load addresses agreed between the assembly stub and the linker script. There is no configuration file and no negotiated structure -- the contract between stages is the memory map written in the source.
The kernel is entered by a direct call once protected mode is on. Its value in this corpus is that the whole Type 2 skeleton -- sector load, mode switch, jump -- is small enough to read in one sitting, which makes it useful for teaching the shape that the production loaders elaborate on.
None detected. That means no matching pattern was found in its build configuration or source, not that the project is insecure -- a small MCU bootloader may simply have nothing to configure.
git -C oss-bootloaders submodule update --init type2/x86-bootloader
./scripts/analysis/run-tool.sh codeql x86-bootloaderSee Tools for what each tool applies to.
Home · OS bootloader · Tools