diff options
author | spashabk-in <shakeebbk@in.ibm.com> | 2018-04-25 04:10:36 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2018-05-15 02:15:20 -0400 |
commit | e3dd8facc038086da5224f60d3bf3f57d82da8f6 (patch) | |
tree | 5b2072963af5901872b9061b281e74f5f8ef15d9 /src/sbefw | |
parent | af40291dc92d9e67173b7d538cb580c4aa557fee (diff) | |
download | talos-sbe-e3dd8facc038086da5224f60d3bf3f57d82da8f6.tar.gz talos-sbe-e3dd8facc038086da5224f60d3bf3f57d82da8f6.zip |
Fence all chip-ops in QUIESCE state
Change-Id: I42ffb9db5503ad36636a989d54041220e159e6fc
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57793
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/sbefw')
-rw-r--r-- | src/sbefw/core/chipop_handler.C | 8 | ||||
-rw-r--r-- | src/sbefw/core/sbecmdprocessor.C | 4 | ||||
-rw-r--r-- | src/sbefw/core/sbecmdreceiver.C | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/sbefw/core/chipop_handler.C b/src/sbefw/core/chipop_handler.C index b2ae4991..0044d370 100644 --- a/src/sbefw/core/chipop_handler.C +++ b/src/sbefw/core/chipop_handler.C @@ -6,6 +6,7 @@ /* OpenPOWER sbe Project */ /* */ /* Contributors Listed Below - COPYRIGHT 2017,2018 */ +/* [+] International Business Machines Corp. */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -189,8 +190,8 @@ sbeChipOpRc_t sbeIsCmdAllowed (const uint8_t i_cmdClass, case SBE_STATE_QUIESCE: { - l_ret = ((l_pCmd->cmd_state_fence & - SBE_FENCE_AT_QUIESCE)? false:true); + // fence off all the chip-ops in quiesce state + l_ret = false; break; } @@ -206,7 +207,8 @@ sbeChipOpRc_t sbeIsCmdAllowed (const uint8_t i_cmdClass, } // Check if the command is allowed in current security mode if((SBE_GLOBAL->sbeFWSecurityEnabled) - && (SBE_FENCE_AT_SECURE_MODE & l_pCmd->cmd_state_fence)) + && (SBE_FENCE_AT_SECURE_MODE & l_pCmd->cmd_state_fence) + && (!SBE::isSimicsRunning())) { retRc.primStatus = SBE_PRI_UNSECURE_ACCESS_DENIED; retRc.secStatus = SBE_SEC_BLACKLISTED_CHIPOP_ACCESS; diff --git a/src/sbefw/core/sbecmdprocessor.C b/src/sbefw/core/sbecmdprocessor.C index a70bb4eb..9dda2164 100644 --- a/src/sbefw/core/sbecmdprocessor.C +++ b/src/sbefw/core/sbecmdprocessor.C @@ -145,6 +145,10 @@ void sbeHandleFifoResponse (const uint32_t i_rc) { l_primStatus = SBE_PRI_INVALID_DATA; } + else if (i_rc == SBE_SEC_COMMAND_NOT_ALLOWED_IN_THIS_STATE) + { + l_primStatus = SBE_PRI_INVALID_COMMAND; + } uint32_t l_len2dequeue = 0; sbeRespGenHdr_t l_hdr; diff --git a/src/sbefw/core/sbecmdreceiver.C b/src/sbefw/core/sbecmdreceiver.C index 6ed11c37..430830e2 100644 --- a/src/sbefw/core/sbecmdreceiver.C +++ b/src/sbefw/core/sbecmdreceiver.C @@ -223,7 +223,7 @@ void sbeCommandReceiver_routine(void *i_pArg) // of command, but there might be contention on the response sent // over FIFO/Mailbox usage. sbeChipOpRc_t cmdAllowedStatus = sbeIsCmdAllowed(l_cmdClass, l_command); - if( !cmdAllowedStatus.success() && !SBE::isSimicsRunning() ) + if( !cmdAllowedStatus.success() ) { SBE_ERROR("Chip-Op CmdClass[0x%02X] Cmd[0x%02X] not allowed " "secondary status[0x%04X] State - [0x%02X]", |