summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2018-07-19 12:57:03 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-08-13 10:40:27 -0500
commit8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5 (patch)
treee91d5c057b9c4776f96a189511929e39273e1b1c /src/include/usr
parentce0ea22d0d9d93b1bf1cc491d93f7907c05185dc (diff)
downloadtalos-hostboot-8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5.tar.gz
talos-hostboot-8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5.zip
Implement generic i2c device callouts for FSP
Creates a new type of callout for i2c devices which populates the error log user details section with the address, port, engine, and i2c master of the device being called out. The change only affects the FSP path. Change-Id: I92acc092f105ee21346594f5e3733957e15ad768 RTC:94872 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63223 Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> 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> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: MURULIDHAR NATARAJU <murulidhar@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/errl/errlentry.H19
-rw-r--r--src/include/usr/errl/errludcallout.H24
-rw-r--r--src/include/usr/hwas/common/hwasCallout.H43
3 files changed, 78 insertions, 8 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 3ed040ae0..677bf06de 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -616,6 +616,25 @@ public:
const HWAS::sensorTypeEnum i_sensorType,
const HWAS::callOutPriority i_priority);
+ /**
+ * @brief Add an i2c device callout. Use this callout type for i2c devices
+ * that do not have target associated with them.
+ *
+ * @param[in] i_i2cMaster The i2c master target. Cannot be nullptr.
+ Cannot be the master sentinel.
+ * @param[in] i_engine The i2c device engine
+ * @param[in] i_port The i2c device port
+ * @param[in] i_address The i2c device address
+ * @param[in] i_priority Priority of the callout
+ *
+ * @return void
+ */
+ void addI2cDeviceCallout(const TARGETING::Target *i_i2cMaster,
+ const uint8_t i_engine,
+ const uint8_t i_port,
+ const uint8_t i_address,
+ const HWAS::callOutPriority i_priority);
+
/**
* @brief Import flattened error log
diff --git a/src/include/usr/errl/errludcallout.H b/src/include/usr/errl/errludcallout.H
index 663243809..9d6acba9f 100644
--- a/src/include/usr/errl/errludcallout.H
+++ b/src/include/usr/errl/errludcallout.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -174,6 +174,28 @@ private:
const HWAS::callOutPriority i_priority );
+ /**
+ * @brief Construct an i2c device callout user detail
+ *
+ * @param[in] i_pTargData The hardware target data or in other words
+ * the bytes in memory that comprise the
+ * entity path of the target
+ * @param[in] i_targDataLen length of i_pTargData in bytes
+ * @param[in] i_engine The i2c device engine
+ * @param[in] i_port The i2c device port
+ * @param[in] i_address The i2c device address
+ * @param[in] i_priority Priority of the callout
+ *
+ * @return void
+ */
+ ErrlUserDetailsCallout(
+ const void *i_pTargData,
+ const uint32_t i_targDataLen,
+ const uint8_t i_engine,
+ const uint8_t i_port,
+ const uint8_t i_address,
+ const HWAS::callOutPriority i_priority);
+
// Disabled
ErrlUserDetailsCallout(const ErrlUserDetailsCallout &);
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H
index 9bb0722fa..01275a012 100644
--- a/src/include/usr/hwas/common/hwasCallout.H
+++ b/src/include/usr/hwas/common/hwasCallout.H
@@ -137,7 +137,7 @@ enum clockTypeEnum
MEMCLK_TYPE = 2,
OSCREFCLK_TYPE = 3,
OSCPCICLK_TYPE = 4,
-
+
// Specify a specific clock source for the case where the code can determine
// which of the redundant sources is actually at fault
OSCPCICLK0_TYPE = 10, //Specifically clock 0
@@ -172,12 +172,13 @@ enum sensorTypeEnum
};
//
-const uint8_t HW_CALLOUT = 0x01;
-const uint8_t PROCEDURE_CALLOUT = 0x02;
-const uint8_t BUS_CALLOUT = 0x03;
-const uint8_t CLOCK_CALLOUT = 0x04;
-const uint8_t PART_CALLOUT = 0x05;
-const uint8_t SENSOR_CALLOUT = 0x06;
+const uint8_t HW_CALLOUT = 0x01;
+const uint8_t PROCEDURE_CALLOUT = 0x02;
+const uint8_t BUS_CALLOUT = 0x03;
+const uint8_t CLOCK_CALLOUT = 0x04;
+const uint8_t PART_CALLOUT = 0x05;
+const uint8_t SENSOR_CALLOUT = 0x06;
+const uint8_t I2C_DEVICE_CALLOUT = 0x07;
const uint8_t TARGET_IS_SENTINEL = 0xF0;
@@ -216,6 +217,12 @@ typedef struct callout_ud
uint32_t sensorId;
sensorTypeEnum sensorType;
};
+ struct { // type == I2C_DEVICE_CALLOUT
+ uint8_t engine;
+ uint8_t port;
+ uint8_t address;
+ // one Target will follow
+ };
}; // union
} callout_ud_t;
@@ -353,6 +360,28 @@ errlHndl_t platHandlePartCallout(
DeconfigEnum i_deconfigState = DECONFIG,
GARD_ErrorType i_gardErrorType = GARD_Fatal);
+/**
+ * @brief platform specific code to handle a bus callout that has been
+ * found in an errlog
+ *
+ * @param[in] i_i2cMaster I2c master target for the i2c device
+ * @param[in] i_engine I2c device engine
+ * @param[in] i_port I2c device port
+ * @param[in] i_address I2c device address
+ * @param[in] i_priority Enum indicating the priority of the callout
+ * @param[in] io_errl Reference to error log handle
+ *
+ * @return errlHndl_t valid errlHndl_t handle if there was an error,
+ * nullptr if no errors;
+ */
+errlHndl_t platHandleI2cDeviceCallout(
+ TARGETING::Target *i_i2cMaster,
+ uint8_t i_engine,
+ uint8_t i_port,
+ uint8_t i_address,
+ callOutPriority i_priority,
+ errlHndl_t &io_errl);
+
#endif // not PARSER
}; // end namespace
OpenPOWER on IntegriCloud