Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using BIOS calls doesn't seem to be really "bare metal". One could use bios interrupt to read data from a disk, or also one could use memory mapping with a target device to write a device driver that could request the file. I find the second case a "bare metal" approach.

Fortunately most of the bios examples are using bios_* filenames. Rest of the files are very nice.



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.


Okay I've sent you a pull request with a bare metal hello world example ;)


One could follow this "toward the bare metal" way as long as he wish. E.g. in Silego GreenPAK chips a CPU is considered unneeded abstraction and you program the raw state machine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: