diff options
| author | Doug Gilbert <dgilbert@us.ibm.com> | 2014-03-21 17:05:40 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-04-03 17:36:47 -0500 |
| commit | 9d4827735558fe03ee021afb7dacfa6ac76719bb (patch) | |
| tree | ef528a55914ce8dc17b0b83f94fc1037b525b6d5 /src/usr/scom/scom.C | |
| parent | 2cdeb532a7d25232ae2f498aa122635374ae6fb6 (diff) | |
| download | talos-hostboot-9d4827735558fe03ee021afb7dacfa6ac76719bb.tar.gz talos-hostboot-9d4827735558fe03ee021afb7dacfa6ac76719bb.zip | |
HW279456 code workaround for MBSECCQ - HB
Change-Id: Ieb10dbe271c9b0414b3147c809bc3a1a3ab2bf72
RTC: 97286
CQ: SW253664
Backport: release-fips810
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9843
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/scom/scom.C')
| -rw-r--r-- | src/usr/scom/scom.C | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/src/usr/scom/scom.C b/src/usr/scom/scom.C index 38864cbe5..0ee21d1ee 100644 --- a/src/usr/scom/scom.C +++ b/src/usr/scom/scom.C @@ -41,7 +41,6 @@ #include <xscom/piberror.H> #include <errl/errludtarget.H> - // Trace definition trace_desc_t* g_trac_scom = NULL; TRAC_INIT(&g_trac_scom, SCOM_COMP_NAME, KILOBYTE, TRACE::BUFFER_SLOW); //1K @@ -59,7 +58,7 @@ DEVICE_REGISTER_ROUTE(DeviceFW::WILDCARD, DEVICE_REGISTER_ROUTE(DeviceFW::WILDCARD, DeviceFW::SCOM, TARGETING::TYPE_MEMBUF, - scomPerformOp); + scomMemBufPerformOp); /////////////////////////////////////////////////////////////////////////////// @@ -88,6 +87,63 @@ errlHndl_t scomPerformOp(DeviceFW::OperationType i_opType, return l_err; } +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +errlHndl_t scomMemBufPerformOp(DeviceFW::OperationType i_opType, + TARGETING::Target* i_target, + void* io_buffer, + size_t& io_buflen, + int64_t i_accessType, + va_list i_args) +{ + errlHndl_t l_err = NULL; + + + uint64_t l_scomAddr = va_arg(i_args,uint64_t); + + + + l_err = checkIndirectAndDoScom(i_opType, + i_target, + io_buffer, + io_buflen, + i_accessType, + l_scomAddr); + + // Check for ATTR_CENTAUR_EC_ENABLE_RCE_WITH_OTHER_ERRORS_HW246685 + // if ATTR set and MBSECCQ being read then set bit 16 + // See RTC 97286 + // + if(!l_err && (i_opType == DeviceFW::READ)) + { + const uint64_t MBS_ECC0_MBSECCQ_0x0201144A = 0x000000000201144Aull; + const uint64_t MBS_ECC1_MBSECCQ_0x0201148A = 0x000000000201148Aull; + + uint64_t addr = l_scomAddr & 0x000000007FFFFFFFull; + if(addr == MBS_ECC0_MBSECCQ_0x0201144A || + addr == MBS_ECC1_MBSECCQ_0x0201148A) + { + uint8_t enabled = 0; + //FAPI_ATTR_GET @todo RTC 101877 - access FAPI attributes + // (ATTR_CENTAUR_EC_ENABLE_RCE_WITH_OTHER_ERRORS_HW246685, + // i_target, + // enabled); + // For now use: if ec >= 0x20 + if(i_target->getAttr<TARGETING::ATTR_EC>() >= 0x20) + { + enabled = true; + } + + if(enabled) + { + uint64_t * data = reinterpret_cast<uint64_t *>(io_buffer); + *data |= 0x0000800000000000ull; // Force on bit 16 + } + } + } + + return l_err; +} /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// |

