17 comments

[ 4.0 ms ] story [ 39.6 ms ] thread
I really like this idea but can anyone please summarize what it does for me. To me it feels very fascinating (bare metal golang in general) but I am not sure I truly understand its usecase and I would love to know more.
There aren't that many UEFI shells and the ones that exist are certainly not modern. Anything new is helpful, especially if its written in a popular language like Go.
When you turn on a computer, it transfers code to software required to get the machine up and running reliably--the boot process. That used start in a chip called the BIOS. It's a 40-year old holdover from the early days of the IBM PC. UEFI is a more complex and feature-rich protocol. Due to its default memory management Go hasn't been considered the first choice for such purposes but this proof of concept uses Go for the very low level code needed for UEFI.
“Due to its garbage collection” you mean. There’s nothing stopping you from writing go for bare metal, only your pride.
Was trying to be concise. Also, stop accusing me of having any pride. I'm married and a father!
GC has never been an impediment for Xerox PARC.
There’s some more context in a proposal from the folks behind this project to upstream the needed Go runtime hooks into Go proper.

From what I can tell, the core Go team seems generally favorable to it, so seems like a decent chance it will happen.

From:

#73608 proposal: all: add bare metal support

https://github.com/golang/go/issues/73608

> Go applications built with GOOS=none would run on bare metal, without any underlying OS. All required support is provided by the Go runtime and external driver packages, also written in Go.

And:

> These hooks act as a "Rosetta Stone" for integration of a freestanding Go runtime within an arbitrary environment, whether bare metal or OS supported.

> Go-boot: bare metal Go UEFI boot manager

The bare metal list is quiet thin.

Why is so HW focused ? I use refind and it seems to be HW independent.

That's the list of hardware they've explicitly tested on. Always bear in mind that, for any given standard, no matter how straightforward, there are going to be dozens of vendors who screw it up for no real reason other than incompetence or malice.

The older a piece of software is, the more workarounds it will have accrued for various hardware bugs or vendor misdeeds, so it's reasonable for the project to disclaim that it's only been tested on a small number of physical hardware devices even if, in theory, it should work out of the box on all of them.

As much as I appreciate Go, putting it on bare metal makes me cringe a little.
Why? Xerox PARC used to do this.

As did all machines that booted into a Lisp or BASIC REPL.

missed chance to name it Goo-Boot
The TamaGo project (which this uses for running on bare metal) looks super impressive! Kudos to the authors for getting this working.

I wonder what GC changes had to be made, if any.

I wonder if it supports multiprocessing.

I'm confused, is it bare metal or is it an EFI application? (bare metal used to mean that something can run without services, like those that UEFI provides)