diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2016-01-22 14:57:47 -0600 |
---|---|---|
committer | Stephen Cprek <smcprek@us.ibm.com> | 2016-02-19 17:06:16 -0600 |
commit | 44a50c2446aa0dcb08eafb861198c479ec7e6773 (patch) | |
tree | 4076ef7104ab993d527553342536b427c3916ada /src/usr | |
parent | 73e01eb762929af5487463ef6b1db24a7ac9b101 (diff) | |
download | talos-hostboot-44a50c2446aa0dcb08eafb861198c479ec7e6773.tar.gz talos-hostboot-44a50c2446aa0dcb08eafb861198c479ec7e6773.zip |
PRD: Remove obsolete class HomRegisterAccessScan
Change-Id: Icd1d5b2474e74721542859e580eb50efb75ebcf4
RTC: 145128
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23540
Tested-by: Jenkins Server
Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23783
Diffstat (limited to 'src/usr')
3 files changed, 6 insertions, 233 deletions
diff --git a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C index 39334573e..7586e8a1c 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C +++ b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C @@ -361,140 +361,4 @@ uint32_t HomRegisterAccessScom::Access( BIT_STRING_CLASS & bs, return rc; } -//------------------------------------------------------------------------------ - -HomRegisterAccessScan::HomRegisterAccessScan( - TargetHandle_t i_ptargetHandle, - ScanRingField * start, ScanRingField * end ) -: MopRegisterAccess(), iv_punitHandle(i_ptargetHandle) -{ - iv_aliasIds.reserve(end-start); - while(start != end) - { - iv_aliasIds.push_back(*start); - ++start; - } -} - -//------------------------------------------------------------------------------ - -uint32_t HomRegisterAccessScan::Access(BIT_STRING_CLASS & bs, - uint64_t registerId, - Operation operation) const -{ - - uint32_t rc = SUCCESS; - errlHndl_t errH = NULL; - HUID l_chipHUID = PlatServices::getHuid(iv_punitHandle); - if(operation == MopRegisterAccess::READ) - { - if(iv_punitHandle != NULL) - { - #ifdef __HOSTBOOT_MODULE - ecmdDataBufferBase buf(bs.GetLength()); - #else - ecmdDataBuffer buf(bs.GetLength()); - #endif - - uint32_t curbit = 0; - bs.Pattern(0x00000000); // clear desination bit string - for(AliasIdList::const_iterator i = iv_aliasIds.begin(); i != iv_aliasIds.end(); ++i) - { - for(uint32_t j = 0; j != i->length; ++j) - { - if(buf.isBitSet(j)) bs.Set(j+curbit); - } - curbit += i->length; - } - } - else - { - - /*@ - * @errortype - * @subsys EPUB_FIRMWARE_SP - * @reasoncode PRDF_CODE_FAIL - * @moduleid PRDF_HOM_SCAN - * @userdata1 PRD Return code = SCR_ACCESS_FAILED - * @userdata2 The invalid ID causing the fail - * @userdata3 Code location = 0x0001 - * @devdesc Access Scan failed due to an invalid function unit - * @custDesc An internal firmware fault, read failed on hardware - * register. - * @procedure EPUB_PRC_SP_CODE - */ - // create an error log - PRDF_CREATE_ERRL(errH, - ERRL_SEV_PREDICTIVE, // error on diagnostic - ERRL_ETYPE_NOT_APPLICABLE, - SRCI_MACH_CHECK, - SRCI_NO_ATTR, - PRDF_HOM_SCAN, // module id - FSP_DEFAULT_REFCODE, // refcode What do we use??? - PRDF_CODE_FAIL, // Reason code - SCR_ACCESS_FAILED, // user data word 1 - l_chipHUID, // user data word 2 - 0x0001, // user data word 3 - 0x0000 // user data word 4 - ); - } - } - // PRD does not ever expect to write scan rings - create an error log - else - { - PRDF_ERR( "HomRegisterAccessScan::Access " - "only scan read is supported. Invalid Scan Op: 0x%.8X", operation ); - - /*@ - * @errortype - * @subsys EPUB_FIRMWARE_SP - * @reasoncode PRDF_UNSUPPORTED_SCAN_WRITE - * @moduleid PRDF_HOM_SCAN - * @userdata1 PRD Return code = SCR_ACCESS_FAILED - * @userdata2 The ID for the scan - * @userdata3 Code location = 0x0002 - * @devdesc Access Scan failed. PRD does not ever expect to write scan rings. - * @custDesc An internal firmware fault, write failed on hardware - * register. - * @procedure EPUB_PRC_SP_CODE - */ - // create an error log - PRDF_CREATE_ERRL(errH, - ERRL_SEV_PREDICTIVE, // error on diagnostic - ERRL_ETYPE_NOT_APPLICABLE, - SRCI_MACH_CHECK, - SRCI_NO_ATTR, - PRDF_HOM_SCAN, // module id - FSP_DEFAULT_REFCODE, // refcode What do we use??? - PRDF_UNSUPPORTED_SCAN_WRITE, // Reason code - SCR_ACCESS_FAILED, // user data word 1 - l_chipHUID, // user data word 2 - 0x0002, // user data word 3 - 0x0000 // user data word 4 - ); - } - if(errH) - { - rc = PRD_SCANCOM_FAILURE; - PRDF_ADD_SW_ERR(errH, rc, PRDF_HOM_SCAN, __LINE__); - PRDF_ADD_PROCEDURE_CALLOUT(errH, SRCI_PRIORITY_MED, EPUB_PRC_SP_CODE); - - bool l_isAbort = false; - PRDF_ABORTING(l_isAbort); - if (!l_isAbort) - { - PRDF_SET_ERRL_SEV(errH, ERRL_SEV_INFORMATIONAL); - PRDF_COMMIT_ERRL(errH, ERRL_ACTION_HIDDEN); - - } - else - { - delete errH; - errH = NULL; - } - } - - return rc; -} - } // End namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H index 1631aa580..d1369f5b8 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H +++ b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2002,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -221,78 +223,6 @@ struct ScanRingField uint64_t registerId; uint32_t length; }; -/** - Access Scan ring registers via the HOM - @author Doug Gilbert - @par - @code - @endcode -*/ -class HomRegisterAccessScan : public MopRegisterAccess -{ -public: - /** - Constructor - @param - @returns - @pre - @post - @see - @note - */ - HomRegisterAccessScan(TARGETING::TargetHandle_t i_ptargetHandle ,ScanRingField * start, ScanRingField * end); - inline HomRegisterAccessScan(void); - - /* - Destructor - */ - // ~HomRegisterAccessScan(); - - /** - Access the scan com register - @param BIT_STRING_CLASS - holds data read or to write - @param register address - @param [READ|WRITE] - @returns [SUCCESS|FAIL] - @pre bs.Length() must be size of register data to read/write - @post For read operation, bs is modified to reflect hardware register state - @note - */ - virtual uint32_t Access(BIT_STRING_CLASS & bs, - uint64_t registerId, - Operation operation) const; - - - /** - Get the Id(s) used to pass to access (obsolite???) - @param returnes number of targetHandle - @returns list of targetHandles - @pre none - @post none - @note Can this be removed from the framework??? - */ - inline virtual const TARGETING::TargetHandle_t * GetChipIds(int & count) const { count = 0; return NULL;} - - bool operator==(const HomRegisterAccessScan & hrm) - { - return (hrm.iv_punitHandle == iv_punitHandle); - } - -private: // functions -private: // Data - - typedef std::vector<ScanRingField> AliasIdList; - - // maybe we should store the functionalUnitPtr instead - TARGETING::TargetHandle_t iv_punitHandle; - - // list of fields to extract - AliasIdList iv_aliasIds; - -}; - - - inline HomRegisterAccessScom::HomRegisterAccessScom(TARGETING::TargetHandle_t i_ptargetHandle ) : MopRegisterAccess(), iv_ptargetHandle(i_ptargetHandle ) @@ -302,10 +232,6 @@ inline HomRegisterAccessScom::HomRegisterAccessScom() : MopRegisterAccess(), iv_ptargetHandle(NULL) {} -inline HomRegisterAccessScan::HomRegisterAccessScan() -: MopRegisterAccess(),iv_punitHandle(NULL) -{} - } // End namespace PRDF #endif /* PRDFHOMREGISTERACCESS_H */ diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C index 0d379cfb6..cc8ec8184 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2002,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -88,25 +90,6 @@ SCAN_COMM_REGISTER_CLASS & ScanFacility::GetScanCommRegister( uint64_t address, regCreated.setAccessLevel( i_regOp ); return regCreated; } -//------------------------------------------------------------------------------ - -#if 0 -SCAN_COMM_REGISTER_CLASS & ScanFacility::GetScanRingRegister( - TARGETING::TargetHandle_t i_ptargetHandle, - ScanRingField * start, - ScanRingField * end) -{ - uint32_t bitLength = 0; - for(ScanRingField * srf = start; srf != end; ++srf) - { - bitLength += srf->length; - } - HomRegisterAccessScan hra(i_ptargetHandle,start,end); - iv_scanAccessList.push_back(hra); - ScanCommRegisterChip scrKey(start->registerId,bitLength,hra); - return iv_scomRegFw.get(scrKey); -} -#endif //------------------------------------------------------------------------------ |