Key Components in IBM Power Systems Boot Process
Stage 1 : OPAL Firmware: Initializes hardware and provides runtime services. Passes control to Petitboot as the default bootloader.
Stage 2 : Petitboot: Functions as the primary bootloader. Uses kexec to load the Linux kernel and initramfs directly.
- Scans available devices for bootable options.
- Detects core.elf (GRUB binary) as a bootable ELF file.
- Loads and executes core.elf.
Stage 3: GRUB: May be involved as an intermediate bootloader for Linux distributions that rely on GRUB configuration (e.g., RHEL, SLES, or Ubuntu Server).Works as part of the core.elf file, loaded by Petitboot in some scenarios.
- GRUB reads its configuration file (e.g., /boot/grub/grub.cfg).
- Presents a boot menu (if configured) or selects the default kernel.
- Loads the Linux kernel and initramfs into memory.
- Passes control to the kernel.
Steage 4: Linux Kernel : The kernel initializes the system and starts the init process.
----------------------------------------------------------------------------------------------------------------
Advantages :
- Compatibility: Supports Linux distributions with GRUB-based boot processes.
- Flexibility: Allows advanced boot scenarios (e.g., multiple kernels, chainloading).
- Optimization: Petitboot handles hardware initialization efficiently, while GRUB adds cross-distro compatibility.
While Petitboot is the default and primary bootloader in IBM Power Systems, GRUB can be used as part of the boot process, particularly through the core.elf file. Petitboot loads and executes GRUB when required, allowing Linux distributions to leverage GRUB's flexibility and maintain consistent boot processes across architectures. This combination ensures optimal performance and compatibility for enterprise-grade Linux distributions on Power Systems.
---------------------------- Power Firmware -------------------
In IBM's PowerPC architecture (commonly used in IBM Power Systems), firmware plays a critical role in managing hardware resources, initializing the system, and providing runtime services. Here's how it works and where firmware resides:
Key Firmware Components in IBM Power Systems
Hostboot:
Responsible for the low-level initialization of the system, such as memory controller setup and processor initialization. Resides in non-volatile storage (e.g., flash memory) on the system board.
Runs on the main processor during the very early stages of boot.
OpenPOWER Firmware (OPAL):
Acts as the interface between the hardware and the operating system.
Provides services such as interrupt handling, power management, and hardware abstraction.
Resides in non-volatile memory (flash storage) but is loaded into main system RAM for execution during boot.
Petitboot:
A Linux-based bootloader that uses the kexec mechanism to load the Linux kernel.
Petitboot itself resides on the system's non-volatile storage and is executed in main system RAM during the boot process.
System Management Firmware:
Manages system-level operations such as monitoring, diagnostics, and recovery.
Runs on a dedicated service processor (e.g., BMC) and resides in the BMC's non-volatile storage.
Where Firmware Resides
Non-Volatile Storage (Flash Memory):
Core firmware components like Hostboot, OPAL, and Petitboot are stored in the system's flash memory on the motherboard or a separate chip. This ensures persistence even when the system is powered off.
System RAM:
During the boot process, firmware like Hostboot, OPAL, and Petitboot are copied from flash memory into main system RAM for execution.
The Linux kernel uses OPAL calls to interact with hardware, and these services are available as long as the system runs.
Service Processor (BMC):
The BMC firmware resides in its own dedicated non-volatile memory on the service processor.
The BMC operates independently of the main system and manages power-on, firmware updates, and error reporting. Interaction with Linux OS on Power Systems
Firmware-to-OS Handoff:
OPAL firmware initializes hardware and performs diagnostics before handing control to the Linux kernel. Petitboot (running on top of OPAL) loads the Linux kernel via kexec.
Runtime Services:
OPAL continues to provide runtime services to the Linux kernel, such as hardware interrupts, error handling, and power state management. Linux interacts with firmware using the OPAL API and device tree structures.
Firmware Location on Filesystem:
Firmware blobs for devices (e.g., network cards, GPUs) are stored in /lib/firmware. Core system firmware (e.g., OPAL, Hostboot) does not reside in the Linux filesystem but in the system's non-volatile memory. Summary for Power Systems
Primary Firmware (Hostboot, OPAL, Petitboot): Resides in non-volatile storage (flash memory) on the system board. Executed in system RAM during boot and runtime.
Service Processor Firmware (BMC): Resides in dedicated non-volatile storage on the service processor. Operates independently of the main CPU and Linux OS.
Device Firmware: Resides in /lib/firmware on the Linux filesystem and is loaded into specific hardware devices by their drivers.
This modular design ensures separation between core firmware, runtime services, and device-specific firmware, enabling robust and scalable operations on IBM Power Systems.