Skip to content

Commit

Permalink
Update RAS DQ Inject tool with new MCHP squence
Browse files Browse the repository at this point in the history
Change-Id: I6879b8c200428c0e67ab8653d4572376542689c7
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/92260
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/92270
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
  • Loading branch information
markypizz authored and crgeddes committed Mar 25, 2020
1 parent 28614a1 commit ba56009
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -3146,7 +3146,19 @@ static const uint64_t EXP_DDR4_PHY_DBYTE9_RXPBDLYTG3_R6 = 0x040659acull;
static const uint64_t EXP_DDR4_PHY_DBYTE9_RXPBDLYTG3_R7 = 0x04065dacull;
static const uint64_t EXP_DDR4_PHY_DBYTE9_RXPBDLYTG3_R8 = 0x040661acull;
static const uint64_t EXPLR_TP_MB_UNIT_TOP_TR1_TRACE_TRCTRL_CONFIG = 0x08010442ull;
static const uint64_t EXP_APBONLY0_MICROCONTMUXSEL = 0x04340000ull;

static const uint64_t EXP_APBONLY0_MICROCONTMUXSEL = 0x04340000ull;
static const uint64_t EXP_DDR4_PHY_DBYTE0_DQDQSRCVCNTRL1 = 0x04040128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE1_DQDQSRCVCNTRL1 = 0x04044128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE2_DQDQSRCVCNTRL1 = 0x04048128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE3_DQDQSRCVCNTRL1 = 0x0404C128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE4_DQDQSRCVCNTRL1 = 0x04050128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE5_DQDQSRCVCNTRL1 = 0x04054128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE6_DQDQSRCVCNTRL1 = 0x04058128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE7_DQDQSRCVCNTRL1 = 0x0405C128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE8_DQDQSRCVCNTRL1 = 0x04060128ull;
static const uint64_t EXP_DDR4_PHY_DBYTE9_DQDQSRCVCNTRL1 = 0x04064128ull;

static const uint64_t EXP_DDR4_PHY_DBYTE0_VREFDAC0_R0 = 0x4040100ull;
static const uint64_t EXP_DDR4_PHY_DBYTE0_VREFDAC0_R1 = 0x4040500ull;
static const uint64_t EXP_DDR4_PHY_DBYTE0_VREFDAC0_R2 = 0x4040900ull;
Expand Down
37 changes: 33 additions & 4 deletions src/import/hwpf/fapi2/include/variable_buffer.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* Contributors Listed Below - COPYRIGHT 2015,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -466,6 +466,25 @@ class variable_buffer
return rc;
}

///
/// @brief Write a bit in variable buffer to a given value
/// @param[in] i_value the value to write
/// @param[in] i_bit the bit number to set.
/// @param[in] i_count the count of bits to set, defaults to 1
/// @return FAPI2_RC_SUCCESS if OK
///
inline fapi2::ReturnCodes writeBit(const bool i_value,
const bits_type& i_bit,
const bits_type& i_count = 1)
{
if(i_value == 0)
{
return clearBit(i_bit, i_count);
}

return setBit(i_bit, i_count);
}

///
/// @brief invert a bit or range of bits in a buffer
/// @tparam SB Start bit in buffer to invert.
Expand Down Expand Up @@ -507,9 +526,6 @@ class variable_buffer
/// @brief Get the value of a bit in the buffer
/// @tparam B Bit in buffer to get.
/// @return true/1 if bit is on, false/0 if bit is off
/// @note Asserting that all the parameters are known at
/// compile time so this can be templated only. If that is not
/// the case we can add a function parameter version.
///
template< bits_type B >
inline bool getBit(void) const
Expand All @@ -520,6 +536,19 @@ class variable_buffer
return iv_data[index] & mask;
}

///
/// @brief Get the value of a bit in the buffer (function parameter version)
/// @param[in] i_bit bit to check
/// @return true/1 if bit is on, false/0 if bit is off
///
inline bool getBit(bits_type i_bit) const
{
const bits_type index = i_bit / bits_per_unit;
const unit_type mask = unit_type(1) <<
((bits_per_unit - 1) - (i_bit - (index * bits_per_unit)));
return iv_data[index] & mask;
}

///
/// @brief Test if multiple bits are set
/// @param SB Start bit in buffer to test.
Expand Down

0 comments on commit ba56009

Please sign in to comment.