diff options
| author | Caleb Palmer <cnpalmer@us.ibm.com> | 2017-07-07 13:19:29 -0500 |
|---|---|---|
| committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-07-20 14:40:41 -0400 |
| commit | 7b76ce48c7189f7445669f38b6d61bbec3d294cd (patch) | |
| tree | fd0ceae237854a87baf6f524d5f2f2b1fc586280 /src/usr/diag/prdf/common/plugins | |
| parent | 76aa4662e398b137b5d775d9343d36db91622b75 (diff) | |
| download | blackbird-hostboot-7b76ce48c7189f7445669f38b6d61bbec3d294cd.tar.gz blackbird-hostboot-7b76ce48c7189f7445669f38b6d61bbec3d294cd.zip | |
PRD: Add MemDqBitmap Class
Change-Id: I0906e65ca40772063d605631b3d4f4fd246875f4
RTC: 176880
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42872
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43355
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/plugins')
| -rw-r--r-- | src/usr/diag/prdf/common/plugins/prdfParserEnums.H | 5 | ||||
| -rw-r--r-- | src/usr/diag/prdf/common/plugins/prdfParserUtils.C | 47 | ||||
| -rw-r--r-- | src/usr/diag/prdf/common/plugins/prdfParserUtils.H | 9 |
3 files changed, 58 insertions, 3 deletions
diff --git a/src/usr/diag/prdf/common/plugins/prdfParserEnums.H b/src/usr/diag/prdf/common/plugins/prdfParserEnums.H index 8d8f0c686..a496ec9d9 100644 --- a/src/usr/diag/prdf/common/plugins/prdfParserEnums.H +++ b/src/usr/diag/prdf/common/plugins/prdfParserEnums.H @@ -153,17 +153,16 @@ namespace RCE_TABLE } // namespace RCE_TABLE -/* TODO: RTC 164707 namespace DQ_BITMAP { enum { BITMAP_SIZE = 10, // 80-bit bitmap - ENTRY_SIZE = sizeof(uint8_t) + MBA_DIMMS_PER_RANK * BITMAP_SIZE, + MCA_ENTRY_SIZE = sizeof(uint8_t) + MCA_DIMMS_PER_RANK * BITMAP_SIZE, + MBA_ENTRY_SIZE = sizeof(uint8_t) + MBA_DIMMS_PER_RANK * BITMAP_SIZE, }; } // namespace DQ_BITMAP -*/ namespace CEN_SYMBOL { diff --git a/src/usr/diag/prdf/common/plugins/prdfParserUtils.C b/src/usr/diag/prdf/common/plugins/prdfParserUtils.C index 264dd38b2..949944d4c 100644 --- a/src/usr/diag/prdf/common/plugins/prdfParserUtils.C +++ b/src/usr/diag/prdf/common/plugins/prdfParserUtils.C @@ -24,6 +24,7 @@ /* IBM_PROLOG_END_TAG */ #include <prdfParserUtils.H> +#include <prdfParserEnums.H> namespace PRDF { @@ -112,6 +113,52 @@ uint8_t symbol2PortSlct<TARGETING::TYPE_MCA>( uint8_t i_symbol ) //------------------------------------------------------------------------------ template<> +uint8_t dq2Symbol<TARGETING::TYPE_MBA>( uint8_t i_dq, uint8_t i_ps ) +{ + uint8_t sym = SYMBOLS_PER_RANK; + + if ( DQS_PER_DIMM > i_dq && MAX_PORT_PER_MBA > i_ps ) + { + if ( i_dq >= 64 ) + sym = ( (3 - ((i_dq - 64) / 2)) + ((0 == i_ps) ? 4 : 0) ); + else + sym = ( ((63 - i_dq) / 2) + ((0 == i_ps) ? 32 : 0) + 8 ); + } + + return sym; +} + +//------------------------------------------------------------------------------ + +template<> +uint8_t dq2Symbol<TARGETING::TYPE_MCA>( uint8_t i_dq, uint8_t i_ps ) +{ + uint8_t symbol = SYMBOLS_PER_RANK; + + static const uint8_t dq2symbol[] = + { + 71, 70, 69, 68, 39, 38, 37, 36, // dqs 0- 7 + 67, 66, 65, 64, 35, 34, 33, 32, // dqs 8-15 + 63, 62, 61, 60, 31, 30, 29, 28, // dqs 16-23 + 59, 58, 57, 56, 27, 26, 25, 24, // dqs 24-31 + 55, 54, 53, 52, 23, 22, 21, 20, // dqs 32-39 + 51, 50, 49, 48, 19, 18, 17, 16, // dqs 40-47 + 47, 46, 45, 44, 15, 14, 13, 12, // dqs 48-55 + 43, 42, 41, 40, 11, 10, 9, 8, // dqs 56-63 + 7, 6, 5, 4, 3, 2, 1, 0, // dqs 64-71 + }; + + if ( DQS_PER_DIMM > i_dq ) + { + symbol = dq2symbol[i_dq]; + } + + return symbol; +} + +//------------------------------------------------------------------------------ + +template<> uint8_t nibble2Symbol<TARGETING::TYPE_MBA>( uint8_t i_x4Dram ) { return (MBA_NIBBLES_PER_RANK >i_x4Dram) ? (i_x4Dram *MBA_SYMBOLS_PER_NIBBLE) diff --git a/src/usr/diag/prdf/common/plugins/prdfParserUtils.H b/src/usr/diag/prdf/common/plugins/prdfParserUtils.H index 1a17c787b..97b6bc577 100644 --- a/src/usr/diag/prdf/common/plugins/prdfParserUtils.H +++ b/src/usr/diag/prdf/common/plugins/prdfParserUtils.H @@ -70,6 +70,15 @@ template<TARGETING::TYPE T> uint8_t symbol2PortSlct( uint8_t i_symbol ); /** + * @brief Find the symbol for the given DQ + * @param i_dq The chip DQ + * @param i_ps The port select. Default is 0. Only needed for MBA. + * @return The Symbol + */ +template<TARGETING::TYPE T> +uint8_t dq2Symbol( uint8_t i_dq, uint8_t i_ps = 0 ); + +/** * @brief Find the first symbol of the given x4 DRAM index * @param i_x4Dram The x4 Dram index * @return The Symbol |

