summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-02-06 09:49:23 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-06 17:46:04 -0600
commita2c2b1d976850d8cc58a870c4fd1316b0cf86334 (patch)
treeb22bf390cc4df6be4f18a8aba625bdb09bf22eb3
parent6454fc5ee6f30a98202f1595c458f32b26393f70 (diff)
downloadtalos-hostboot-a2c2b1d976850d8cc58a870c4fd1316b0cf86334.tar.gz
talos-hostboot-a2c2b1d976850d8cc58a870c4fd1316b0cf86334.zip
INITPROC: Hostboot SW242334 L2 FIR[14] error
Change-Id: I4e03fa34a728460949c047ffc015f8a96745fcb5 CQ:SW242334 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8618 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_image_help.C212
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_pore_table_gen_api.H5
-rw-r--r--src/usr/hwpf/hwp/dram_initialization/proc_pcie_config/proc_pcie_config.H8
3 files changed, 101 insertions, 124 deletions
diff --git a/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_image_help.C b/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_image_help.C
index 2f0e236e5..ab7020b3a 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_image_help.C
+++ b/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_image_help.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_image_help.C,v 1.59 2013/12/03 05:44:12 cmolsen Exp $
+// $Id: p8_image_help.C,v 1.60 2014/01/25 05:28:39 cmolsen Exp $
//
/*------------------------------------------------------------------------------*/
/* *! TITLE : p8_image_help.C */
@@ -59,7 +59,7 @@ int calc_ring_delta_state( const uint32_t *i_init,
uint32_t *o_delta,
const uint32_t i_ringLen )
{
- int i=0, count=0, bit=0, remainder=0, remainingBits=0;
+ int i=0, count=0, remainder=0, remainingBits=0;
uint32_t init, alter;
uint32_t mask=0;
@@ -91,13 +91,9 @@ int calc_ring_delta_state( const uint32_t *i_init,
if (remainingBits>=32)
remainingBits = remainingBits-32;
else { //If remaining bits are less than 32 bits, mask unused bits
- mask = 0;
- for (bit=0; bit<(32-remainingBits); bit++) {
- mask = mask << 1;
- mask = mask + 1;
- }
MY_DBG("remainingBits=%i<32. Padding w/zeros. True bit length unaltered. (@word count=%i)\n",remainingBits,count);
- mask = ~mask;
+ mask = BITS32(0,remainingBits); // BE mask
+ mask = myRev32(mask); // Convert to LE if on LE machine
init = init & mask;
alter = alter & mask;
remainingBits = 0;
@@ -142,10 +138,8 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
uint64_t pore_imm64b=0;
uint32_t maxWfInlineLenInWords;
PoreInlineContext ctx;
-//#ifdef IMGBUILD_PPD_WF_POLLING_PROT
uint32_t waitsScanPoll=0;
uint32_t scanRing_baseAddr_long=0;
-//#endif
maxWfInlineLenInWords = *o_wfInlineLenInWords;
@@ -164,10 +158,8 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
scanRing_baseAddr = P8_PORE_SHIFT_REG;
scanRing_poreAddr = scanRing_baseAddr;
-//#ifdef IMGBUILD_PPD_WF_POLLING_PROT
// Long (poll): 0x00039000: port 3, addr bit 16 must be set to 1 and bit 19 to 1.
scanRing_baseAddr_long = P8_PORE_SHIFT_REG | 0x00001000;
-//#endif
// Header check word for checking ring write was successful
scanRingCheckWord = P8_SCAN_CHECK_WORD;
@@ -233,8 +225,6 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
MY_DBG("count=%i rem=%i remBits=%i",count,remainder,remainingBits);
- // Read and compare init and flush values 32 bits at a time. Store delta in
- // o_delta buffer.
for (i=0; i<count; i++) {
if (i==(count-1)) {
@@ -242,7 +232,8 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
MY_DBG("Clearing any dirty bits in last WF word:\n");
MY_DBG("i_deltaRing[%i] (before) = 0x%08x\n",i,i_deltaRing[i]);
MY_DBG("remainingBits = %i\n",remainingBits);
- clear_excess_dirty_bits_mask = 0xffffffff>>(32-remainingBits);
+ clear_excess_dirty_bits_mask = BITS32(0,remainingBits); // BE mask
+ clear_excess_dirty_bits_mask = myRev32(clear_excess_dirty_bits_mask); // Convert to LE if on LE machine
i_deltaRing[i] = i_deltaRing[i]&clear_excess_dirty_bits_mask;
MY_DBG("clear_excess_dirty_bits_mask = 0x%08x\n",clear_excess_dirty_bits_mask);
MY_DBG("i_deltaRing[%i] (after) = 0x%08x\n",i,i_deltaRing[i]);
@@ -257,42 +248,37 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
if (rotateLen > 0) {
-//#ifdef IMGBUILD_PPD_WF_POLLING_PROT
if (i_ddLevel>=0x20) { // Use polling protocol.
- PoreInlineLocation srcp1=0,tgtp1=0;
-
- pore_imm64b = uint64_t(rotateLen)<<32;
- pore_STI(&ctx, scanRing_baseAddr_long, P0, pore_imm64b);
-
- waitsScanPoll = rotateLen/OVER_SAMPLING_POLL;
- if (waitsScanPoll<WAITS_POLL_MIN)
- waitsScanPoll = WAITS_POLL_MIN;
- PORE_LOCATION(&ctx, tgtp1);
- pore_WAITS(&ctx, waitsScanPoll);
- //pore_LD(&ctx, D0, GENERIC_GP1_0x00000001, P1);
- //pore_ANDI(&ctx, D0, D0, P8_SCAN_POLL_MASK_BIT15);
- pore_LDANDI(&ctx, D0, GENERIC_GP1_0x00000001, P1, P8_SCAN_POLL_MASK_BIT15);
- PORE_LOCATION(&ctx, srcp1);
- pore_BRAZ(&ctx, D0, tgtp1);
- pore_inline_branch_fixup(&ctx, srcp1, tgtp1);
- if (ctx.error > 0) {
- MY_ERR("***POLLING PROT(2) rc = %d", ctx.error);
- return ctx.error;
- }
-//#else
+ PoreInlineLocation srcp1=0,tgtp1=0;
+
+ pore_imm64b = uint64_t(rotateLen)<<32;
+ pore_STI(&ctx, scanRing_baseAddr_long, P0, pore_imm64b);
+
+ waitsScanPoll = rotateLen/OVER_SAMPLING_POLL;
+ if (waitsScanPoll<WAITS_POLL_MIN)
+ waitsScanPoll = WAITS_POLL_MIN;
+ PORE_LOCATION(&ctx, tgtp1);
+ pore_WAITS(&ctx, waitsScanPoll);
+ pore_LDANDI(&ctx, D0, GENERIC_GP1_0x00000001, P1, P8_SCAN_POLL_MASK_BIT15);
+ PORE_LOCATION(&ctx, srcp1);
+ pore_BRAZ(&ctx, D0, tgtp1);
+ pore_inline_branch_fixup(&ctx, srcp1, tgtp1);
+ if (ctx.error > 0) {
+ MY_ERR("***POLLING PROT(2) rc = %d", ctx.error);
+ return ctx.error;
+ }
}
else { // Do not use polling protocol.
- scanRing_poreAddr = scanRing_baseAddr | rotateLen;
- pore_LD(&ctx, D0, scanRing_poreAddr, P1);
- if (ctx.error > 0) {
- MY_ERR("***LD D0 rc = %d", ctx.error);
- return ctx.error;
- }
+ scanRing_poreAddr = scanRing_baseAddr | rotateLen;
+ pore_LD(&ctx, D0, scanRing_poreAddr, P1);
+ if (ctx.error > 0) {
+ MY_ERR("***LD D0 rc = %d", ctx.error);
+ return ctx.error;
+ }
}
-//#endif
} // End of if (rotateLen>0)
@@ -371,56 +357,51 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
else
rotateLen = rotateLen + remainingBits;
-//#ifdef IMGBUILD_PPD_WF_POLLING_PROT
if (i_ddLevel>=0x20) { // Use polling protocol.
- PoreInlineLocation srcp2=0,tgtp2=0;
-
- // Max rotate length is 2^20-1, i.e., data BITS(12-31)=>0x000FFFFF
- if (rotateLen>=SCAN_MAX_ROTATE_LONG) {
- MY_INF("Scanning should never be here since max possible ring length is\n");
- MY_INF("480,000 bits but MAX_LONG_ROTATE=0x%0x and rotateLen=0x%0x\n",
- SCAN_MAX_ROTATE_LONG, rotateLen);
- pore_imm64b = uint64_t(SCAN_MAX_ROTATE_LONG)<<32;
- pore_STI(&ctx, scanRing_baseAddr_long, P0, pore_imm64b);
- if (ctx.error > 0) {
- MY_ERR("***POLLING PROT(3a) rc = %d", ctx.error);
- return ctx.error;
- }
- waitsScanPoll = rotateLen/OVER_SAMPLING_POLL;
- if (waitsScanPoll<WAITS_POLL_MIN)
- waitsScanPoll = WAITS_POLL_MIN;
- PORE_LOCATION(&ctx, tgtp2);
- pore_WAITS(&ctx, waitsScanPoll);
- //pore_LD(&ctx, D0, GENERIC_GP1_0x00000001, P1);
- //pore_ANDI(&ctx, D0, D0, P8_SCAN_POLL_MASK_BIT15);
- pore_LDANDI(&ctx, D0, GENERIC_GP1_0x00000001, P1, P8_SCAN_POLL_MASK_BIT15);
- PORE_LOCATION(&ctx, srcp2);
- pore_BRAZ(&ctx, D0, tgtp2);
- pore_inline_branch_fixup(&ctx, srcp2, tgtp2);
- if (ctx.error > 0) {
- MY_ERR("***POLLING PROT(3) rc = %d", ctx.error);
- return ctx.error;
- }
- rotateLen = rotateLen - SCAN_MAX_ROTATE_LONG;
- }
+ PoreInlineLocation srcp2=0,tgtp2=0;
+
+ // Max rotate length is 2^20-1, i.e., data BITS(12-31)=>0x000FFFFF
+ if (rotateLen>=SCAN_MAX_ROTATE_LONG) {
+ MY_INF("Scanning should never be here since max possible ring length is\n");
+ MY_INF("480,000 bits but MAX_LONG_ROTATE=0x%0x and rotateLen=0x%0x\n",
+ SCAN_MAX_ROTATE_LONG, rotateLen);
+ pore_imm64b = uint64_t(SCAN_MAX_ROTATE_LONG)<<32;
+ pore_STI(&ctx, scanRing_baseAddr_long, P0, pore_imm64b);
+ if (ctx.error > 0) {
+ MY_ERR("***POLLING PROT(3a) rc = %d", ctx.error);
+ return ctx.error;
+ }
+ waitsScanPoll = rotateLen/OVER_SAMPLING_POLL;
+ if (waitsScanPoll<WAITS_POLL_MIN)
+ waitsScanPoll = WAITS_POLL_MIN;
+ PORE_LOCATION(&ctx, tgtp2);
+ pore_WAITS(&ctx, waitsScanPoll);
+ pore_LDANDI(&ctx, D0, GENERIC_GP1_0x00000001, P1, P8_SCAN_POLL_MASK_BIT15);
+ PORE_LOCATION(&ctx, srcp2);
+ pore_BRAZ(&ctx, D0, tgtp2);
+ pore_inline_branch_fixup(&ctx, srcp2, tgtp2);
+ if (ctx.error > 0) {
+ MY_ERR("***POLLING PROT(3) rc = %d", ctx.error);
+ return ctx.error;
+ }
+ rotateLen = rotateLen - SCAN_MAX_ROTATE_LONG;
+ }
}
else { // Do not use polling protocol.
-//#else
-
- if (rotateLen>i_scanMaxRotate) {
- scanRing_poreAddr = scanRing_baseAddr | i_scanMaxRotate;
- pore_LD(&ctx, D0, scanRing_poreAddr, P1);
- if (ctx.error > 0) {
- MY_ERR("***LD D0 rc = %d", ctx.error);
- return ctx.error;
+
+ if (rotateLen>i_scanMaxRotate) {
+ scanRing_poreAddr = scanRing_baseAddr | i_scanMaxRotate;
+ pore_LD(&ctx, D0, scanRing_poreAddr, P1);
+ if (ctx.error > 0) {
+ MY_ERR("***LD D0 rc = %d", ctx.error);
+ return ctx.error;
+ }
+ rotateLen = rotateLen - i_scanMaxRotate;
}
- rotateLen = rotateLen - i_scanMaxRotate;
- }
}
-//#endif
} //end of else (i_deltaRing==0)
@@ -434,45 +415,40 @@ int create_wiggle_flip_prg( uint32_t *i_deltaRing, // scan ring delta s
// If the scan ring has not been rotated to the original position
// shift the ring by remaining shift bit length.
if (rotateLen>0) {
-//#ifdef IMGBUILD_PPD_WF_POLLING_PROT
if (i_ddLevel>=0x20) { // Use polling protocol.
- PoreInlineLocation srcp3=0,tgtp3=0;
-
- pore_imm64b = uint64_t(rotateLen)<<32;
- pore_STI(&ctx, scanRing_baseAddr_long, P0, pore_imm64b);
-
- waitsScanPoll = rotateLen/OVER_SAMPLING_POLL;
- if (waitsScanPoll<WAITS_POLL_MIN)
- waitsScanPoll = WAITS_POLL_MIN;
- PORE_LOCATION(&ctx, tgtp3);
- pore_WAITS(&ctx, waitsScanPoll);
- //pore_LD(&ctx, D0, GENERIC_GP1_0x00000001, P1);
- //pore_ANDI(&ctx, D0, D0, P8_SCAN_POLL_MASK_BIT15);
- pore_LDANDI(&ctx, D0, GENERIC_GP1_0x00000001, P1, P8_SCAN_POLL_MASK_BIT15);
- PORE_LOCATION(&ctx, srcp3);
- pore_BRAZ(&ctx, D0, tgtp3);
- pore_inline_branch_fixup(&ctx, srcp3, tgtp3);
- if (ctx.error > 0) {
- MY_ERR("***POLLING PROT(4) rc = %d", ctx.error);
- return ctx.error;
- }
- rotateLen=0;
+ PoreInlineLocation srcp3=0,tgtp3=0;
+
+ pore_imm64b = uint64_t(rotateLen)<<32;
+ pore_STI(&ctx, scanRing_baseAddr_long, P0, pore_imm64b);
+
+ waitsScanPoll = rotateLen/OVER_SAMPLING_POLL;
+ if (waitsScanPoll<WAITS_POLL_MIN)
+ waitsScanPoll = WAITS_POLL_MIN;
+ PORE_LOCATION(&ctx, tgtp3);
+ pore_WAITS(&ctx, waitsScanPoll);
+ pore_LDANDI(&ctx, D0, GENERIC_GP1_0x00000001, P1, P8_SCAN_POLL_MASK_BIT15);
+ PORE_LOCATION(&ctx, srcp3);
+ pore_BRAZ(&ctx, D0, tgtp3);
+ pore_inline_branch_fixup(&ctx, srcp3, tgtp3);
+ if (ctx.error > 0) {
+ MY_ERR("***POLLING PROT(4) rc = %d", ctx.error);
+ return ctx.error;
+ }
+ rotateLen=0;
}
else { // Do not use polling protocol.
-//#else
- scanRing_poreAddr=scanRing_baseAddr | rotateLen;
- pore_LD(&ctx, D0, scanRing_poreAddr, P1);
- if (ctx.error > 0) {
- MY_ERR("***LD D0 rc = %d", ctx.error);
- return ctx.error;
- }
- rotateLen=0;
+ scanRing_poreAddr=scanRing_baseAddr | rotateLen;
+ pore_LD(&ctx, D0, scanRing_poreAddr, P1);
+ if (ctx.error > 0) {
+ MY_ERR("***LD D0 rc = %d", ctx.error);
+ return ctx.error;
+ }
+ rotateLen=0;
}
-//#endif
}
// Finally, check that our header check word went through in one piece.
diff --git a/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_pore_table_gen_api.H b/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_pore_table_gen_api.H
index f876c6ace..f5a3920ef 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_pore_table_gen_api.H
+++ b/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_pore_table_gen_api.H
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_pore_table_gen_api.H,v 1.23 2014/01/06 13:53:19 cmolsen Exp $
+// $Id: p8_pore_table_gen_api.H,v 1.24 2014/01/25 05:29:19 cmolsen Exp $
/*------------------------------------------------------------------------------*/
/* *! (C) Copyright International Business Machines Corp. 2012 */
/* *! All Rights Reserved -- Property of IBM */
@@ -167,7 +167,8 @@ CONST_UINT64_T( SCRATCH0_RESET_VALUE, (0xABBA99EBBA33DADA) );
//#include <pore_bitmanip.H>
// Defining local versions of BITS and BIT
// Create a multi-bit mask of \a n bits starting at bit \a b
-#define BITS(b, n) ((ULL(0xffffffffffffffff) << (64 - (n))) >> (b))
+#define BITS(b, n) ((ULL(0xffffffffffffffff) << (64 - (n))) >> (b))
+#define BITS32(b,n) (uint32_t)((ULL(0xffffffff) << (32 - (n))) >> (b))
// Create a single bit mask at bit \a b
#define BIT(b) BITS((b), 1)
diff --git a/src/usr/hwpf/hwp/dram_initialization/proc_pcie_config/proc_pcie_config.H b/src/usr/hwpf/hwp/dram_initialization/proc_pcie_config/proc_pcie_config.H
index 5b11073ca..9d68d1c47 100644
--- a/src/usr/hwpf/hwp/dram_initialization/proc_pcie_config/proc_pcie_config.H
+++ b/src/usr/hwpf/hwp/dram_initialization/proc_pcie_config/proc_pcie_config.H
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: proc_pcie_config.H,v 1.2 2014/01/13 18:21:59 jmcgill Exp $
+// $Id: proc_pcie_config.H,v 1.4 2014/02/03 15:58:53 jmcgill Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_pcie_config.H,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2012
@@ -45,7 +45,7 @@
// Includes
//------------------------------------------------------------------------------
#include <fapi.H>
-#include "p8_scom_addresses.H"
+#include <p8_scom_addresses.H>
//------------------------------------------------------------------------------
// Constant definitions
@@ -92,8 +92,8 @@ const uint32_t PROC_PCIE_CONFIG_PCIE_NEST_FIR_MASK[PROC_PCIE_CONFIG_NUM_PHB] =
PCIE2_FIR_MASK_0x02012803
};
-const uint64_t PROC_PCIE_CONFIG_PCIE_NEST_FIR_ACTION0_VAL = 0x5B8F819000000000ULL;
-const uint64_t PROC_PCIE_CONFIG_PCIE_NEST_FIR_ACTION1_VAL = 0x7F8F819000000000ULL;
+const uint64_t PROC_PCIE_CONFIG_PCIE_NEST_FIR_ACTION0_VAL = 0x5B0F819000000000ULL;
+const uint64_t PROC_PCIE_CONFIG_PCIE_NEST_FIR_ACTION1_VAL = 0x7F0F819000000000ULL;
const uint64_t PROC_PCIE_CONFIG_PCIE_NEST_FIR_MASK_VAL = 0x0030006E00000000ULL;
OpenPOWER on IntegriCloud