[Skiboot] [PATCH v2 00/17] MPIPL support
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Fri May 4 20:28:00 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 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.
TODO:
- Add documentation for device tree node and OPAL API
- Add support to call MBOX reset on OpenBMC system
Vasant Hegde (17):
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
hdata: Add architected register support
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
core/Makefile.inc | 2 +-
core/init.c | 4 +
core/opal-dump.c | 354 +++++++++++++++++++++++++++++
core/platform.c | 4 +
doc/opal-api/opal-cec-reboot-6-116.rst | 7 +
hdata/spira.c | 234 ++++++++++++++++++-
hdata/spira.h | 24 +-
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 | 4 +
hw/sbe-p9.c | 79 +++++++
include/fsp-mdst-table.h | 48 ----
include/mem-map.h | 30 ++-
include/opal-api.h | 44 +++-
include/opal-dump.h | 87 +++++++
include/sbe-p9.h | 16 ++
skiboot.lds.S | 5 +
18 files changed, 888 insertions(+), 73 deletions(-)
create mode 100644 core/opal-dump.c
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