Slimline Open Firmware


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 1. Description Low-Level FW: basic platform specific initialization code, memory initialization, … 2. Open Firmware is no official IEEE Standard, but rather a proposal which is a de-facto standard
  • Slimline Open Firmware

    1. 1. LAB: Slimline Open Firmware Power Architecture Developer Conference ‘07 Open Systems Design and Development 2007-09-24 | Heiko J Schick <>, Hartmut Penner <>, Otto Wohlmuth <> © 2007 IBM Corporation
    2. 2. Who we are … Heiko J Schick SLOF Developer Open Systems Firmware Development Hartmut Penner SLOF Architect Open Systems Firmware Development Dr. Otto Wohlmuth SLOF Godfather ;-)
    3. 3. Agenda <ul><li>Open Firmware: De-Facto Industry Standard </li></ul><ul><li>Overview of Existing Firmware Implementations </li></ul><ul><li>SLOF Overview and Design Principles </li></ul><ul><li>SLOF Assets and Platform Support </li></ul><ul><li>SLOF Deep Dive </li></ul><ul><li>Outlook </li></ul>
    4. 4. Open Firmware: De-Fact Industry Standard <ul><li>Loaded and initiated by Low Level Firmware </li></ul><ul><li>IEEE 1275 implementation </li></ul><ul><ul><li>Client Interface </li></ul></ul><ul><ul><ul><li>Interface to the OS </li></ul></ul></ul><ul><ul><li>Device Interface </li></ul></ul><ul><ul><ul><li>Creation of device tree </li></ul></ul></ul><ul><ul><ul><li>Initialization of IO devices </li></ul></ul></ul><ul><ul><ul><li>Boot loader </li></ul></ul></ul><ul><ul><li>User Interface </li></ul></ul><ul><ul><ul><li>Debug Interface ( UART ) </li></ul></ul></ul><ul><ul><ul><li>NVRAM manipulation </li></ul></ul></ul>
    5. 5. O Overview of Existing Firmware Implementations
    6. 6. LinuxBIOS 1 Hardware LinuxBIOS Linux Distribution Linux Distribution Operating System (e.g. Windows, Unix, Linux, OpenSolaris) Operating System (e.g. Windows CE, OpenSolaris, Linux) Linux Kernel ELF Loader Linux Kernel Linux Kernel ELF Loader kexec ELF Loader ELF Loader T T T Transient O Optional Boot Manager or Open Firmware Bochs BIOS ADLO Bootstrap / Startup Code Boot Manager O
    7. 7. LinuxBIOS <ul><li>Source Code under GPL </li></ul><ul><li>RAM controller and memory setup </li></ul><ul><li>PCI and HyperTransport scan / setup and device enumeration </li></ul><ul><li>ELF Loader </li></ul><ul><li>Uses a device tree similar data structure </li></ul><ul><li>Plans for version 3: </li></ul><ul><ul><li>modular design </li></ul></ul><ul><ul><li>easier build process </li></ul></ul><ul><ul><li>flattened device tree support </li></ul></ul><ul><ul><li>ePAPR compliant </li></ul></ul>2
    8. 8. OpenBIOS <ul><li>Original project scope was to develop an open source Open Firmware implementation. </li></ul><ul><li>Project scope changed from writing a free firmware implementation to present most of the available free and open source Open Firmware implementation (“Umbrella Project”). </li></ul>
    9. 9. FirmWorks <ul><li>FirmWorks Open Firmware is a mature, stable, complete Open Firmware implementation that is based on the de-fact IEEE 1275-1994 standard </li></ul><ul><li>Source Code under BSD/MIT (commercial licensing available) </li></ul><ul><li>Complete Open Firmware </li></ul><ul><li>Extensive debugging support - source and assembly language level </li></ul><ul><li>Minimal dependencies on external toolchains </li></ul><ul><li>Integrated builder, packager, tokenizer </li></ul>1
    10. 10. FirmWorks <ul><li>Filesystem support </li></ul><ul><ul><li>FAT (R/W), ext2 (R/W), ext3 (RO), ISO9660 (RO), JFFS2 (RO) </li></ul></ul><ul><li>Network support </li></ul><ul><ul><li>TFTP, TCP/IP, DHCP, DNS, HTTP (client and server), telnet (client and server), IPV6, NFS </li></ul></ul><ul><li>USB </li></ul><ul><ul><li>OHCI, UHCI, EHCI (USB 2.0), Mass storage - e.g. FLASH keys, Keyboards, Serial ports, Network interfaces, Hubs </li></ul></ul><ul><li>Drivers for many common programming interfaces </li></ul><ul><li>Graphical Boot and Administration Menu </li></ul><ul><li>Support for System Diagnostics </li></ul><ul><li>Support for system admin tasks like installation </li></ul>2
    11. 11. Open Hack’Ware <ul><li>Open Hack’Ware is a free Open Firmware emulator intended to be used on PPC machines </li></ul><ul><li>Source Code under GPL </li></ul><ul><li>It is not a real Open Firmware as it knows nothing about Forth </li></ul><ul><li>Emulates the Open Firmware and RTA interface </li></ul><ul><li>Emulates some known “interpret” strings to make it able to launch known operating systems </li></ul><ul><li>Currently used as the Qemu-PPC firmware </li></ul>
    12. 12. Extensible Firmware Interface (EFI) <ul><li>Industry interface specification for x86 and IA64 systems </li></ul><ul><li>Interface for an operating system to interact with firmware attributes </li></ul><ul><li>Specified in one location (the UEFI Specification) </li></ul><ul><ul><li>Testable </li></ul></ul><ul><ul><li>Current </li></ul></ul><ul><ul><li>Portable </li></ul></ul><ul><ul><li>Extensible and Flexible </li></ul></ul><ul><li>Tiano Core </li></ul><ul><li>Source Code under GPL </li></ul>
    13. 13. AMD Generic Encapsulated Software Architecture (AGESA) <ul><li>A Wrapper is the translator between the AMD interface and the Host BIOS interface </li></ul><ul><li>AGESA code focuses on AMD specific technology </li></ul><ul><li>Each AMD block has its own wrapper and must call out through its wrapper to acquire services </li></ul>
    14. 14. S Slimline Open Firmware
    15. 15. What is SLOF ?!? <ul><li>SLOF |släp| noun Computing, Firmware is initialization and boot source code based on the IEEE-1275 standard (also known as the Open Firmware standard). </li></ul>
    16. 16. SLOF Overview <ul><li>Initialization and Boot Firmware for Cell Broadband Engine™ (Cell/B.E.) and PowerPC </li></ul><ul><li>Complete Open Firmware implementation which is based on the de-fact IEEE 1275-1994 standard </li></ul><ul><li>Source code unter BSD like license </li></ul><ul><li>Small size and footprint </li></ul><ul><li>Simplicity and Modularity (easy to use and extend) </li></ul><ul><li>Boot time optimized </li></ul><ul><li>Focus on minimal time to market </li></ul>1
    17. 17. SLOF Overview <ul><li>Minimal dependencies on external toolchains </li></ul><ul><li>Filesystem support </li></ul><ul><ul><li>FAT (RO), ext2 (RO), ISO9660 (RO), ROMFS </li></ul></ul><ul><li>Network support </li></ul><ul><ul><li>TFTP, DHCP, BOOTP </li></ul></ul><ul><li>USB </li></ul><ul><ul><li>OHCI, Mass storage – e.g. CDROM and Flash drivers, Keyboards, Hubs </li></ul></ul><ul><li>IPMI Keyboard Controller Style Interface (KCS) support </li></ul><ul><li>Display device support via x86 emulator and FCode evaluator </li></ul><ul><li>Graphical Boot and Administration Menu </li></ul>2
    18. 18. Modular Firmware Design Operating System Optional Virtualization Optional Runtime Abstraction Services Optional Secondary Boot Loader Slimline Open Firmware Low-level Firmware Operating System Optional Virtualization Optional Runtime Abstraction Services BOOT-TIME RUN-TIME Firmware Transient Firmware
    19. 19. Low-level Firmware <ul><li>Characteristics </li></ul><ul><li>Chip & Board Initialization </li></ul><ul><ul><li>Hardware dependent </li></ul></ul><ul><ul><li>Support JS2x and Cell/B.E. workstation </li></ul></ul><ul><li>Support of Flash Filesystem </li></ul><ul><ul><li>1st stage execution from ROM </li></ul></ul><ul><ul><li>2nd stage execution from memory </li></ul></ul><ul><li>Interface to Open Firmware (SLOF) </li></ul><ul><ul><li>Loads Open Firmware into memory </li></ul></ul><ul><ul><li>Transfer of hardware information (e.g. memory size) </li></ul></ul>Operating System Optional Virtualization Optional Runtime Abstraction Services Optional Secondary Boot Loader Slimline Open Firmware Low-level Firmware
    20. 20. Slimline Open Firmware <ul><li>Characteristics </li></ul><ul><li>De-facto industry standard for PowerPC and Cell/B.E. </li></ul><ul><ul><li>IEEE Std. 1275-1994: Standard for Boot (Initialization Configuration) Firmware </li></ul></ul><ul><ul><li>Platform Independent </li></ul></ul><ul><li>Fast Firmware and Operating System Bring-Up </li></ul><ul><ul><li>Short boot-time </li></ul></ul><ul><ul><li>Small footprint </li></ul></ul><ul><li>Fast Prototyping </li></ul><ul><ul><li>Interactive user interface </li></ul></ul><ul><li>Open Interface </li></ul><ul><ul><li>Extendable & adaptable </li></ul></ul>Operating System Optional Virtualization Optional Runtime Abstraction Services Optional Secondary Boot Loader Slimline Open Firmware Low-level Firmware
    21. 21. Secondary Boot Loader <ul><li>Characteristics </li></ul><ul><li>Standard Interface </li></ul><ul><ul><li>Uses Open Firmware client interface </li></ul></ul><ul><li>SLOF internal secondary boot loader </li></ul><ul><ul><li>C runtime </li></ul></ul><ul><ul><li>Device driver infrastructure (modules) </li></ul></ul><ul><ul><li>Easy device driver adaption </li></ul></ul><ul><li>Open Source </li></ul><ul><ul><li>Yaboot </li></ul></ul><ul><ul><li>GRUB 2 </li></ul></ul>Operating System Optional Virtualization Optional Runtime Abstraction Services Optional Secondary Boot Loader Slimline Open Firmware Low-level Firmware
    22. 22. Runtime Abstraction Services <ul><li>Characteristics </li></ul><ul><li>Standard Interface </li></ul><ul><ul><li>RTAS ABI from OpenPPR </li></ul></ul><ul><ul><li>Standard interface to none standard devices </li></ul></ul><ul><li>Hardware Abstraction </li></ul><ul><ul><li>Reduces operating systems adaption </li></ul></ul><ul><li>Supported Calls </li></ul><ul><ul><li>PCI Configuration Cycles </li></ul></ul><ul><ul><li>Reboot, power-off </li></ul></ul><ul><ul><li>RTC access </li></ul></ul><ul><ul><li>Firmware flash update </li></ul></ul>Operating System Optional Virtualization Optional Runtime Abstraction Services Optional Secondary Boot Loader Slimline Open Firmware Low-level Firmware
    23. 23. SLOF Platform Support <ul><li>QS2x (Cell/B.E. based blade servers) </li></ul><ul><li>CAB (Cell/B.E. Accelerator Board) </li></ul><ul><li>JULI Cluster </li></ul><ul><ul><li>Firmware for an IBM JS21 cluster. </li></ul></ul><ul><ul><li>Used to exploit PCI Exress and MSIs. </li></ul></ul><ul><ul><li>Native Linux (no Hypervisor). </li></ul></ul><ul><li>XEN on PowerPC </li></ul><ul><li>SLOF Open Source (IBM JS20) </li></ul><ul><li>Bimini ( 970MP Reference Design and Workstation)    </li></ul>Cell Accelerator Board IBM Cell Processor Based Blade QS20 IBM BladeServer JS21
    24. 24. S SLOF Deep Dive
    25. 25. SLOF Code Structure Low Level Firmware Layer CPU Init Mem Init I/O MMU I/O Sub Open Firmware Layer Slimline Open Firmware Forth Engine Client Interface RTAS Framework Loader Framework JS21Specific RTAS Service Nano Kernel JS21 Boot Drivers Boot Protocol Stacks Device Interface User Interface JS20 Specific Code & Device Tree JS21 Specific PPC64 Platform Common Operating System JS20 Specific RTAS JS20 Boot Drivers JS21 Specific Forth Code & Device Tree Mem Init I/O MMU I/O Sub JS20 Specific Boot Devices Board SB/H8 Board Southbridge Southbridge Memory
    26. 26. SLOF Filesystem Structure <ul><li>Modules organized in File System </li></ul><ul><ul><li>Load based on name </li></ul></ul><ul><ul><ul><li>Replacement of module possible </li></ul></ul></ul><ul><ul><ul><li>Addition of modules possible </li></ul></ul></ul><ul><li>Customization of FW </li></ul><ul><ul><li>Later Addition to base FW </li></ul></ul><ul><ul><ul><li>Open source hypervisor </li></ul></ul></ul><ul><ul><ul><li>Operation system </li></ul></ul></ul><ul><ul><ul><li>Device code for specific devices </li></ul></ul></ul>
    27. 27. PCI Probe Infrastructure <ul><li>PCI probe code is responsible to setup all devices on PCI bus </li></ul><ul><ul><li>Configuration space (BAR registers, interrupt number) </li></ul></ul><ul><ul><li>Create Open Firmware device tree nodes with all </li></ul></ul><ul><li>The interface can be found in the following files: </li></ul>Filename Interface Name Purpose pci-aliases.fs pci-alias Generate aliases for generic device pci-interrupt.fs pci-get-irq-line Calculate IRQ for device pci-get-irq-sense Calculate IRQ sense for device pci-device_<vendorid>_<devid>.fs Provide device specific code (if generic setup is not sufficient) pci-class_<class>.fs Provide class specific setup (if generic setup is not sufficient) pci-bridge_<vendorid>_<devid>.fs Provide bridge specific setup (if generic setup is not sufficient)
    28. 28. Display Device Support <ul><li>The following options are supported to initialize graphic cards within SLOF: </li></ul><ul><ul><li>FCode which is stored in the expansion ROM of the device and executed in the FCode evaluator. </li></ul></ul><ul><ul><li>VESA BIOS Extension 2.0 which is stored in the expansion ROM of the device and executed via a x86 emulator. </li></ul></ul><ul><ul><li>Manually via device or class code specific PCI setup files. </li></ul></ul>Tested Graphic Adapter Type of Initialization XGI Volari XP 10 x86 Emulation NVIDIA 7x00XX x86 Emulation NVIDIA 6600 GE FCode evaluation ATI Technologies Inc. ES1000 Manually via device specific file
    29. 29. SLOF Environment Loader Framework / Service Nano Kernel RTAS Low Level Firmware System Hardware Hypervisor (optional) PPC64 Linux arch tree BPA Linux arch tree glibc GCC PPC64 backend BPA backend libraries applications platform ecosystem SLOF RTAS Linux Device Drivers User Kernel Firmware
    30. 30. SLOF Structure S L O F lim- ine pen irmware
    31. 31. Open Firmware Client Interface <ul><li>Allows client programs to access Open Firmware services </li></ul><ul><li>Clients loaded by Open Firmware </li></ul><ul><ul><li>Operating system </li></ul></ul><ul><ul><li>Boot loader </li></ul></ul><ul><li>IEEE 1275 centric interface </li></ul><ul><ul><li>Device tree traversal </li></ul></ul><ul><ul><li>Memory handling </li></ul></ul><ul><ul><li>Console I / 0 </li></ul></ul><ul><li>Call by name </li></ul><ul><li>Callbacks possible </li></ul><ul><li>Boot Time </li></ul>
    32. 32. Runtime Abstraction Services <ul><li>Encapsulation of HW specifics into machine-independent interface </li></ul><ul><ul><li>Start and stop Threads in SMP configuration </li></ul></ul><ul><ul><li>Display Status indicators </li></ul></ul><ul><ul><li>System Shutdown </li></ul></ul><ul><ul><li>PCI config cycles </li></ul></ul><ul><ul><li>Serial I/O </li></ul></ul><ul><li>Instantiated and relocated by User </li></ul><ul><li>Users must allocate Memory </li></ul><ul><li>Call by name </li></ul><ul><li>Unidirectional </li></ul><ul><li>Runtime </li></ul>
    33. 33. Service Nano Kernel <ul><li>Client application which can be called before the operating system is invoked </li></ul><ul><li>Framework is written in C to contain more complex applications </li></ul><ul><li>Can be used for platform tests and experiments </li></ul><ul><li>Contains OFW client interface and RTAS access methods </li></ul><ul><li>For SLOF it is only used to implement DHCP, TFTP, and ARP </li></ul>1
    34. 34. Service Nano Kernel <ul><li>Usage of other license device drivers from within SNK client </li></ul><ul><ul><li>Network boot </li></ul></ul><ul><ul><li>DHCP / TFTP / ARB </li></ul></ul><ul><li>Classical module interface </li></ul><ul><ul><li>Entry point at beginning of each module </li></ul></ul><ul><ul><li>Exchange of function pointer tables </li></ul></ul><ul><li>No inter-linkage </li></ul><ul><li>C ABI </li></ul><ul><li>Call by value </li></ul><ul><li>Bidirectional </li></ul><ul><li>Boot time </li></ul>2
    35. 35. O Outlook
    36. 36. Outlook <ul><li>Integration of x86 BIOS emulator for graphic card support </li></ul><ul><li>ePAPR compliant firmware stack using SLOF assets </li></ul><ul><li>More platforms … </li></ul>