diff options
| author | Mike Jones <mjjones@us.ibm.com> | 2013-08-26 14:36:36 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-09-12 13:28:54 -0500 |
| commit | 7e14a67f70a873c3d6d3fe2640ce7cc84e6065c5 (patch) | |
| tree | 5072771d23e14cde97cd1eee8f374c449d29fe6c /src/include/usr/hwpf | |
| parent | 8c8662a2daf4a57ad704a6642f2f33d560fb8d01 (diff) | |
| download | blackbird-hostboot-7e14a67f70a873c3d6d3fe2640ce7cc84e6065c5.tar.gz blackbird-hostboot-7e14a67f70a873c3d6d3fe2640ce7cc84e6065c5.zip | |
HWPF: Calling out HW without a fapi::Target
Change-Id: Ic4601fac85fa465b91a1c9c67bf09c1344b11146
RTC: 69766
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5919
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf')
| -rw-r--r-- | src/include/usr/hwpf/fapi/fapiErrorInfo.H | 117 | ||||
| -rw-r--r-- | src/include/usr/hwpf/fapi/fapiReturnCode.H | 33 |
2 files changed, 144 insertions, 6 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H index 60c0b29f0..8467e22f1 100644 --- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H +++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H @@ -41,6 +41,7 @@ * mjjones 03/22/2013 Support Procedure Callouts * mjjones 05/20/2013 Support Bus Callouts * mjjones 06/24/2013 Support Children CDGs + * mjjones 08/26/2013 Support HW Callouts */ #ifndef FAPIERRORINFO_H_ @@ -54,6 +55,30 @@ namespace fapi { /** + * @enum HwCallout + * + * This enumeration defines the possible Hardware Callouts that are not + * represented by fapi::Targets + * + * Note that platform code may depend on the enum values starting at 0 and + * incrementing in order to efficiently convert to a platform callout value + * so do not reorder without consulting all platforms + */ +namespace HwCallouts +{ +enum HwCallout +{ + // Where indicated, a HW Callout in FAPI Error XML must include a reference + // target that is used to identify the HW. e.g. for TOD_CLOCK, the proc chip + // that the clock is attached to must be specified + TOD_CLOCK = 0, // Include proc-chip ref (or child chiplet) + MEM_REF_CLOCK = 1, // Include membuf-chip ref (or child chiplet) + PROC_REF_CLOCK = 2, // Include proc-chip ref (or child chiplet) + PCI_REF_CLOCK = 3, // Include proc-chip ref (or child chiplet) +}; +} + +/** * @enum ProcedureCallout * * This enumeration defines the possible Procedure Callouts @@ -151,7 +176,6 @@ public: static void operator delete(void * i_ptr); #endif - private: // FFDC Identifier @@ -169,6 +193,54 @@ private: }; /** + * @struct ErrorInfoHwCallout + * + * This struct contains hardware to callout + */ +struct ErrorInfoHwCallout +{ + /** + * @brief Constructor. + * + * @param[in] i_hw Hardware to callout + * @param[in] i_calloutPriority Priority of callout + * @param[in] i_refTarget Reference to reference target + */ + ErrorInfoHwCallout( + const HwCallouts::HwCallout i_hw, + const CalloutPriorities::CalloutPriority i_calloutPriority, + const Target & i_refTarget); + +#ifdef FAPI_CUSTOM_MALLOC + /** + * @brief Overload new operator to use platform-specific allocator + * + * @param[in] i_sz Size of memory to allocate in bytes + * + * @return Pointer to allocated memory + */ + static void * operator new(size_t i_sz); + + /** + * @brief Overload delete operator to use platform-specific deallocator + * + * @param[in] i_ptr Pointer to memory previously allocated with new + */ + static void operator delete(void * i_ptr); +#endif + + // The hw to callout + HwCallouts::HwCallout iv_hw; + + // The callout priority + CalloutPriorities::CalloutPriority iv_calloutPriority; + + // The reference target (needed for some HW callouts to identify what to + // callout). The target handle is NULL if there is no reference target. + Target iv_refTarget; +}; + +/** * @struct ErrorInfoProcedureCallout * * This struct contains a procedure to callout @@ -229,6 +301,24 @@ struct ErrorInfoBusCallout const Target & i_target2, const CalloutPriorities::CalloutPriority i_calloutPriority); +#ifdef FAPI_CUSTOM_MALLOC + /** + * @brief Overload new operator to use platform-specific allocator + * + * @param[in] i_sz Size of memory to allocate in bytes + * + * @return Pointer to allocated memory + */ + static void * operator new(size_t i_sz); + + /** + * @brief Overload delete operator to use platform-specific deallocator + * + * @param[in] i_ptr Pointer to memory previously allocated with new + */ + static void operator delete(void * i_ptr); +#endif + // The targets on each end of the bus to callout Target iv_target1; Target iv_target2; @@ -315,6 +405,24 @@ struct ErrorInfoChildrenCDG const bool i_gard, const CalloutPriorities::CalloutPriority i_priority); +#ifdef FAPI_CUSTOM_MALLOC + /** + * @brief Overload new operator to use platform-specific allocator + * + * @param[in] i_sz Size of memory to allocate in bytes + * + * @return Pointer to allocated memory + */ + static void * operator new(size_t i_sz); + + /** + * @brief Overload delete operator to use platform-specific deallocator + * + * @param[in] i_ptr Pointer to memory previously allocated with new + */ + static void operator delete(void * i_ptr); +#endif + // The parent chip Target iv_parentChip; @@ -368,6 +476,13 @@ struct ErrorInfo typedef std::vector<ErrorInfoFfdc *>::iterator ErrorInfoFfdcItr_t; typedef std::vector<ErrorInfoFfdc *>::const_iterator ErrorInfoFfdcCItr_t; + // Vector of Hardware to callout + std::vector<ErrorInfoHwCallout *> iv_hwCallouts; + typedef std::vector<ErrorInfoHwCallout *>::iterator + ErrorInfoHwCalloutItr_t; + typedef std::vector<ErrorInfoHwCallout *>::const_iterator + ErrorInfoHwCalloutCItr_t; + // Vector of procedures to callout std::vector<ErrorInfoProcedureCallout *> iv_procedureCallouts; typedef std::vector<ErrorInfoProcedureCallout *>::iterator diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H index 08756293d..edd86397b 100644 --- a/src/include/usr/hwpf/fapi/fapiReturnCode.H +++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H @@ -49,6 +49,7 @@ * mjjones 05/20/2013 Support Bus Callouts * mjjones 06/06/2013 Check FFDC size at compile time * mjjones 06/24/2013 Support Children CDGs + * mjjones 08/26/2013 Support Hw Callout */ #ifndef FAPIRETURNCODE_H_ @@ -282,10 +283,11 @@ public: enum ErrorInfoType { EI_TYPE_FFDC = 1, - EI_TYPE_PROCEDURE_CALLOUT = 2, - EI_TYPE_BUS_CALLOUT = 3, - EI_TYPE_CDG = 4, // Target Callout/Deconfig/GARD - EI_TYPE_CHILDREN_CDG = 5, // Children Callout/Deconfig/GARD + EI_TYPE_HW_CALLOUT = 2, + EI_TYPE_PROCEDURE_CALLOUT = 3, + EI_TYPE_BUS_CALLOUT = 4, + EI_TYPE_CDG = 5, // Target Callout/Deconfig/GARD + EI_TYPE_CHILDREN_CDG = 6, // Children Callout/Deconfig/GARD }; /** @@ -308,6 +310,13 @@ public: struct { + uint8_t iv_hw; + uint8_t iv_calloutPriority; + uint8_t iv_refObjIndex; + } hw_callout; + + struct + { uint8_t iv_procedure; uint8_t iv_calloutPriority; } proc_callout; @@ -417,6 +426,20 @@ private: void forgetData(); /** + * @brief Add a HW callout to the ErrorInfo + * + * This is called by addErrorInfo + * + * @param[in] i_hw The hardware to callout + * @param[in] i_priority The priority of the callout + * @param[in] i_refTarget Reference to reference Target + */ + void addEIHwCallout( + const HwCallouts::HwCallout i_hw, + const CalloutPriorities::CalloutPriority i_priority, + const Target & i_refTarget); + + /** * @brief Add a procedure callout to the ErrorInfo * * This is called by addErrorInfo @@ -435,7 +458,7 @@ private: * * @param[in] i_target1 Reference to endpoint1 Target * @param[in] i_target2 Reference to endpoint2 Target - * @param[in] i_priority The priority of the callout + * @param[in] i_priority The priority of the callout */ void addEIBusCallout( const Target & i_target1, |

