7

I’m looking for an open source software like Virtual-box that I can run on Linux but gives the possibility to program the BIOS (use a personal BIOS program).

I want to understand (in a practical way) the process of computer boot up and have a deeper manipulation of the x86 real mode. I also want to understand the different mechanisms to communicate with the peripherals, i.e. controlling devices like the keyboard and the hard drive, and understand I/O modes and interrupts.

3
  • 2
    Programming your own BIOS will not allow a deeper manipulation of real mode, nor will be particularly helpful in understanding the mechanisms of communicating with peripherals. It won't even provide a complete understanding how real computers boot up unless you actually write a BIOS for a real computer. There's a lot of things a BIOS doesn't need to do on a virtual PC that a BIOS does need to do on a real PC.
    – Ross Ridge
    Feb 4, 2017 at 2:56
  • The source code of SeaBIOS (legacy) and edk2 (UEFI) are available. Have fun! Feb 4, 2017 at 5:48
  • You might be interested in Software Recommendations; if this question wasn't on-topic here it would probably be migrated there.
    – wizzwizz4
    Feb 4, 2017 at 9:24

1 Answer 1

15

There are several virtual machine emulators that can emulate an x86 processor and peripherals. Each comes with a BIOS, several of them with an open-source BIOS. You should look at QEMU, which operates completely independently of the host (it can run on any machine, though it has mechanisms to run faster if the emulated machine is the same architecture as the host). QEMU comes with PC-BIOS.

If you want to work in x86 real mode, you can also take a look at Dosbox.

Coreboot should also be of interest to you. It's an open source BIOS for x86.

Looking at a BIOS will give you some insights on how an x86 processor boots, including all the quirks inherited from 30+ years of history with significant evolution in hardware capabilities. It isn't the best thing to look at if what you want to understand is how to communicate with peripherals. For that, look at the device drivers in an operating system kernel — either Linux, or simpler ones such as MINIX 3.

I would also recommend taking a look at other CPU architectures such as ARM and MIPS, so that you get an idea of what's common in OS/hardware interactions and what's specific to the PC architecture.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.