diff options
author | Benjamin Weisenbeck <bweisenb@us.ibm.com> | 2016-09-07 14:38:13 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-21 10:43:45 -0400 |
commit | 1ff9bbea76be1abe3a861706aa55ad1bd873a175 (patch) | |
tree | 5e58c2ab3314d408684bae36ac53795b8bebcf8f /src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H | |
parent | 8c46cb6573e2e9009e7afdc22c2f03d9ad195409 (diff) | |
download | talos-hostboot-1ff9bbea76be1abe3a861706aa55ad1bd873a175.tar.gz talos-hostboot-1ff9bbea76be1abe3a861706aa55ad1bd873a175.zip |
PRD: Initial L3 Line Delete
This commit performs L3 line deletes by setting the
delete-on-next-ce bit.
Change-Id: I542d9527b91640902c4d62a4fb2a4a2c69313819
RTC: 155327
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29338
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29973
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/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H')
-rwxr-xr-x | src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H b/src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H new file mode 100755 index 000000000..9e23d8dc0 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H @@ -0,0 +1,103 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2013,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. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ + +#ifndef _PRDFP9EXDATABUNDLE_H +#define _PRDFP9EXDATABUNDLE_H + +/** @file prdfP9ExDataBundle.H + * @brief Contains the data bundle for a P9 Ex object. + */ + +#include <iipSystem.h> +#include <prdfExtensibleChip.H> +#include <prdfGlobal.H> +#include <prdfPlatServices.H> +#include <prdfThresholdUtils.H> +#include <prdfLineDelete.H> + +namespace PRDF +{ + +/** + * @brief The P9 EX data bundle. + */ +class P9ExDataBundle : public DataBundle +{ + public: // functions + + /** + * @brief Constructor. + * @param i_exChip The ex chip. + */ + explicit P9ExDataBundle( ExtensibleChip * i_exChip ) : + iv_L2LDCount(0), iv_L3LDCount(0), + iv_exChip(i_exChip) + { + // Set up thresholds for line deletes. + iv_L2CETable = new LineDelete::PrdfCacheCETable( + ThresholdResolution::ThresholdPolicy(PlatServices::mfgMode() ? 1 : 2, + ThresholdResolution::ONE_DAY)); + iv_L3CETable = new LineDelete::PrdfCacheCETable( + ThresholdResolution::ThresholdPolicy(PlatServices::mfgMode() ? 1 : 2, + ThresholdResolution::ONE_DAY)); + }; + + /** + * @brief Destructor. + */ + ~P9ExDataBundle() + { + delete iv_L2CETable; + delete iv_L3CETable; + }; + // Current counts for L2 line deletes. + uint8_t iv_L2LDCount; + LineDelete::PrdfCacheCETable * iv_L2CETable; + + // Current counts for L3 line deletes. + uint8_t iv_L3LDCount; + LineDelete::PrdfCacheCETable * iv_L3CETable; + + private: + ExtensibleChip * iv_exChip; ///< This ex chip + + P9ExDataBundle( const P9ExDataBundle & ); + const P9ExDataBundle & operator=( const P9ExDataBundle & ); + +}; + +/** + * @brief Wrapper function for the P9ExDataBundle. + * @param i_exChip The ex chip. + * @return This ex's data bundle. + */ +inline P9ExDataBundle * getExDataBundle( ExtensibleChip * i_exChip ) +{ + return static_cast<P9ExDataBundle *>(i_exChip->getDataBundle()); +} + +} // end namespace PRDF + +#endif /* _PRDFP9EXDATABUNDLE_H */ |