diff options
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/spd')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.C | 44 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.H | 37 |
2 files changed, 64 insertions, 17 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.C b/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.C index e7d32d454..6d6fcf445 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.C @@ -47,23 +47,6 @@ namespace mss namespace rcd01 { -enum raw_card_rev : uint8_t -{ - // TODO RTC:160116 Fill in valid RCD data for LRDIMM - B0 = 0x01, - - // RDIMM power-on - C1 = 0x22, - - // TK - Change to 0xFF - AAM - // In the spec hex XF (where X - don't care) - // means no JEDEC reference raw card design used. - // We will want to redefine it to be VBU reference raw card - // since it is unlikely we will use a DIMM w/o a - // reference caw card design. - VBU = 0x23, -}; - /// /// @brief raw card B0 settings /// @@ -112,6 +95,29 @@ raw_card_t raw_card_c1( 0x00, // RC00 0x07);// RCBX /// +/// @brief raw card A1 settings +/// +raw_card_t raw_card_a1( 0x00, // RC00 + 0x00, // RC01 (C might be the right answer?) + 0x00, // RC02 + 0x0F, // RC06_07 + 0x03, // RC08 + 0x00, // RC09 + 0x0E, // RC0B + 0x00, // RC0C + 0x0D, // RC0E + 0x00, // RC0F + 0x00, // RC1X + 0x00, // RC2X + 0x00, // RC4X + 0x00, // RC5X + 0x00, // RC6X + 0x00, // RC8X + 0x00, // RC9X + 0x00, // RCAX + 0x07);// RCBX + +/// /// @brief raw card VBU settings /// raw_card_t raw_card_vbu( 0x00, // RC00 @@ -138,9 +144,13 @@ raw_card_t raw_card_vbu( 0x00, // RC00 // TODO - RTC:160121 Catch all for adding raw card data for DIMMs // Not sure if we can have the same raw card revision for rcd01 and rcd02, // if not, then we can move this vector outside of the rcd01 namespace. +// +// !! WARNING: THIS VECTOR MUST BE SORTED BY ENUM VALUE!! +// const std::vector< std::pair< uint8_t , rcd01::raw_card_t> > RAW_CARDS = { {raw_card_rev::B0, rcd01::raw_card_b0}, + {raw_card_rev::A1, rcd01::raw_card_a1}, {raw_card_rev::C1, rcd01::raw_card_c1}, {raw_card_rev::VBU, rcd01::raw_card_vbu}, }; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.H b/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.H index a32fa3534..df0fc9d85 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/spd/common/raw_cards.H @@ -44,6 +44,26 @@ namespace mss namespace rcd01 { +// In the order of the vector below which needs to be sorted by enum value +enum raw_card_rev : uint8_t +{ + // TODO RTC:160116 Fill in valid RCD data for LRDIMM + B0 = 0x01, + + A1 = 0x20, + + // RDIMM power-on + C1 = 0x22, + + // TK - Change to 0xFF - AAM + // In the spec hex XF (where X - don't care) + // means no JEDEC reference raw card design used. + // We will want to redefine it to be VBU reference raw card + // since it is unlikely we will use a DIMM w/o a + // reference caw card design. + VBU = 0x23, +}; + /// /// @brief raw card VBU settings /// @note contains RCD settings for hard-coded values @@ -77,6 +97,17 @@ struct raw_card_t raw_card_t() = default; /// + /// @brief Equality operator + /// @param[in] i_rhs the right-hand side of the == operation + /// @return true iff both raw_cards are equal + /// + inline bool operator==(const raw_card_t& i_rhs) const + { + // Betting this is faster than all the conditionals ... + return (memcmp(this, &i_rhs, sizeof(raw_card_t)) == 0); + } + + /// /// @brief ctor /// @param[in] i_rc00 setting for register control word (RC00) /// @param[in] i_rc01 setting for register control word (RC01) @@ -144,6 +175,12 @@ struct raw_card_t ~raw_card_t() = default; }; +// Exposed so we can test them. +extern raw_card_t raw_card_b0; +extern raw_card_t raw_card_c1; +extern raw_card_t raw_card_a1; +extern raw_card_t raw_card_vbu; + extern const std::vector< std::pair< uint8_t, rcd01::raw_card_t> > RAW_CARDS; }// rcd01 |