summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/procedures
diff options
context:
space:
mode:
authorCHRISTINA L. GRAVES <clgraves@us.ibm.com>2015-12-03 12:56:23 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2016-01-25 05:04:35 -0600
commit573db5a166e149657397ad8988db6b0c426f4b83 (patch)
tree1b6cff8866209e022c83dddf4fd081464ab33814 /import/chips/p9/procedures
parentcd65aa2bb6d0867ae261cbb39ac694fc1a3029fc (diff)
downloadtalos-sbe-573db5a166e149657397ad8988db6b0c426f4b83.tar.gz
talos-sbe-573db5a166e149657397ad8988db6b0c426f4b83.zip
Fix for data not being written correctly and for an error Dean saw
Change-Id: I5a4a2cf34d3d6d773b983783d2cc68c2e9dd7d65 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22433 Tested-by: Jenkins Server Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23575 Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures')
-rw-r--r--import/chips/p9/procedures/hwp/nest/p9_adu_coherent_utils.C49
-rw-r--r--import/chips/p9/procedures/hwp/nest/p9_pba_coherent_utils.C4
2 files changed, 24 insertions, 29 deletions
diff --git a/import/chips/p9/procedures/hwp/nest/p9_adu_coherent_utils.C b/import/chips/p9/procedures/hwp/nest/p9_adu_coherent_utils.C
index c67574d6..705cf26e 100644
--- a/import/chips/p9/procedures/hwp/nest/p9_adu_coherent_utils.C
+++ b/import/chips/p9/procedures/hwp/nest/p9_adu_coherent_utils.C
@@ -245,35 +245,33 @@ extern "C"
{
if (i_rnw)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_TTYPE_CI_PR_RD,
- ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS>(ALTD_CMD_TTYPE_CI_PR_RD);
}
else
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_TTYPE_CI_PR_WR,
- ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS>(ALTD_CMD_TTYPE_CI_PR_WR);
}
//if tsize = 1
if (((i_flags & FLAG_SIZE) >> FLAG_SIZE_SHIFT) == 1)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_CI_TSIZE_1, ALTD_CMD_TSIZE_START_BIT,
- ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT,
+ ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_CI_TSIZE_1);
}
else if (((i_flags & FLAG_SIZE) >> FLAG_SIZE_SHIFT) == 2)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_CI_TSIZE_2, ALTD_CMD_TSIZE_START_BIT,
- ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT,
+ ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_CI_TSIZE_2);
}
else if (((i_flags & FLAG_SIZE) >> FLAG_SIZE_SHIFT) == 4)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_CI_TSIZE_4, ALTD_CMD_TSIZE_START_BIT,
- ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT,
+ ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_CI_TSIZE_4);
}
else
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_CI_TSIZE_8, ALTD_CMD_TSIZE_START_BIT,
- ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT,
+ ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_CI_TSIZE_8);
}
}
//if it's not a CI write/read
@@ -283,37 +281,31 @@ extern "C"
//set the tsize to 8
if (i_rnw)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_TTYPE_CL_DMA_RD,
- ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS);
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_DMAR_TSIZE, ALTD_CMD_TSIZE_START_BIT,
- ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS>(ALTD_CMD_TTYPE_CL_DMA_RD);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT,
+ ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_DMAR_TSIZE);
}
//if a write set pr_dma_wr
//set the tsize to 8
else
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_TTYPE_DMA_PR_WR,
- ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TTYPE_START_BIT, ALTD_CMD_TTYPE_NUM_BITS>(ALTD_CMD_TTYPE_DMA_PR_WR);
if (((i_flags & FLAG_SIZE) >> FLAG_SIZE_SHIFT) == 1)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_DMAW_TSIZE_1,
- ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_DMAW_TSIZE_1);
}
else if (((i_flags & FLAG_SIZE) >> FLAG_SIZE_SHIFT) == 2)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_DMAW_TSIZE_2,
- ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_DMAW_TSIZE_2);
}
else if (((i_flags & FLAG_SIZE) >> FLAG_SIZE_SHIFT) == 4)
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_DMAW_TSIZE_4,
- ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_DMAW_TSIZE_4);
}
else
{
- altd_cmd_reg_data.insertFromRight(ALTD_CMD_DMAW_TSIZE_8,
- ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS);
+ altd_cmd_reg_data.insertFromRight<ALTD_CMD_TSIZE_START_BIT, ALTD_CMD_TSIZE_NUM_BITS>(ALTD_CMD_DMAW_TSIZE_8);
}
}
}
@@ -373,8 +365,9 @@ extern "C"
//if we want to write the ecc data get the data
if (i_flags & FLAG_ECC)
{
- force_ecc_reg_data.insertFromRight<ALTD_DATA_TX_ECC_START_BIT, ALTD_DATA_TX_ECC_END_BIT>
- ((uint64_t)i_write_data[eccIndex]);
+ force_ecc_reg_data.insertFromRight < ALTD_DATA_TX_ECC_START_BIT,
+ (ALTD_DATA_TX_ECC_END_BIT - ALTD_DATA_TX_ECC_START_BIT) + 1 >
+ ((uint64_t)i_write_data[eccIndex]);
}
//if we want to overwrite the ecc data
diff --git a/import/chips/p9/procedures/hwp/nest/p9_pba_coherent_utils.C b/import/chips/p9/procedures/hwp/nest/p9_pba_coherent_utils.C
index 0ba136a9..0cce1bad 100644
--- a/import/chips/p9/procedures/hwp/nest/p9_pba_coherent_utils.C
+++ b/import/chips/p9/procedures/hwp/nest/p9_pba_coherent_utils.C
@@ -179,7 +179,7 @@ extern "C"
FAPI_DBG("Start");
- pba_bar_mask_data.insertFromRight<0, 63>(pba_bar_mask_attr);
+ pba_bar_mask_data.insertFromRight<0, 64>(pba_bar_mask_attr);
//write the PBA Bar Mask Register
FAPI_TRY(fapi2::putScom(i_target, PU_PBABARMSK3, pba_bar_mask_data),
@@ -352,6 +352,8 @@ extern "C"
//Perform a 128B write -- need to do 16 8B writes since it's in linear mode which can only do 8B...
for (int i = 0; i < 16; i++)
{
+ write_data = 0x0ull;
+
for (int j = 0; j < 8; j++)
{
write_data = write_data + ((uint64_t)(i_write_data[(i * 8) + j]) << (56 - (8 * j)));
OpenPOWER on IntegriCloud