diff options
author | Thi Tran <thi@us.ibm.com> | 2018-01-29 20:56:41 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-02-03 19:48:04 -0500 |
commit | 53b3c1f1d859cb5a6b03060b46933d4ac049ca83 (patch) | |
tree | b97feb581ebce9cd0b4156315c16bc4de8660517 /src/usr/sbeio/sbe_fifodd.H | |
parent | 07c9730e0a3ff5bf6ca59b09fc91da69ac4c9753 (diff) | |
download | talos-hostboot-53b3c1f1d859cb5a6b03060b46933d4ac049ca83.tar.gz talos-hostboot-53b3c1f1d859cb5a6b03060b46933d4ac049ca83.zip |
HB supports - Use ADU chipops to switch fabric configuration
Change-Id: I090cdac654d9c6efbe30748713687c6e36ff914d
RTC:177597
CQ:SW413432
Backport: release-fips910
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52878
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/sbeio/sbe_fifodd.H')
-rw-r--r-- | src/usr/sbeio/sbe_fifodd.H | 111 |
1 files changed, 69 insertions, 42 deletions
diff --git a/src/usr/sbeio/sbe_fifodd.H b/src/usr/sbeio/sbe_fifodd.H index 9bae59d91..837031b35 100644 --- a/src/usr/sbeio/sbe_fifodd.H +++ b/src/usr/sbeio/sbe_fifodd.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -93,21 +93,32 @@ class SbeFifo }; /** - * @brief enums for FIFO Generic Messages - */ - enum fifoGenericMessage + * @brief enums for FIFO MEMORY ACCESS Messages + */ + enum fifoMemoryAccessMessage { - SBE_FIFO_CMD_GET_SBE_FFDC = 0x01, + SBE_FIFO_CMD_GETMEM = 0x01, + SBE_FIFO_CMD_PUTMEM = 0x02, + /** + * Command buffer layout (6 32-bit words) + * | Length | + * | reserved | reserved | 0xA4 | 0x02 | + * | Chiplet Id | ECC override | Flags | + * | Address 0:31 | + * | Address 32:63 | + * | Length of data (in bytes) | + * | Data.... | + **/ + PUTMEM_CMD_BUF_LEN_IN_WORDS = 6, + BYTES_PER_WORD = 4, }; /** - * @brief enums for FIFO SECURE HWP Messages + * @brief enums for FIFO Generic Messages */ - enum fifoSecureHwpMessage + enum fifoGenericMessage { - //Replace this when we add real hwp support - SBE_FIFO_CMD_PLACEHOLDER_HWP = 0x00, - SBE_FIFO_CMD_UNSUPPORTED_HWP = 0xFF, + SBE_FIFO_CMD_GET_SBE_FFDC = 0x01, }; /** @@ -121,47 +132,48 @@ class SbeFifo }; /** - * @brief enums used by secureHwp requests - */ - enum secureHwpDefines - { - REQUEST_SIZE_WITHOUT_DATA = 19, - BYTES_PER_WORD = 4, - }; - - /** - * @brief Struct for FIFO Secure Hwp request + * @brief Struct for FIFO PutMem request * */ - struct fifoSecureHwpRequest + struct fifoPutMemRequest { + // Note: + // The SBE putMem command used in HB is not a 'real' putMem command. + // It is used to tell SBE to run part of existing HWPs, via the flag + // settings in order to avoid creating new SBE chip-op. + // Therefore, coreChipletId and ECC_override are not used + // and default to 0. + // This is done so that HB doesn't invoke ADU SMP HWPs that access + // black-listed registers as part of Secure boot work. uint32_t wordCnt; uint16_t reserved; uint8_t commandClass; uint8_t command; - uint16_t targetType; - uint8_t chipletId; - uint8_t * dataPtr; - fifoSecureHwpRequest(uint64_t i_dataSizeBytes, - uint8_t * i_dataPtr) : - reserved(0), commandClass(SBE_FIFO_CLASS_SECURE_HWP), command(0), targetType(0), chipletId(0) + uint8_t coreChipletId; + uint8_t ECC_override; + uint16_t flags; + uint32_t address[2]; // address[0] = Address bits 0:31 + // address[1] = Address bits 32:63 + uint32_t dataLen; + uint32_t *dataPtr; + + fifoPutMemRequest() : + wordCnt(0), + reserved(0), + commandClass(SBE_FIFO_CLASS_MEMORY_ACCESS), + command(SBE_FIFO_CMD_PUTMEM), + coreChipletId(0), + ECC_override(0), + flags(0), + dataLen(0), + dataPtr(NULL) { - //Determine if we need to round up to next word - uint8_t needsRound = (REQUEST_SIZE_WITHOUT_DATA + i_dataSizeBytes) % BYTES_PER_WORD; - wordCnt = ( (REQUEST_SIZE_WITHOUT_DATA + i_dataSizeBytes) / BYTES_PER_WORD); - if(needsRound) - { - wordCnt++; - } - dataPtr = reinterpret_cast<uint8_t *>(malloc(i_dataSizeBytes)); - memcpy(dataPtr, i_dataPtr, i_dataSizeBytes); + address[0] = 0; + address[1] = 0; } - ~fifoSecureHwpRequest(){ free(dataPtr);}; - - private: - fifoSecureHwpRequest(){}; - fifoSecureHwpRequest(const fifoSecureHwpRequest&); - fifoSecureHwpRequest& operator=(const fifoSecureHwpRequest&); + ~fifoPutMemRequest() + { + }; } PACKED; /** @@ -316,6 +328,21 @@ class SbeFifo } PACKED; /** + * @brief Struct for FIFO PutMem response + * + * The actual number of returned words varies based on whether there was + * an error. + */ + struct fifoPutMemResponse + { + uint32_t len_written; // Length of Mainstore Data actually written in bytes ( includes ECC and TAG ) + statusHeader status; + struct fapi2::ffdc_struct ffdc; // ffdc data + uint32_t status_distance; // distance to status + fifoPutMemResponse() {} + } PACKED; + + /** * @brief Struct for FIFO Put SCOM and Put SCOM under mask response * * The actual number of returned words varies based on whether there was |