Open Firmware

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

Open Firmware is an IEEE 1275-1994 standard for hardware independent firmware built on top of a Forth machine. Open Firmware was initially used on early SPARCstations under the name OpenBoot but was later popularized by PowerPC Macs. Despite the demise of that platform in favor of the x86 and ARM-based Macs, Open Firmware sees continued use with the OpenBIOS project as an optional firmware payload. Open Firmware was designed to be modular and noticeably easier to port to new architectures compared to other options such as legacy BIOS or UEFI firmware.

Of note, Open Firmware was the system firmware of choice for the ill-fated OLPC XO-1 laptop project. This might have proved Open Firmware's swan song were it not for the efforts of the OpenBIOS community which continues the firmware's development. Largely as a result of their efforts, Open Firmware remains a reasonably common payload for the system initializer Coreboot, allowing anyone to deploy OpenBIOS implementation of Open Firmware on Coreboot supported hardware. Today it is most commonly encountered "in the wild" on very high security workstations and servers. It is also relatively popular as a payload for the Raspberry Pi Pico RP2040.

Accessing Open Firmware

  • On a New World Mac at boot time, Open Firmware's Forth prompt can be accessed Option+Command+O+F.
  • On a SPARC system with OpenBoot (Open Firmware) at boot time, the Forth prompt can be accessed via Stop+a.
  • On an OLPC at boot time, when the chime sounds hit Esc but do not hold it down.
  • Alternatively, on a running OLPC system type echo y > /proc/sysrq-trigger.

Using the Forth Interpreter

The Forth interpreter prompt should closely resemble:

ok
0 >

Most recent Open Firmware implementations implement a line-editor with Emacs-like keybindings. This is an optional feature that the PPC-era Macs popularized and its presence is still common.

Keyboard Shortcut Function
Control+Space Word completion.
Control+/ Display all possible completed words.
Control+A Move cursor to start of line.
Esc+B Move the cursor backwards one character.
Control+D Delete the character at the current cursor position.
Esc+D Delete all characters from the current cursor position to the end of the current word.
Control+E Go to end of line.
Control+F Advance the cursor one character.
Esc+F Advance the cursor one word.
Control+H Delete the previous character.
Esc+H Delete all characters before the current cursor position out to the beginning of the word.
Control+K Delete the contents of the current line.
Control+L Display command-line history.
Control+N Advance the cursor to the next line.
Control+P Move the cursor back one line.
Control+U Delete the entire line.
Control+Y Insert the contents of the copy/paste buffer into the current line.

See Also

  • Coreboot — a free and opensource hardware initializing firmware which supports multiple boot ROM payloads.
  • BIOS — the standard firmware of IBM-PC-compatible computers until it was phased out in 2020.
  • UEFI — a firmware standard for boot ROM designed to provide a stable API for interacting with system hardware. On x86 it replaced the legacy BIOS.
  • Forth — a heavily stack-oriented self-compiling procedural programming language that is only slightly more abstract than assembly.

External Resources

Open Firmware Distributions