[Skiboot] [RFC PATCH 00/16] MPIPL support
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Tue Apr 3 22:04:31 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.
- This patchset depends on below OPAL patchset
- Add SBE driver support
https://lists.ozlabs.org/pipermail/skiboot/2018-April/010903.html
- hdata: Move 'HRMOR_BIT' macro to header file
https://lists.ozlabs.org/pipermail/skiboot/2018-March/010811.html
- Fix post MPIPL PHB4 reset issue
https://lists.ozlabs.org/pipermail/skiboot/2018-April/010895.html
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 support to get architected register state
- Add documentation for device tree node and OPAL API
Vasant Hegde (16):
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 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
dump: Send OPAL relocated base address to SBE
Add support to trigger memory preserving IPL on BMC system
core/Makefile.inc | 2 +-
core/init.c | 4 +
core/opal-dump.c | 350 +++++++++++++++++++++++++++++
core/platform.c | 4 +
doc/opal-api/opal-cec-reboot-6-116.rst | 7 +
hdata/spira.c | 188 +++++++++++++++-
hdata/spira.h | 3 +
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 | 29 ++-
include/opal-api.h | 44 +++-
include/opal-dump.h | 87 +++++++
include/sbe-p9.h | 16 ++
skiboot.lds.S | 5 +
18 files changed, 821 insertions(+), 68 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