diff options
author | sachin gupta <sgupta2m@in.ibm.com> | 2013-04-24 02:42:29 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-09-11 14:40:10 -0500 |
commit | 45582a26440be119bc57606a99ee85f7f2726c31 (patch) | |
tree | f44feab84933a2a25b2cb19fa4bf0a51754038ab /src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H | |
parent | 5c3ade25a9bc86a41a4a9840202ead6ae4f3e7fc (diff) | |
download | talos-hostboot-45582a26440be119bc57606a99ee85f7f2726c31.tar.gz talos-hostboot-45582a26440be119bc57606a99ee85f7f2726c31.zip |
PRD: IPL MNFG CE support
RTC: 47290
Change-Id: I94bd86b7b902a20e4f945abbac3b5556cd07f1bc
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4187
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5974
Diffstat (limited to 'src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H')
-rwxr-xr-x | src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H new file mode 100755 index 000000000..1b77c607a --- /dev/null +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H @@ -0,0 +1,99 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMemUtils.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ + +#ifndef prdfCenMemUtils_H +#define prdfCenMemUtils_H + +/** @file prdfCenMemUtils.H + * @brief General utility functions for Centaur + */ + +//------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------ + +#include <vector> +#include <prdfCenSymbol.H> + + + +namespace PRDF +{ + +class ExtensibleChip; + +namespace MemUtils +{ + +//============================================================================== +// Constants and Enums +//============================================================================== + +/** + * @brief Lists all possible sizes for a DRAM. + * @note These values must match the defintion of MBAXCR[6:7]. They are + * important for calculations. + */ +enum DramSize +{ + SIZE_2GB = 0, + SIZE_4GB = 1, + SIZE_8GB = 2, + SIZE_16GB = 3, +}; + +//============================================================================== +// Maintenance statistics +//============================================================================== + +/** + * @brief Collects CE symbol data. + */ +struct SymbolData +{ + CenSymbol symbol; + uint8_t count; + SymbolData() : count(0) {} +}; + +typedef std::vector<SymbolData> MaintSymbols; +/** + * @brief Checks CE stats on a MBA. + * @param i_mbaChip MBA chip. + * @param o_maintStats Output vector. Contains symbols with CE count. + * @param i_rank Rank for which stat collection will be done. + * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. + */ +int32_t collectCeStats( ExtensibleChip *i_mbaChip, MaintSymbols &o_maintStats, + const CenRank & i_rank ); +/** + * @brief Gets DRAM size for an MBA. + * @param i_mbaChip MBA chip. + * @param o_size size for a DRAM. + * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. + */ +int32_t getDramSize( ExtensibleChip *i_mbaChip, uint8_t & o_size ); + +} // namespace MemUtils +} // end namespace PRDF +#endif |