Difference between revisions of "OpenBMC/StepsToIPL"

From RCS Wiki
Jump to navigation Jump to search
m (Dormito moved page OpenBMC/Draft:StepsToIPL to OpenBMC/StepsToIPL: Most recent update should make this page fairly complete)
 
(No difference)

Latest revision as of 18:06, 28 August 2019

The BMC takes a number of steps to start the IPL process and boot the main CPU. Due to OpenBMC's complex boot procedure that relies on a tangled mess of systemd targets and dbus, the exact steps taken to boot and their ordering is not always clear. This page attempts to clearly document them.

Programs

Needed programs

Below is a list of programs and scripts needed to IPL a Blackbird/Talos II from the BMC. For the programs which it is know, a short description is included. All of these programs are found in (or directly derived from) the raptor Blackbird/Talos II openbmc source projects.

  • hiomapd (current binary name: mboxd): provids the host with access to the pnor.
  • avbus-disable.sh
  • avbus-enable.sh
  • abbus-workaround.sh
  • occ-activate.sh: binds/unbinds occ-hwmon driver from OCCs on the fsi.
  • vrm.sh: wraps vrm-control.sh
  • vrm-control.sh: invoke via vrm.sh
  • lvds.sh: sets up the blackbirds hdmi connector (unneeded on Talos II)

Needed non-openbmc programs

This is a list of programs/functionality that can not easily be derived from the openbmc implemention and/or may carry with it too much extra bloat. The program names are typically those used in an alternate bmc implementation.

  • atx-gpio: a daemon to drive the gpiochip-interface (new style kernel gpio interface) power good pin. This pin, when asserted, tells the ATX power supply to bring the main power up.
  • ipmi-bt-miniroute: A program to handle and forward ipmi packets from /dev/ipmi-bt-host. The following types of packets need to be handled for minimal functionality (netfn,cmd):
    • (0x3a,0x5a): requests for hiomap/pnor operations. the hiomap repo has the protocol description.
    • (0x2c,0x03): get power limits: see phosphor-host-ipmid's implementation. (without this hostboot will NOT online the OCCs).
    • (0x00,0x02): Chassis control: this is needed for the host to ask for a power off (technically unneeded, but power off is pretty basic)
    • (0x0a,0x48): get SEL time: rtc/returns the current time. see the ipmi 2.0 spec
    • (0x0a,0x49): set SEL time: rtc/sets the current time. see the ipmi 2.0 spec
  • fsi-host-sbe: Configures and releases the host's SBE. openpower-proc-control startHost also implements this.
  • scan-fsi: very simple script to ask the kernel to scan the fsi bus. openpower-proc-control scanFSI also implements this.
  • pwr-button-gpio: a simple program to kick off the system startup when the power button is pressed (if you don't believe in power buttons, then this can be skipped)

Recommended programs

  • obmc-console: openbmc project that allows you to forward the internal serial console from the host to an external port (and has a client that can view/intercept the link)
  • ipl-mon/equivalent: non-openbmc program. provdes a mechanism for viewing the hosts current IPL state (very useful for debug)

Notes about enabling/disabling the fsi bus

FSI access from the BMC require the BMC to be driving the FSI clock, however that will conflict with the hosts acceses to the FSI bus. BMC FSI clock can be enabled with:

echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode

and disabled with:

echo -n 1 >/sys/devices/platform/gpio-fsi/external_mode


poweron

The following is the (known) list of steps openbmc runs through to IPL the host. Steps/programs not listed above are not needed to just do IPL (however they may still be desirable). It is assume that hiomapd/mboxd is running at all times.

  1. Disable OCC
    1. echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode
    2. occ-active.sh disable
  2. Ask hiomapd to reset to the default state.
    1. depends on interfaces supported by the mboxd binary on the system, but "killall -SIGHUP mboxd" should work
  3. Bind FSI Driver (once per BMC boot)
  4. ScanFSI
    1. openpower-proc-control's ScanFSI procedure is run
  5. CFAMOverride
    1. openpower-proc-control's CFAMOverride procedure is run
  6. Fan daemon is started
  7. AVSBus stuff
    1. avsbus-workaround.sh
    2. avsbus-disable.sh
    3. vrm.sh
    4. avsbus-enable.sh
  8. startHost
    1. openpower-proc-control's startHost procedure is run
  9. Disable FSI access from the bmc
    1. echo -n 1 >/sys/devices/platform/gpio-fsi/external_mode
  10. Wait for IPL to complete.
  11. Enable OCC
    1. echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode
    2. occ-active.sh watchdog