Re:x86 Bare Metal Examples
by cirosantilli on Tuesday March 19, 2019 @05:10AM
(#19429197)
Yes, here we go again: https://news.ycombinator.com/item?id=18532102 :-)
I wonder how much lower level you can go with QEMU / how much it can match real hardware.
Pull requests / links welcome ;-)
QEMU runs the 'seabios' bios image in the guest, so you could certainly run a 'bare metal' custom image instead of the default BIOS blob if you wanted. At the basic level of "prod the UART, prod the timers" we should be a reasonable match to real hardware. Running on real hardware without the BIOS would be trickier as you start to need to do things like set up memory controllers, which you can get away without on QEMU.
Re:x86 Bare Metal Examples
by self_awareness on Tuesday March 19, 2019 @08:49AM
(#19430233)
Okay I've sent you a pull request with a bare metal hello world example ;)
Fortunately most of the bios examples are using bios_* filenames. Rest of the files are very nice.