Skip to content
/ mybios Public

From-scratch x86 BIOS implementation for legacy 386/486 hardware, with reverse-engineered chipset support

Notifications You must be signed in to change notification settings

dougvj/mybios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mybios

A from-scratch x86 BIOS implementation targeting legacy PC hardware (386/486 era), written in C and NASM assembly.

Background

This project began as an effort to revive a motherboard whose BIOS had been corrupted, with no ROM dumps available online at the time. The chipset initialization code for the UMC UM82C480 was reverse engineered by fuzzing registers in order to bring the board back to life. The project has since grown into a more general custom BIOS implementation supporting multiple chipsets and has successfully booted on some Pentium and even a Pentium Pro motherboard, albeit without full DRAM, cache controller, and bus initialization on those platforms.

Supported Chipsets

  • UMC UM82C480 - 486-era chipset (reverse engineered initialization)
  • Intel 440FX - Pentium-era PCI chipset
  • SiS 8C460 - DRAM configuration and memory detection
  • Null - Minimal stub for testing

Features

  • Complete POST (Power-On Self Test) sequence with POST codes
  • Real mode and protected mode operation with mode switching
  • BIOS interrupt services: INT 13h (disk), INT 16h (keyboard), INT 15h (extended services), INT 1Ah (time), and more
  • ATA/IDE disk driver with CHS and LBA addressing
  • PCI bus enumeration and configuration
  • Keyboard and timer (PIT 8254) interrupt handling
  • VGA option ROM initialization
  • MBR boot support
  • Serial port debug output

Building

Requires an i386 cross-compiler toolchain and NASM:

make

The default build produces a 64KB ROM image (bios.bin). Edit the Makefile to select the target chipset.

Testing

The BIOS can be tested under QEMU or Bochs:

# QEMU
./qemu.sh

# Bochs
bochs -f .bochsrc

LLM Usage

The project was completed without the use of LLMs with the exception of the documentation such as this README

License

This project is provided as-is for educational and research purposes.

About

From-scratch x86 BIOS implementation for legacy 386/486 hardware, with reverse-engineered chipset support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •