News for hackers. Stuff that matters.
Re:x86 Bare Metal Examples by z3t4 on Tuesday March 19, 2019 @04:22AM (#19428990)
A dream I've had for a long time is to make an application that you boot into, which is the only application on the computer, for maximum optimization. Upgrades would be easy, just reboot the computer and load the new software. Wouln't write everything in assembly though.
Re:x86 Bare Metal Examples by teddyh on Tuesday March 19, 2019 @04:42AM (#19429069)
What you describe used to be very common: https://en.wikipedia.org/wiki/PC_booter
Re:x86 Bare Metal Examples by OskarS on Tuesday March 19, 2019 @05:30AM (#19429283)
The problem comes when you need to use any kind of hardware, all the drivers would have to be part of your app. The "unikernel" concept however does some version of this: loads a kernel which only supports the minimal amount of functionality and drivers needed and with only a single address space for a single app.
Re:x86 Bare Metal Examples by 0xcde4c3db on Tuesday March 19, 2019 @10:07AM (#19430896)
Historically this was more tractable because driver code was much simpler and there was a lot of cloning/emulation of "legacy" hardware interfaces (a lot of this is still present on PC, despite vendors' desire to get rid of it). Typically either the hardware capabilities were fundamentally narrower in scope than modern hardware or the hardware had its own controller (sometimes with more raw power than the host CPU...) that implemented an abstract interface. A bare-metal VGA driver for a single mode is no more than a few dozen lines of code, whereas a modern GPU driver stack literally has an optimizing compiler built into it.
Re:x86 Bare Metal Examples by rramadass on Tuesday March 19, 2019 @04:57AM (#19429146)
This is standard "embedded" system programming for lower-end MCUs. "Unikernels" use the same concept to create standalone bootable binaries(linked with reqd. OS modules) to run directly either on HW or on a VM Hypervisor.

See "IncludeOS" for one representative example.

Re:x86 Bare Metal Examples by cirosantilli on Tuesday March 19, 2019 @04:39AM (#19429051)
Yes, the ASM overkill was a mistake of my youth :-) https://github.com/cirosantilli/x86-bare-metal-examples/tree...
Re:x86 Bare Metal Examples by pjmlp on Tuesday March 19, 2019 @05:37AM (#19429314)
Besides what everyone is commenting on, this is how Amiga, Atari ST and most console games used to be done.
Re:x86 Bare Metal Examples by adrianN on Tuesday March 19, 2019 @04:57AM (#19429145)
So a Unikernel with your program?
Re:x86 Bare Metal Examples by Taniwha on Tuesday March 19, 2019 @05:13AM (#19429214)
you're describing any number of embedded systems, including the Arduino runtime - load up an Arduino app and you have your dream come true :-)