summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-08-06 08:41:35 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-08-19 22:24:57 -0500
commit5675c7315db0c79fa464149ea38cde09f3195130 (patch)
tree0245f5a028edc609a5b9e0e6bf76203319189daa /src
parent207de5cbd30e805f2f15dc9f2f4bc7e63e774796 (diff)
downloadtalos-hostboot-5675c7315db0c79fa464149ea38cde09f3195130.tar.gz
talos-hostboot-5675c7315db0c79fa464149ea38cde09f3195130.zip
Add flag to HWAS Callout for SMP repair indicator
Used one of the reserved bytes of the callout structure to hold a flag that will indicate if the SMP bus being called out is completely down, and thus eligible for concurrent repair. Change-Id: I299e3393529e811aa006a087de51165b79038201 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63946 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/errl/errlentry.H8
-rw-r--r--src/include/usr/errl/errludcallout.H4
-rw-r--r--src/include/usr/hwas/common/hwasCallout.H33
-rw-r--r--src/usr/errl/errlentry.C11
-rw-r--r--src/usr/errl/errludcallout.C4
-rw-r--r--src/usr/errl/plugins/errludcallout.H11
-rw-r--r--src/usr/hwas/common/hwasCallout.C3
7 files changed, 61 insertions, 13 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 677bf06de..2d36218ae 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -548,13 +548,15 @@ public:
* @param[in] i_target2 The hardware bus endpoint target2
* @param[in] i_busType The hardware bus type
* @param[in] i_priority Priority of the callout
+ * @param[in] i_flag Extra flag for callout structure
*
* @return void
*/
void addBusCallout(const TARGETING::Target *i_target1,
const TARGETING::Target *i_target2,
const HWAS::busTypeEnum i_busType,
- const HWAS::callOutPriority i_priority);
+ const HWAS::callOutPriority i_priority,
+ const HWAS::CalloutFlag_t i_flags = HWAS::FLAG_NONE);
/**
* @brief Add a bus callout with entity paths
@@ -563,13 +565,15 @@ public:
* @param[in] i_target2 The PHYS_PATH of HW bus endpoint target2
* @param[in] i_busType The hardware bus type
* @param[in] i_priority Priority of the callout
+ * @param[in] i_flag Extra flag for callout structure
*
* @return void
*/
void addBusCallout(const TARGETING::EntityPath & i_target1,
const TARGETING::EntityPath & i_target2,
HWAS::busTypeEnum i_busType,
- HWAS::callOutPriority i_priority);
+ HWAS::callOutPriority i_priority,
+ const HWAS::CalloutFlag_t i_flags = HWAS::FLAG_NONE);
/**
diff --git a/src/include/usr/errl/errludcallout.H b/src/include/usr/errl/errludcallout.H
index 9d6acba9f..0f1e4c66a 100644
--- a/src/include/usr/errl/errludcallout.H
+++ b/src/include/usr/errl/errludcallout.H
@@ -115,6 +115,7 @@ private:
* @param[in] i_target2DataLength length of i_pTarget2Data
* @param[in] i_busType bus type Enum
* @param[in] i_priority Priority of the callout
+ * @param[in] i_flag Extra flag for callout structure
*
* @return void
*/
@@ -124,7 +125,8 @@ private:
const void *i_pTarget2Data,
uint32_t i_target2DataLength,
const HWAS::busTypeEnum i_busType,
- const HWAS::callOutPriority i_priority);
+ const HWAS::callOutPriority i_priority,
+ const HWAS::CalloutFlag_t i_flag );
/**
* @brief Construct a hardware callout user detail
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H
index 01275a012..54d3f4fd8 100644
--- a/src/include/usr/hwas/common/hwasCallout.H
+++ b/src/include/usr/hwas/common/hwasCallout.H
@@ -171,7 +171,15 @@ enum sensorTypeEnum
GPU_MEMORY_TEMP_SENSOR = 3,
};
-//
+//-- Flags
+typedef uint8_t CalloutFlag_t;
+// No extra flags are present
+const uint8_t FLAG_NONE = 0;
+// SMP link is down, therefore its pair cannot be repaired
+const uint8_t FLAG_LINK_DOWN = 1;
+
+//-- Callout types
+typedef uint8_t CalloutType_t;
const uint8_t HW_CALLOUT = 0x01;
const uint8_t PROCEDURE_CALLOUT = 0x02;
const uint8_t BUS_CALLOUT = 0x03;
@@ -182,12 +190,20 @@ const uint8_t I2C_DEVICE_CALLOUT = 0x07;
const uint8_t TARGET_IS_SENTINEL = 0xF0;
+/**
+ * @brief Defines the data layout that is passed around the code as part
+ * of en error log to specify a callout. Note that this structure
+ * is used in messages between Hostboot and FSP, and it is saved
+ * to persistent storage inside error logs. This means that the
+ * size cannot change and the fields cannot be reordered.
+ */
typedef struct callout_ud
{
- uint8_t type;
- uint8_t pad[3];
+ CalloutType_t type; //uint8_t
+ CalloutFlag_t flag; //uint8_t
+ uint8_t pad[2];
callOutPriority priority; // uint32_t
- union {
+ union { // 3 x uint32
struct { // type == HW_CALLOUT
DeconfigEnum deconfigState; // uint32_t
GARD_ErrorType gardErrorType; // uint32_t
@@ -196,9 +212,13 @@ typedef struct callout_ud
};
struct { // type == PROCEDURE_CALLOUT
epubProcedureID procedure; // uint32_t
+ // uint32 - unused
+ // uint32 - unused
};
struct { // type == BUS_CALLOUT
busTypeEnum busType; // uint32_t
+ // uint32 - unused
+ // uint32 - unused
// two Targets will follow
};
struct { // type == CLOCK_CALLOUT
@@ -216,6 +236,8 @@ typedef struct callout_ud
struct { // type == SENSOR_CALLOUT
uint32_t sensorId;
sensorTypeEnum sensorType;
+ // uint32 - unused
+ // zero Targets will follow
};
struct { // type == I2C_DEVICE_CALLOUT
uint8_t engine;
@@ -224,7 +246,8 @@ typedef struct callout_ud
// one Target will follow
};
}; // union
-} callout_ud_t;
+} __attribute__ ((packed)) callout_ud_t;
+
#ifndef PARSER
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 3d183b923..d16ba7dab 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -422,7 +422,8 @@ void ErrlEntry::addPartCallout(const TARGETING::Target *i_target,
void ErrlEntry::addBusCallout(const TARGETING::Target *i_target_endp1,
const TARGETING::Target *i_target_endp2,
const HWAS::busTypeEnum i_busType,
- const HWAS::callOutPriority i_priority)
+ const HWAS::callOutPriority i_priority,
+ const HWAS::CalloutFlag_t i_flag)
{
TRACFCOMP(g_trac_errl, ENTER_MRK"addBusCallout(%p, %p, %d, 0x%x)",
i_target_endp1, i_target_endp2, i_busType, i_priority);
@@ -439,7 +440,7 @@ void ErrlEntry::addBusCallout(const TARGETING::Target *i_target_endp1,
ErrlUserDetailsCallout( pData1, size1, pData2, size2, i_busType,
- i_priority).addToLog(this);
+ i_priority, i_flag).addToLog(this);
if( ep1 )
{
@@ -456,7 +457,8 @@ void ErrlEntry::addBusCallout(const TARGETING::Target *i_target_endp1,
void ErrlEntry::addBusCallout(const TARGETING::EntityPath & i_target_endp1,
const TARGETING::EntityPath & i_target_endp2,
const HWAS::busTypeEnum i_busType,
- const HWAS::callOutPriority i_priority)
+ const HWAS::callOutPriority i_priority,
+ const HWAS::CalloutFlag_t i_flag)
{
char * l_target_endp1_path_str = nullptr;
char * l_target_endp2_path_str = nullptr;
@@ -491,7 +493,8 @@ void ErrlEntry::addBusCallout(const TARGETING::EntityPath & i_target_endp1,
&i_target_endp2,
size2,
i_busType,
- i_priority).addToLog(this);
+ i_priority,
+ i_flag).addToLog(this);
}
else
diff --git a/src/usr/errl/errludcallout.C b/src/usr/errl/errludcallout.C
index 3e8c0b522..0ba9e1570 100644
--- a/src/usr/errl/errludcallout.C
+++ b/src/usr/errl/errludcallout.C
@@ -112,7 +112,8 @@ ErrlUserDetailsCallout::ErrlUserDetailsCallout(
const void *i_pTarget2Data,
uint32_t i_target2DataLength,
const HWAS::busTypeEnum i_busType,
- const HWAS::callOutPriority i_priority)
+ const HWAS::callOutPriority i_priority,
+ const HWAS::CalloutFlag_t i_flag)
{
TRACDCOMP(g_trac_errl, "BusCallout entry");
@@ -127,6 +128,7 @@ ErrlUserDetailsCallout::ErrlUserDetailsCallout(
pData = reinterpret_cast<HWAS::callout_ud_t *>
(reallocUsrBuf(pDataLength));
pData->type = HWAS::BUS_CALLOUT;
+ pData->flag = i_flag;
pData->busType = i_busType;
pData->priority = i_priority;
char * l_ptr = (char *)(++pData);
diff --git a/src/usr/errl/plugins/errludcallout.H b/src/usr/errl/plugins/errludcallout.H
index 4df646c7b..9ebea5e64 100644
--- a/src/usr/errl/plugins/errludcallout.H
+++ b/src/usr/errl/plugins/errludcallout.H
@@ -362,6 +362,17 @@ case HWAS::_type: i_parser.PrintString( "Priority", #_type); break;
break;
} // switch priority
#undef case_PRIORITY
+
+ switch (pData->flag)
+ {
+#define case_FLAG(_type) \
+ case HWAS::_type: i_parser.PrintString( "Flag", #_type); break;
+ case_FLAG(FLAG_LINK_DOWN)
+ case(HWAS::FLAG_NONE): break; //do not print anything
+ default:
+ i_parser.PrintNumber( "Flag", "UNKNOWN: 0x%X",
+ ntohl(pData->flag) );
+ } // switch partType
} // parse
friend class ErrlUserDetailsParserSensor;
diff --git a/src/usr/hwas/common/hwasCallout.C b/src/usr/hwas/common/hwasCallout.C
index a7ea7e224..83f168a29 100644
--- a/src/usr/hwas/common/hwasCallout.C
+++ b/src/usr/hwas/common/hwasCallout.C
@@ -60,6 +60,9 @@ bool retrieveTarget(uint8_t * & io_uData,
{
bool l_err = false;
+ static_assert( sizeof(callout_ud_t) == 20,
+ "callout_ud_t is the wrong size" );
+
// data is either a token indicating it's the
// MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
// or it's the EntityPath - getAttr<TARGETING::ATTR_PHYS_PATH>()
OpenPOWER on IntegriCloud