Open Firmware is a standard defining the interfaces of a computer firmware system, formerly endorsed by the Institute of Electrical and Electronics Engineers (IEEE). It originated at Sun Microsystems, where it was known as OpenBoot, and has been used by vendors including Sun, Apple, IBM and ARM. Open Firmware allows the system to load platform-independent drivers directly from the PCI card, improving compatibility.
Open Firmware may be accessed through its command line interface, which uses the Forth programming language.
It has started as an alternative to the official Hantek DSO software for Linux users. Nowadays it works under Microsoft Windows and Apple Mac OS as well. Supported operating systems: Linux, MacOSX, Windows. An Open Firmware equipped computer. Included examples will use Apple hardware. About this tutorial. This tutorial is the second part of learning beginner debugging techniques in Open Firmware. The first tutorial focused on understanding the use of Forth within Open Firmware, and this tutorial will focus on the hardware as it appears to Open. This is the Open Firmware prompt. Insert the Mac OS X Leopard Install DVD. Type the following lines exactly as shown below into the Open Firmware prompt. Be mindful of capitalization, spaces, zeros, etc. If the command is properly typed and understood, Open Firmware will display “ok” at the end of each line after you hit “return”.
Open Firmware is described by IEEE standard IEEE 1275-1994, which was not reaffirmed by the Open Firmware Working Group (OFWG) since 1998 and has therefore been officially withdrawn by IEEE.
Several commercial implementations of Open Firmware have been released to the Open Source community in 2006, including Sun OpenBoot, Firmworks OpenFirmware and Codegen SmartFirmware. The source code is available from the OpenBIOS project. Sun's implementation is available under a BSD license.
Open Firmware defines a standard way to describe the hardware configuration of a system, called the device tree. This helps the operating system to better understand the configuration of the host computer, relying less on user configuration and hardware polling. For example, Open Firmware is essential for reliably identifying slave I²C devices like temperature sensors for hardware monitoring,:§5.1 whereas the alternative solution of performing a blind probe of the I²C bus, as has to be done by software like lm_sensors on generic hardware, is known to result in serious hardware issues under certain circumstances.:§5.2
Open Firmware Forth Code may be compiled into FCode, a bytecode which is independent of computer architecture details such as the instruction set and memory hierarchy. A PCI card may include a program, compiled to FCode, which runs on any Open Firmware system. In this way, it can provide platform-independent boot-time diagnostics, configuration code, and device drivers. FCode is also very compact, so that a disk driver may require only one or two kilobytes. Therefore, many of the same I/O cards can be used on Sun systems and Macintoshes that used Open Firmware. FCode implements ANS Forth and a subset of the Open Firmware library.
Being based upon an interactive programming language, Open Firmware can be used to efficiently test and bring up new hardware. It allows drivers to be written and tested interactively. Operational video and mouse drivers are the only prerequisite for a graphical interface suitable for end-user diagnostics. Apple shipped such a diagnostic 'operating system' in many Power Macintoshes. Sun also shipped an FCode-based diagnostic tool suite called OpenBoot Diagnostics (OBDiag) used by customer service support and hardware manufacturing teams
On Sun SPARC systems, the Open Firmware interface is displayed on the console terminal before the bootstrapping of the system software. If a keyboard is connected, the main video display will be used as the console terminal and Open Firmware can be re-entered at any time by pressing Stop+A (L1+A) on the keyboard. If no keyboard is connected, then the first serial line on the system is usually used as the console and Open Firmware is re-entered by sending a 'Break' on the serial line. While the system software is running, various Open Firmware settings can be read or written using the
On a PowerPC-based Macintosh, the Open Firmware interface can be accessed by pressing the keys ⌘ Cmd+⌥ Option+O+F at startup (⊞ Win+Alt+O+F if using standard PC USB keyboard). Intel-based Macintoshes do not use Open Firmware; they use Extensible Firmware Interface. Also, early versions (before the PowerBook 3400) connect Open Firmware's input and output to the Modem port by default. This functionality is generally only used by developers or troubleshooting I.T. personnel; for common users, the Mac OS X operating system provides a high level graphical user interface to change commonly used Open Firmware settings. For instance, it is possible to specify the boot disk or partition without directly using the Open Firmware interface, but with some limitations (e.g. it is not possible to select boot from USB mass-storage devices, but Open Firmware allows iMac to boot using
boot ud:,:tbxi command). Other Open Firmware settings can be changed using the
nvram command while the system software is running.
On Pegasos, the interface is accessed by pressing Esc at startup.
On IBM Power Systems, Open Firmware ('ok' prompt) can be accessed through the SMS Boot Menu. SMS Boot Menu can be accessed by pressing 1 or F1 during the boot sequence, after hardware checking, and just before the OS boot.
On the OLPC XO-1 laptop, Open Firmware access requires a developer key, that can be obtained after registration with OLPC. After installing the key, upon each power-on, the boot countdown can be interrupted with Esc (the upper left key) to get to the Forth prompt.
- ^Building Open Firmware for ARM
- ^'OpenBIOS'. Retrieved 10 May 2012.
- ^Mauro, Jim (2001). Solaris Internals: Core Kernel Components. Prentice-Hall Professional. p. 107. ISBN9780130224965. Retrieved 16 May 2020.
- ^ abConstantine A. Murenin (21 May 2010). '5.1. Open Firmware and I²C'. OpenBSD Hardware Sensors — Environmental Monitoring and Fan Control (MMath thesis). University of Waterloo: UWSpace. hdl:10012/5234. Document ID: ab71498b6b1a60ﬀ817b29d56997a418.
- ^Apple's Transition from Open Firmware to Extensible Firmware Interface, mactech, 2007.
- OPEN FIRMWARE HOME PAGE (via Internet Archive)
- Boot Process on IBM POWER (via Internet Archive)
- Aurora SPARC Linux OBP reference guide (via Internet Archive)
- TinyBoot aka Tiny Open Firmware: an embeddable OpenFirmware-like system for small CPUs (via Internet Archive)
In 2006 the company of Open Firmware inventor Mitch Bradley, Firmworks, Inc, released their Open Firmware implementation (OFW) under a BSD license. This code shares some code with SUN's OpenBOOT implementation. The open source OFW supports x86, PowerPC, and ARM architectures. Other architectures, including SPARC and MIPS, may be added as time and interest dictate.
The x86 version is used on the OLPC 'XO' computer. The x86 version can be configured for numerous other environments, including
- Direct QEMU ROM (replacing the 'bios.bin' that is supplied with QEMU
- Coreboot payload
- Loadable on directly on top of a conventional PC BIOS (booted from floppy or hard disk like an OS). In this configuration it can run on an arbitrary PC, or on an emulator like QEMU, VirtualBox, or VMWare.
OFW can boot Linux directly from a disk file (FAT, ext2, ISO9660, or jffs2 filesystems) without the need for an intermediate bootloader like LILO or GRUB. The Linux image can be in either ELF format (as created by the first phase of the Linux kernel compilation process) or in the 'bzImage' format that 'wraps' the ELF image. When booting an ELF image, OFW can read the ELF symbol table so OFW's assembly language debugger can resolve kernel symbols.
Open Firmware Password Mac
OFW can also boot other ELF standalone images, providing to them rudimentary 'libc' capability. That facility has been used for booting, for example, Minix, ReactOS, Plan9, Inferno and SqueakNOS. The OLPC system ROM includes several such 'standalone client programs', including MicroEMACS, memtest86, and NANDblaster (a facility for fast OS updates over multicast wireless).
On the OLPC system, OFW emulates enough legacy BIOS 'real mode INTs' to boot Windows XP. On another system, OFW supports booting Windows CE.
Open Firmware Mac Ppc Commands
You can browse the source code online.
The repository is available through git:
Open Firmware Macbook
You can check it out as follows:
Building Different Versions
- Direct QEMU ROM: see Building OFW for QEMU
- Coreboot: see OFW as a Coreboot Payload
- OLPC: see Building OFW for OLPC
- BIOS-loaded: see Building OFW to Load from BIOS
- ARM: see Building OFW for ARM
Open Firmware Mac Commands
There's an Open Firmware mailing list at:
The mailing list archive is also available: