From b0da5312bac172bdea608371f647fd1bafb87bce Mon Sep 17 00:00:00 2001 From: crgeddes Date: Mon, 14 Aug 2017 16:39:58 -0500 Subject: Use keyAddr stash chipop to pass rsv mem addr through SBE for MPIPL Previously we were relying on the reservedMem section to be a certain address for the attrrp to find after an MPIPL. With this change the address is passed through the SBE so the reservedMem data can be anywhere RTC: 165369 Change-Id: I06521c049088c4a53a8c0a51fa07e5200da09483 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44624 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Brian E. Bakke Reviewed-by: Martin Gloff Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/usr/sbeio/sbe_psudd.H | 42 +------------------------------------ src/include/usr/sbeio/sbe_sp_intf.H | 15 ++++++++++--- src/include/usr/sbeio/sbeioif.H | 19 +++++++++++++---- 3 files changed, 28 insertions(+), 48 deletions(-) mode change 100755 => 100644 src/include/usr/sbeio/sbe_sp_intf.H (limited to 'src/include') diff --git a/src/include/usr/sbeio/sbe_psudd.H b/src/include/usr/sbeio/sbe_psudd.H index cd8b08050..d4fd7e642 100644 --- a/src/include/usr/sbeio/sbe_psudd.H +++ b/src/include/usr/sbeio/sbe_psudd.H @@ -36,6 +36,7 @@ #include #include +#include "sbe_sp_intf.H" #include namespace SBEIO @@ -516,47 +517,6 @@ class SbePsu */ static const uint64_t MAX_PSU_SHORT_TIMEOUT_NS=90*NS_PER_SEC; //=90sec - /** - * @brief enums for primary SBE response - * - */ - enum sbePrimResponse - { - SBE_PRI_OPERATION_SUCCESSFUL = 0x00, - SBE_PRI_INVALID_COMMAND = 0x01, - SBE_PRI_INVALID_DATA = 0x02, - SBE_PRI_SEQUENCE_ERROR = 0x03, - SBE_PRI_INTERNAL_ERROR = 0x04, - SBE_PRI_GENERIC_EXECUTION_FAILURE = 0xFE, - }; - - /** - * @brief enums for secondary SBE response - * Discuss on SBE_SEC_INVALID_TARGET_ID_PASSED - * - */ - enum sbeSecondaryResponse - { - SBE_SEC_OPERATION_SUCCESSFUL = 0x00, - SBE_SEC_COMMAND_CLASS_NOT_SUPPORTED = 0x01, - SBE_SEC_COMMAND_NOT_SUPPORTED = 0x02, - SBE_SEC_INVALID_ADDRESS_PASSED = 0x03, - SBE_SEC_INVALID_TARGET_TYPE_PASSED = 0x04, - SBE_SEC_INVALID_TARGET_ID_PASSED = 0x05, - SBE_SEC_SPECIFIED_TARGET_NOT_PRESENT = 0x06, - SBE_SEC_SPECIFIED_TARGET_NOT_FUNCTIONAL = 0x07, - SBE_SEC_COMMAND_NOT_ALLOWED_IN_THIS_STATE = 0x08, - SBE_SEC_FUNCTIONALITY_NOT_SUPPORTED = 0x09, - SBE_SEC_GENERIC_FAILURE_IN_EXECUTION = 0x0A, - SBE_SEC_BACKLISTED_ACCESS = 0x0B, - SBE_SEC_OS_FAILURE = 0x0C, - SBE_SEC_HOST_MBX_REG_ACCESS_FAILURE = 0x0D, - SBE_SEC_INSUFFICIENT_DATA_PASSED = 0x0E, - SBE_SEC_EXCESS_DATA_PASSED = 0x0F, - SBE_SEC_SBE_BUSY_TO_HANDLE_COMMAND = 0x10, - SBE_SEC_MEM_REGION_NOT_FOUND = 0x11, - SBE_SEC_EXCEEDED_MAX_NUM_MEM_REGIONS = 0x12, - }; enum SBE_TARGET_TYPES { diff --git a/src/include/usr/sbeio/sbe_sp_intf.H b/src/include/usr/sbeio/sbe_sp_intf.H old mode 100755 new mode 100644 index 8ed182a46..fe5fa9981 --- a/src/include/usr/sbeio/sbe_sp_intf.H +++ b/src/include/usr/sbeio/sbe_sp_intf.H @@ -177,8 +177,9 @@ enum sbePrimResponse SBE_PRI_OPERATION_SUCCESSFUL = 0x00, SBE_PRI_INVALID_COMMAND = 0x01, SBE_PRI_INVALID_DATA = 0x02, - SBE_PRI_SEQUENCE_ERROR = 0x03, + SBE_PRI_USER_ERROR = 0x03, SBE_PRI_INTERNAL_ERROR = 0x04, + SBE_PRI_UNSECURE_ACCESS_DENIED = 0x05, SBE_PRI_GENERIC_EXECUTION_FAILURE = 0xFE, }; @@ -195,13 +196,13 @@ enum sbeSecondaryResponse SBE_SEC_COMMAND_NOT_SUPPORTED = 0x02, SBE_SEC_INVALID_ADDRESS_PASSED = 0x03, SBE_SEC_INVALID_TARGET_TYPE_PASSED = 0x04, - SBE_SEC_INVALID_TARGET_ID_PASSED = 0x05, + SBE_SEC_INVALID_CHIPLET_ID_PASSED = 0x05, SBE_SEC_SPECIFIED_TARGET_NOT_PRESENT = 0x06, SBE_SEC_SPECIFIED_TARGET_NOT_FUNCTIONAL = 0x07, SBE_SEC_COMMAND_NOT_ALLOWED_IN_THIS_STATE = 0x08, SBE_SEC_FUNCTIONALITY_NOT_SUPPORTED = 0x09, SBE_SEC_GENERIC_FAILURE_IN_EXECUTION = 0x0A, - SBE_SEC_SECURITY_VALIDATION_FAILED = 0x0B, + SBE_SEC_BLACKLISTED_REG_ACCESS = 0x0B, SBE_SEC_OS_FAILURE = 0x0C, SBE_SEC_FIFO_ACCESS_FAILURE = 0x0D, SBE_SEC_UNEXPECTED_EOT_INSUFFICIENT_DATA = 0x0E, @@ -210,6 +211,11 @@ enum sbeSecondaryResponse SBE_SEC_PCB_PIB_ERR = 0x11, SBE_SEC_FIFO_PARITY_ERROR = 0x12, SBE_SEC_TIMER_ALREADY_STARTED = 0x13, + SBE_SEC_BLACKLISTED_MEM_ACCESS = 0x14, + SBE_SEC_MEM_REGION_NOT_FOUND = 0x15, + SBE_SEC_MAXIMUM_MEM_REGION_EXCEEDED = 0x16, + SBE_SEC_MEM_REGION_AMEND_ATTEMPTED = 0x17, + SBE_SEC_INPUT_BUFFER_OVERFLOW = 0x18, }; /** @@ -293,6 +299,7 @@ enum sbeMemoryAccessFlags SBE_MEM_ACCESS_FLAGS_FAST_MODE_ON = 0x0020, SBE_MEM_ACCESS_FLAGS_LCO_ENABLED = 0x0040, //required only in PBA-PUT SBE_MEM_ACCESS_FLAGS_CACHE_INHIBIT = 0x0080, //required in I/O oper ADU + SBE_MEM_ACCESS_FLAGS_HOST_PASS_THROUGH = 0x0100, // Host pass through mode (PBA) SBE_MEM_ACCESS_FLAGS_INJECT_ON = 0x0200, // Inject mode ( PBA put ) }; @@ -472,6 +479,8 @@ typedef enum SBE_RING_MODE_SET_PULSE_ALL = 0x0010, ///< Set pulse with pulse /// to all hold types SBE_RING_MODE_FASTARRAY = 0x0020, //Fast array mode + + SBE_RING_MODE_APPLY_OVERRIDE = 0x0040, //override mode } sbeRingAccessModes_t; // Trace array chip-op operation bitmaps diff --git a/src/include/usr/sbeio/sbeioif.H b/src/include/usr/sbeio/sbeioif.H index 6bf1568ab..3e3a3dbae 100644 --- a/src/include/usr/sbeio/sbeioif.H +++ b/src/include/usr/sbeio/sbeioif.H @@ -29,6 +29,15 @@ namespace SBEIO { + enum KeyAddrStashKeys + { + RSV_MEM_ATTR_ADDR = 0x01, //Start at non-zero + //On SBE side struct is defaulted so that + //Keys are 0xFF and Vals are 0xFFFFFFFFFFFFFFFF + //So a key w/ FF means its empty or at its default val + SBE_DEFAULT = 0xFF + }; + /** * @brief Start Deadman loop * @@ -86,16 +95,18 @@ namespace SBEIO errlHndl_t sendPsuQuiesceSbe(TARGETING::Target * i_target); /** - * @brief Sends a PSU chipOp to quiesce the SBE + * @brief Sends a PSU chipOp to stash away a key,addr pair on the SBE * - * @param[in] i_key The key used to identify what the value is - * @param[in] i_value Value that will be passed (likely an address) + * @param[in] i_key The key used to identify what the value is + * @param[in] i_value Value that will be passed (likely an address) + * @param[in] i_procChip The proc we wish to send the op to * * @return errlHndl_t Error log handle on failure. * */ errlHndl_t sendPsuStashKeyAddrRequest(const uint8_t i_key, - const uint64_t i_value); + const uint64_t i_value, + TARGETING::Target * i_procChip); /** * @brief Get SCOM via SBE FIFO -- cgit v1.2.1