From cb35695328fbc1cb6764f048a8dbb3e81faba1e9 Mon Sep 17 00:00:00 2001 From: Matt Derksen Date: Tue, 15 Jan 2019 10:48:31 -0600 Subject: Inform PHYP of NVDIMM protection by OCC The OCC is responsible for detecting the EPOW signal and triggering the save operation on the NVDIMM. Therefore, if the OCC is not running we are unprotected from a poweroff event. PHYP needs to inform the LPARs using the NV (non-volatile) memory of this state so they can behave accordingly. HBRT is responsible for telling PHYP when we get into this state. There are two ways we can detect this state: a) HBRT explicitly puts the PM complex into reset b) PRD detects a specific FIR bit The message should include this data: - what state we are in (protected or unprotected) - which processor is affected Work for this story will include: - Definition of the new message - Creating a utility function to send the message - Calling utility function to send 'unprotected' message inside of all pm reset paths at runtime Change-Id: Ib015d001d47883a247faedabedb0705ba0f1b215 RTC:201181 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68870 Reviewed-by: Christian R. Geddes Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: TSUNG K. YEUNG Reviewed-by: Roland Veloz Reviewed-by: Daniel M. Crowell --- src/include/runtime/interface.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/include/runtime/interface.h') diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 70b6e7e1d..31f5eaddc 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2018 */ +/* Contributors Listed Below - COPYRIGHT 2013,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -98,7 +98,7 @@ enum MemoryError_t #define HBRT_RC_NEXT_OPEN_RC ((int)(0x0u - 0x1009u)) /* 0xFFFF_EFF7 */ /** End return codes for scom_read, scom_write. */ - + /** * I2C Master Description: chip, engine and port packed into @@ -551,6 +551,14 @@ typedef struct hostInterfaces HBRT_FW_MSG_HBRT_FSP_RESP = 6, HBRT_FW_MSG_TYPE_I2C_LOCK = 7, HBRT_FW_MSG_TYPE_SBE_STATE = 8, + HBRT_FW_MSG_TYPE_NVDIMM_PROTECTION = 9, + }; + + // NVDIMM protection state enum + enum + { + HBRT_FW_NVDIMM_NOT_PROTECTED = 0, + HBRT_FW_NVDIMM_PROTECTED = 1 }; struct hbrt_fw_msg // define struct hbrt_fw_msg @@ -615,6 +623,14 @@ typedef struct hostInterfaces uint64_t i_state; // state of the SBE; 0 = disabled, 1 = enabled } __attribute__ ((packed)) sbe_state; + // This struct is sent from HBRT with + // io_type set to HBRT_FW_MSG_TYPE_NVDIMM_PROTECTION + struct + { + uint64_t i_procId; // processor ID of the NVDIMM with/without OCC protection + uint64_t i_state; // NVDIMM protection state enum + } __attribute__ ((packed)) nvdimm_protection_state; + // This struct is sent from HBRT with // io_type set to HBRT_FW_MSG_HBRT_FSP_REQ or // HBRT_FW_MSG_HBRT_FSP_RESP -- cgit v1.2.1