Features and Benefits

SmartFirmware is an ANSI C implementation of the Open Firmware boot firmware standard plus errata, recommended practices, and accepted proposals. It is designed to be very easy and fast to port. This leverages existing code-base investments without retraining programmers.
  • SmartFirmware is written entirely in ANSI C
    • machine abstraction layer isolates machine dependencies
    • fast and easy to port - allows bringing up a new system in days
    • leverages existing C code, compilers, and debugging tools
  • SmartFirmware tokenizer and de-tokenizer
    • convert output of compiler into into Fcode for a plug-in device

    • disassemble Fcode to human-readable form to aid debugging
  • The SmartFirmware local-host emulator compiles and runs on a variety of platforms including BeOS, Macintosh, and most Unix platforms.
    • emulates a complete Open Firmware environment including a set of PCI peripherals
    • additional vendor-specific emulation modules may be easily linked in
    • allows easy debugging and testing of Fcode before a board or system is even built
  • It's a lot easier to find C programmers than to find Forth programmers.

Download demos

Demo versions of SmartFirmware are available that run under several operating systems including Mac OS-X, Solaris, Linux, Coldfire, and Windows NT. If your system is not listed on the download page, please contact us  and we will try to build one.
Download demo software
The demo software runs using stdin/stdout with some dummy devices. It can also load Fcode files from the command-line as well as tokenize and detokenize files.


Supported Hardware

A variety of popular processors, devices, and buses are already supported or currently under development. Please contact us for any hardware not in the current list:
  • Processors
    • AMD Opteron
    • Intel Pentiums
    • PowerPC
    • ARM (including StrongARM, Xscale, and other variants)
    • MIPS
    • Sparc
    • M68K/Coldfire
  • Buses
    • PCI (including PCI-PCI bridges and PMC option cards)
    • Cardbus
    • SCSI
    • ISA bus
    • VME bus
    • USB (Universal Serial Bus)
    • IEEE-1394 Firewire
  • Devices
    • disk drives
    • CD-ROM drives
    • ethernet (including gigabit)
    • keyboards
    • VGA
    • simple frame buffers
    • RS-232 serial ports



Implementation features:

  • FCode Interpreter - the core of Open Firmware
    • written entirely in ANSI C for easy porting and maintenance
    • allows portable machine independent device drivers to be embedded in option cards
    • allows option cards to support a wide variety of platforms with a single FCode driver
  • Run time Environment
    • written entirely in the ANSI C programming language
    • makes minimum use of C run time libraries
    • includes standalone implementations of key run time routines if needed
  • Highly modular design
    • easy inclusion and deletion of portions of SmartFirmware
    • easy to add new drivers or customize existing code
    • easy to debug
    • control memory footprint
  • Plug-in file system and executable image format layers
    • easy listing of partitions, directories, and files on a disk device
    • easy loading and execution of images from disk or network devices
    • easy to include new file systems or image formats

 Core IEEE 1275 features:

  • device interface - interface for device drivers and managing device trees
  • client interface - a mechanism for operating systems that are loaded by SmartFirmware
    • access configuration information
    • query information about bus adapters and probed devices.
  • user interface - a convenient mechanism for accessing boot firmware functions
    • composed and execute Forth programs on the system console
    • modify configuration variables to control the boot-up behavior
    • examine and control devices
  • standard packages:
    • deblocker - byte-oriented I/O to block devices such as disks
    • disklabel - disk partitioning to support booting
    • obp-tftp - booting using ethernet and BOOTP/TFTP
    • fb8 - 8, 16, and 32-bit color frame-buffer support
    • terminal emulator - emulate an ANSI terminal on a frame buffer
  • "lines/page" Forth variable as suggested for "exit?" word
  • nvedit one-screen emacs-style editor
  • command-line emacs-style editing
  • optional Sun OpenBoot compatibility

Recommended practices:

  • Universal Serial Bus
  • 64-bit extensions - includes support for a 32-bit run time environment for older Fcode
  • 16-color text extension
  • 8-bit graphics extension
  • Forth source & Fcode image support
  • Generic Names
  • Interposition
  • PCI Bus Binding - including support for PCI-PCI bridges
  • SCSI-3 parallel interface
  • TFTP Booting Extension
  • ISA Bus Binding
  • proposed network device extensions

Accepted proposals:

  • #215: extensible client interface
  • #248: "size" and "#blocks" methods
  • #270: test-method client interface
  • #288: new property for wide SCSI

CodeGen extensions:

  • plug-in file-system layer for listing and reading files and managing partitions and directories
    • PC/DOS disk partitioning scheme
    • DOS FAT file system
    • BSD-style disk partitions
    • BSD UFS/FFS file systems
    • Linux EXT2FS file system
    • ISO-9660 CD-ROM filesystem
  • plug-in executable image loading and running layer
    • ELF format
    • COFF format
    • Forth source and Fcode "images"
    • Compressed (gzipped) binary images
    • (and of course raw binary images)
  • common SCSI command and device layer makes it easy to create SCSI chip drivers
  • "term" terminal-emulator word to connect console to a serial device
  • additional debugging words added to Forth environment
  • failsafe I/O device nodes help to bring up a new port very quickly
  • "auto-boot-timeout" NV parameter - specify how long to wait for a key press before auto-booting
  • "secondary-diag?" NV parameter - control if secondary diagnostics should be turned on at boot up
  • color logo support for "banner" in "fb8" package - uses 8-bit color extension
  • output-capture buffer to catch tail of large amounts of (usually debug) console output
  • de-tokenizer for disassembling and debugging Fcode images
  • "scroll-step" Forth variable to speed up scrolling on simple frame-buffers
  • fb8 package also supports 16-bit and 32-bit direct pixels while still supporting the 16-color text specification

CodeGen, Inc.
PO Box 3357
Oakland, CA 94609