Difference between revisions of "OpenPOWER Firmware"

From RCS Wiki
Jump to navigation Jump to search
(Major revision, add more firmware pieces)
(→‎Components: CME HCODE upstream source)
 
(11 intermediate revisions by 4 users not shown)
Line 11: Line 11:
 
! Function
 
! Function
 
|-
 
|-
| [[OTPROM|OTPROM]]
+
| SBE - OTPROM
| SBE core (on CPU chip)
 
| eFuses
 
 
[https://git.raptorcs.com/git/talos-sbe/tree/src/boot/otprom_init.S Source]
 
[https://git.raptorcs.com/git/talos-sbe/tree/src/boot/otprom_init.S Source]
|
+
| [[Self-Boot Engine|SBE]] core (on CPU)
 +
| [[OTPROM|OTPROM]] (on CPU die)
 +
| The portion of [[Self-Boot Engine|Self-Boot Engine]] (SBE) firmware permanently written via eFuses into the POWER9 silicon's OTPROM
 
* very first instructions executed
 
* very first instructions executed
* loads SBE firmware from SEEPROM into SBE core
+
* loads remaining SBE firmware from SEEPROM into SBE core
 
|-
 
|-
| [[Self-Boot Engine|Self-Boot Engine]] (SBE) firmware
+
| SBE - SEEPROM  
| SBE core (on CPU chip)
 
| SBE SEEPROM
 
 
[https://git.raptorcs.com/git/talos-sbe/tree/ Source]
 
[https://git.raptorcs.com/git/talos-sbe/tree/ Source]
|
+
| [[Self-Boot Engine|SBE]] core (on CPU)
 +
| SBE [[SEEPROM|SEEPROM]] (on CPU)
 +
| The portion of [[Self-Boot Engine|Self-Boot Engine]] (SBE) firmware run from rewritable [[SEEPROM|SEEPROM]]
 
* initialises CPU core
 
* initialises CPU core
 
* loads Hostboot Bootloader
 
* loads Hostboot Bootloader
Line 29: Line 29:
 
|-
 
|-
 
| Hostboot Bootloader (HBBL)
 
| Hostboot Bootloader (HBBL)
 +
[https://git.raptorcs.com/git/talos-hostboot/tree/src/bootloader Source]
 
| CPU core
 
| CPU core
| SBE SEEPROM
+
| SBE [[SEEPROM|SEEPROM]] (on CPU)
[https://git.raptorcs.com/git/talos-hostboot/tree/src/bootloader Source]
 
 
|
 
|
 
* first code which runs on main CPU cores; loads and executes rest of Hostboot
 
* first code which runs on main CPU cores; loads and executes rest of Hostboot
Line 37: Line 37:
 
|-
 
|-
 
| [[Hostboot|Hostboot]]
 
| [[Hostboot|Hostboot]]
 +
[https://git.raptorcs.com/git/talos-hostboot/tree/ Raptor Source]
 +
[https://github.com/open-power/hostboot Upstream Source]
 
| CPU core
 
| CPU core
| PNOR SPI Flash
+
| [[PNOR|PNOR]] (SPI Flash)
[https://git.raptorcs.com/git/talos-hostboot/tree/ Source]
 
 
|
 
|
 
* initialises DRAM (memory training, zeroing of ECC memory, etc.), processor bus, memory buffers
 
* initialises DRAM (memory training, zeroing of ECC memory, etc.), processor bus, memory buffers
Line 45: Line 46:
 
|-
 
|-
 
| [[Skiboot|Skiboot]]
 
| [[Skiboot|Skiboot]]
 +
[https://git.raptorcs.com/git/talos-skiboot/tree/ Raptor Source]
 +
[https://github.com/open-power/skiboot Upstream Source]
 
| CPU core
 
| CPU core
| PNOR SPI Flash
+
| [[PNOR|PNOR]] (SPI Flash)
[https://git.raptorcs.com/git/talos-skiboot/tree/ Source]
 
 
|
 
|
 
* initialises PCIe controllers, device trees, real time clock, NVlink, sensors
 
* initialises PCIe controllers, device trees, real time clock, NVlink, sensors
Line 55: Line 57:
 
|-
 
|-
 
| [[Skiroot]]/[[Petitboot|Petitboot]]
 
| [[Skiroot]]/[[Petitboot|Petitboot]]
 +
[https://git.raptorcs.com/git/talos-op-build/tree/openpower/configs/linux/skiroot_defconfig Skiroot Linux Config Source (Talos II)]<br>
 +
[https://git.raptorcs.com/git/blackbird-op-build/tree/openpower/configs/linux/skiroot_defconfig Skiroot Linux Config Source (Blackbird)]<br>
 +
[https://git.raptorcs.com/git/talos-petitboot/ Petitboot Source]<br>
 +
[https://gitlab.raptorengineering.com/openpower-firmware/talos-op-build/-/blob/04-16-2019/openpower/configs/linux/skiroot_defconfig Skiroot Linux Config GitLab (Talos II)]<br>
 +
[https://gitlab.raptorengineering.com/openpower-firmware/blackbird-op-build/-/blob/04-16-2019/openpower/configs/linux/skiroot_defconfig Skiroot Linux Config GitLab (Blackbird)]
 
| CPU core
 
| CPU core
| PNOR SPI Flash
+
| [[PNOR|PNOR]] (SPI Flash)
[https://git.raptorcs.com/git/talos-petitboot/ Source]
 
 
|
 
|
 
* [[Skiroot]] refers to the Linux kernel and initramfs which runs from RAM
 
* [[Skiroot]] refers to the Linux kernel and initramfs which runs from RAM
Line 63: Line 69:
 
* [[Petitboot]] loads operating system via kexec
 
* [[Petitboot]] loads operating system via kexec
 
|-
 
|-
| [[On-Chip Controller|On-Chip Controller]] (OCC) firmware
+
| OCC firmware
| OCC core (on CPU chip)
+
[https://git.raptorcs.com/git/talos-occ/tree/ Raptor Source]
| PNOR SPI Flash
+
[https://github.com/open-power/occ Upstream Source]
[https://git.raptorcs.com/git/talos-occ/tree/ Source]
+
| [[On-Chip Controller|OCC]] core (on CPU)
|
+
| [[PNOR|PNOR]] (SPI Flash)
 +
| The [[On-Chip Controller|On-Chip Controller]] (OCC) manages:
 
* thermal regulation of CPU chip, turbo frequency selection, voltage ID selection, power measurement, etc.
 
* thermal regulation of CPU chip, turbo frequency selection, voltage ID selection, power measurement, etc.
 
|-
 
|-
| [[CME]] [[HCODE]]
+
| CME [[HCODE]]
| [[CME]] cores (on CPU chip)
+
[https://git.raptorcs.com/git/talos-hcode/tree/ Raptor Source]
| PNOR SPI Flash
+
[https://github.com/open-power/hcode Upstream Source]
[https://git.raptorcs.com/git/talos-hcode/tree/ Source]
+
| [[CME]] cores (on CPU)
|
+
| [[PNOR|PNOR]] (SPI Flash)
* The [[Core Management Engine|Core Management Engines]] are auxillary cores used for power management purposes. They are ultimately responsible to the OCC. There is one CME for every two SMT4 cores.
+
| The [[Core Management Engine|Core Management Engines]] (CME) are auxillary cores used for power management purposes. They are ultimately responsible to the OCC.
 +
* There is one CME for every pair of SMT4 cores.
 
|-
 
|-
| [[SGPE]] and [[PGPE]] [[HCODE]]
+
| SGPE and PGPE [[HCODE]]
| [[GPE|General Purpose Engine]] cores (on CPU chip)
 
| PNOR SPI Flash
 
 
[https://git.raptorcs.com/git/talos-hcode/tree/ Source]
 
[https://git.raptorcs.com/git/talos-hcode/tree/ Source]
|
+
| [[SGPE]] and [[PGPE]] cores (on CPU)
* Auxillary cores which assist, and are managed by, the OCC.
+
| [[PNOR|PNOR]] (SPI Flash)
 +
| [[GPE|General Purpose Engine]] (GPE) cores which assist, and are managed by, the OCC.
 
* The [[SGPE|Stop GPEs]] (SGPEs) are part of the mechanism for resuming execution after a STOP instruction is executed (which is a Power ISA instruction which halts the processor).
 
* The [[SGPE|Stop GPEs]] (SGPEs) are part of the mechanism for resuming execution after a STOP instruction is executed (which is a Power ISA instruction which halts the processor).
 
* The [[PGPE|Pstate GPEs]] (PGPEs) perform pstate management.
 
* The [[PGPE|Pstate GPEs]] (PGPEs) perform pstate management.
 
|-
 
|-
| [[IOPPE]] [[HCODE]]
+
| IOPPE [[HCODE]]
| [[IOPPE]] cores (on CPU chip)
 
| PNOR SPI Flash
 
 
[https://git.raptorcs.com/git/talos-hcode/tree/ Source]
 
[https://git.raptorcs.com/git/talos-hcode/tree/ Source]
 +
| [[IOPPE]] cores (on CPU)
 +
| [[PNOR|PNOR]] (SPI Flash)
 
|
 
|
 
* Involved in CAPI support.
 
* Involved in CAPI support.
 
|- style="background-color:#e0e0e0;"
 
|- style="background-color:#e0e0e0;"
 
| [[OpenBMC]]
 
| [[OpenBMC]]
 +
[https://git.raptorcs.com/git/talos-openbmc/tree/ Source]
 
| BMC chip
 
| BMC chip
 
| BMC SPI Flash
 
| BMC SPI Flash
[https://git.raptorcs.com/git/talos-openbmc/tree/ Source]
 
 
|
 
|
 
<small>(This is not part of OpenPOWER firmware, but is mentioned to give a picture of the division of responsibilities. Not all POWER9 systems use a BMC; IBM systems use a [[FSP]].)</small>
 
<small>(This is not part of OpenPOWER firmware, but is mentioned to give a picture of the division of responsibilities. Not all POWER9 systems use a BMC; IBM systems use a [[FSP]].)</small>
Line 110: Line 117:
 
== Process ==
 
== Process ==
  
 +
# [[OpenBMC|OpenBMC]] uses [[FSI|FSI]] interface to start SBE
 
# SBE executes [[OTPROM|OTPROM]], which loads SEEPROM firmware into SBE PIBMEM
 
# SBE executes [[OTPROM|OTPROM]], which loads SEEPROM firmware into SBE PIBMEM
 
# SBE executes SEEPROM firmware
 
# SBE executes SEEPROM firmware
# [[OpenBMC|OpenBMC]] uses [[FSI|FSI]] interface to start SBE
 
 
# [[Self-Boot Engine|SBE]] loads Hostboot   
 
# [[Self-Boot Engine|SBE]] loads Hostboot   
 
# [[Hostboot|Hostboot]] loads Skiboot
 
# [[Hostboot|Hostboot]] loads Skiboot
Line 127: Line 134:
 
* [[OpenBMC|OpenBMC]]
 
* [[OpenBMC|OpenBMC]]
 
* [[OpenPOWER|OpenPOWER]]
 
* [[OpenPOWER|OpenPOWER]]
 +
* [[Talos_II/Firmware]]
 +
* [[Blackbird/Firmware]]
  
 
== External Links ==
 
== External Links ==
  
 
* [https://github.com/open-power/docs OpenPOWER firmware source code on GitHub]
 
* [https://github.com/open-power/docs OpenPOWER firmware source code on GitHub]
* For a better understanding of OpenPOWER firmware and boot processes, see:
+
* '''For a better understanding of OpenPOWER firmware and boot processes, see:'''
 
** [https://github.com/open-power/docs/blob/master/hostboot/HostBoot_PG.md Overview of Boot Process]
 
** [https://github.com/open-power/docs/blob/master/hostboot/HostBoot_PG.md Overview of Boot Process]
 
** [https://github.com/open-power/docs/blob/master/hostboot/P9_Boot_Flow_OpenPOWER.pdf P9 Boot Flow]
 
** [https://github.com/open-power/docs/blob/master/hostboot/P9_Boot_Flow_OpenPOWER.pdf P9 Boot Flow]
 
** [https://github.com/open-power/docs More OpenPOWER firmware documentation]
 
** [https://github.com/open-power/docs More OpenPOWER firmware documentation]
 
** [https://blog.jms.id.au/2015/07/openpower-firmware-stack/ OpenPOWER Firmware Stack] - Joel's Weblog
 
** [https://blog.jms.id.au/2015/07/openpower-firmware-stack/ OpenPOWER Firmware Stack] - Joel's Weblog
 
+
* Bug tracker for firmware issues specific to [[Raptor Computing Systems|Raptor CS]] products: https://bugs.raptorengineering.com/
 
[[Category:Firmware]]
 
[[Category:Firmware]]

Latest revision as of 14:20, 3 March 2023

OpenPOWER Firmware is an open-source alternative to OpenFirmware and proprietary IBM firmware used on Power machines.[1] It is a general name for many separate pieces of software used to start recent Power Architecture chips made by IBM.[2]

OpenBMC is a separate project that creates firmware for the Baseboard Management Controller.

Components

Firmware Executed on Loaded from Function
SBE - OTPROM

Source

SBE core (on CPU) OTPROM (on CPU die) The portion of Self-Boot Engine (SBE) firmware permanently written via eFuses into the POWER9 silicon's OTPROM
  • very first instructions executed
  • loads remaining SBE firmware from SEEPROM into SBE core
SBE - SEEPROM

Source

SBE core (on CPU) SBE SEEPROM (on CPU) The portion of Self-Boot Engine (SBE) firmware run from rewritable SEEPROM
  • initialises CPU core
  • loads Hostboot Bootloader
  • backup copy stored on PNOR SPI Flash, used to stage SBE firmware updates
Hostboot Bootloader (HBBL)

Source

CPU core SBE SEEPROM (on CPU)
  • first code which runs on main CPU cores; loads and executes rest of Hostboot
  • responsible for verifying integrity of Hostboot when secure boot is enabled, so this part of Hostboot is stored on the SBE SEEPROM, even though its source code lives inside the Hostboot repository
Hostboot

Raptor Source Upstream Source

CPU core PNOR (SPI Flash)
  • initialises DRAM (memory training, zeroing of ECC memory, etc.), processor bus, memory buffers
  • finally, chainloads Skiboot
Skiboot

Raptor Source Upstream Source

CPU core PNOR (SPI Flash)
  • initialises PCIe controllers, device trees, real time clock, NVlink, sensors
  • loads OCC firmware and starts OCC running
  • implements OpenPOWER Abstraction Layer (OPAL) for OS runtime services; remains resident in RAM after OS boot
  • finally, chainloads Skiroot
Skiroot/Petitboot

Skiroot Linux Config Source (Talos II)
Skiroot Linux Config Source (Blackbird)
Petitboot Source
Skiroot Linux Config GitLab (Talos II)
Skiroot Linux Config GitLab (Blackbird)

CPU core PNOR (SPI Flash)
  • Skiroot refers to the Linux kernel and initramfs which runs from RAM
  • Contains Petitboot, a userspace application which provides a boot menu
  • Petitboot loads operating system via kexec
OCC firmware

Raptor Source Upstream Source

OCC core (on CPU) PNOR (SPI Flash) The On-Chip Controller (OCC) manages:
  • thermal regulation of CPU chip, turbo frequency selection, voltage ID selection, power measurement, etc.
CME HCODE

Raptor Source Upstream Source

CME cores (on CPU) PNOR (SPI Flash) The Core Management Engines (CME) are auxillary cores used for power management purposes. They are ultimately responsible to the OCC.
  • There is one CME for every pair of SMT4 cores.
SGPE and PGPE HCODE

Source

SGPE and PGPE cores (on CPU) PNOR (SPI Flash) General Purpose Engine (GPE) cores which assist, and are managed by, the OCC.
  • The Stop GPEs (SGPEs) are part of the mechanism for resuming execution after a STOP instruction is executed (which is a Power ISA instruction which halts the processor).
  • The Pstate GPEs (PGPEs) perform pstate management.
IOPPE HCODE

Source

IOPPE cores (on CPU) PNOR (SPI Flash)
  • Involved in CAPI support.
OpenBMC

Source

BMC chip BMC SPI Flash

(This is not part of OpenPOWER firmware, but is mentioned to give a picture of the division of responsibilities. Not all POWER9 systems use a BMC; IBM systems use a FSP.)

  • Turns system power rails on and off to energise and deenergise CPU modules, RAM, etc.
  • Sends commands to CPU modules over FSI to commence booting.
  • Provides access to PNOR SPI flash containing host firmware via LPC.
  • Receives core temperature information from the OCC; decides and sets fan speeds.
  • Powers off system if OCC indicates catastrophic temperature.
Diagram of main and auxillary cores on POWER9

Process

  1. OpenBMC uses FSI interface to start SBE
  2. SBE executes OTPROM, which loads SEEPROM firmware into SBE PIBMEM
  3. SBE executes SEEPROM firmware
  4. SBE loads Hostboot
  5. Hostboot loads Skiboot
  6. Skiboot loads OCC, Skiroot
  7. Petitboot application within Skiroot loads the operating system
  8. OS talks to firmware through OPAL

References

See also

External Links