[Skiboot] [PATCH v3 00/18] MPIPL support
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Wed Jun 6 15:35:17 AEST 2018
Memory Preserving Initial Program Load (MPIPL) is a Power feature where
the contents of memory are preserved while the system reboots after a
failure. This is accomplished by the firmware/OS publishing ranges of
memory to be preserved across boots.
In the OPAL context, OPAL and host Linux communicate the memory ranges
to be preserved via source descriptor tables in the HDAT. This data is
updated at runtime via the SBE. When OPAL or Linux crashes, SBE gets to
know of the event via a special interrupt which causes it to trigger
the MPIPL.
Hostboot then re-IPLs the machine taking care to copy over contents of
the source descriptor tables to a alternate memory locations and
publishes this information in the destination descriptor tables. The
success/failure of the copy is indicated by a results table.
Hostboot also does the requisite procedures to gather hardware register
states for all active threads at the time of the crash.
On an MPIPL boot, OPAL exports the results information to the host Linux
kernel, which then uses its existing logic (kdump/fadump) to write out a
core dump of OPAL and Linux kernel in a format that GDB and crash can
understand.
design:
- OPAL hardcodes few entries in MDST, MDDT table so that we can
capture early opal crash
- OPAL passes relocated base address to SBE via 'MPIPL stash chip-op'
so that hostboot can use relocated address to get MDST, MDDT table.
- OPAL passes dump details to host via device tree (/ibm,dump node)
- OPAL provides new API to MPIPL registration/unregistration
- Enhance reboot2 API to support MPIPL
- Add SBE s0/s1 interrupt support to initiate MPIPL on BMC based
system.
Dependency:
- We have dependency on SBE and hostboot. Firmware folks are working
on getting hostboot and SBE changes.
- We need Linux kernel changes to generate opal core.
Hari will post Linux side patches.
Changes in v3:
- Added documenation for new OPAL API and device tree binding
- Fixed MPIPL trigger path
I have hooked MPIPL trigger path to assert path. Now it will be
trigged on witherspoon only. We haven't tested on other BMC
platform. Once we test we will enable on other BMC system.
- Added MBOX reset support before triggering MPIPL
- Added support to detect `MPIPL support` system params
Changes in V2:
- Added support to get architected registers
- SBE guys changed MPIPL trigger interrupt bit. Now its S0 on both
master and slave chip SBE
- Fixed few other minor issues
Testing:
- I've tested this patchset with custom hostboot and SBE changes. Its
workign fine. We are able to get vmcore and opalcore.
Vasant Hegde (18):
FSP/MDST: Rename fsp-mdst-table.c -> fsp-sysdump.c
hdata: Fix MDST structure
hdata: Define MDDT and MDRT table
hdata: Setup memory for MDDT table
hdata: Setup memory for MDRT table
fadump: Define destination memory for OPAL boot crash
hdata: Add support for early OPAL crash
hdata: Adjust various structure offset after relocation
fadump: Define FADUMP structure
hdata: Create ibm,dump DT node
hdata: Add result table property to ibm,dump node
fadump: Add fw-source-table to ibm,dump node
fadump: Add OPAL API to register for fadump
fadump: Introduce new reboot type
fadump: Send OPAL relocated base address to SBE
fadump: Add support to trigger memory preserving IPL on BMC system
fadump: Add documentation
mbox: Reset bmc mbox in MPIPL path
core/Makefile.inc | 2 +-
core/flash.c | 8 +
core/init.c | 4 +
core/opal-mpipl.c | 357 +++++++++++++++++++++++++++++
core/platform.c | 4 +
doc/device-tree/ibm,dump.rst | 26 +++
doc/fadump.rst | 51 +++++
doc/index.rst | 1 +
doc/opal-api/opal-cec-reboot-6-116.rst | 9 +
doc/opal-api/opal-fadump-manage-167.rst | 72 ++++++
hdata/spira.c | 201 +++++++++++++++-
hdata/spira.h | 5 +
hdata/test/hdata_to_dt.c | 1 +
hw/fsp/Makefile.inc | 2 +-
hw/fsp/{fsp-mdst-table.c => fsp-sysdump.c} | 16 +-
hw/ipmi/ipmi-attn.c | 1 +
hw/sbe-p9.c | 88 +++++++
include/fsp-mdst-table.h | 48 ----
include/mem-map.h | 30 ++-
include/opal-api.h | 44 +++-
include/opal-dump.h | 88 +++++++
include/sbe-p9.h | 16 ++
include/skiboot.h | 1 +
libflash/blocklevel.h | 1 +
libflash/mbox-flash.c | 22 ++
platforms/astbmc/witherspoon.c | 3 +-
skiboot.lds.S | 5 +
27 files changed, 1037 insertions(+), 69 deletions(-)
create mode 100644 core/opal-mpipl.c
create mode 100644 doc/device-tree/ibm,dump.rst
create mode 100644 doc/fadump.rst
create mode 100644 doc/opal-api/opal-fadump-manage-167.rst
rename hw/fsp/{fsp-mdst-table.c => fsp-sysdump.c} (96%)
delete mode 100644 include/fsp-mdst-table.h
create mode 100644 include/opal-dump.h
--
2.14.3
More information about the Skiboot
mailing list