Difference between revisions of "OpenBMC/StepsToIPL"
(Add list of programs and descriptions, and update the steps a bit) |
|||
Line 41: | Line 41: | ||
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. | 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: | BMC FSI clock can be enabled with: | ||
− | + | echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode | |
− | echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode | ||
− | |||
and disabled with: | and disabled with: | ||
− | + | echo -n 1 >/sys/devices/platform/gpio-fsi/external_mode | |
− | echo -n 1 >/sys/devices/platform/gpio-fsi/external_mode | ||
− | |||
Revision as of 12:07, 21 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.
Contents
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.
- Disable OCC
- echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode
- occ-active.sh disable
- Ask hiomapd to reset to the default state.
- depends on interfaces supported by the mboxd binary on the system, but "killall -SIGHUP mboxd" should work
- Bind FSI Driver (once per BMC boot)
- ScanFSI
- openpower-proc-control's ScanFSI procedure is run
- CFAMOverride
- openpower-proc-control's CFAMOverride procedure is run
- Fan daemon is started
- AVSBus stuff
- avsbus-workaround.sh
- avsbus-disable.sh
- vrm.sh
- avsbus-enable.sh
- startHost
- openpower-proc-control's startHost procedure is run
- Disable FSI access from the bmc
- echo -n 1 >/sys/devices/platform/gpio-fsi/external_mode
- Wait for IPL to complete.
- Enable OCC
- echo -n 0 >/sys/devices/platform/gpio-fsi/external_mode
- occ-active.sh watchdog