diff options
Diffstat (limited to 'src/usr/diag/prdf/occ_firdata')
5 files changed, 41 insertions, 40 deletions
diff --git a/src/usr/diag/prdf/occ_firdata/firDataConst_common.h b/src/usr/diag/prdf/occ_firdata/firDataConst_common.h index 16379d97b..3b8f9bb71 100644 --- a/src/usr/diag/prdf/occ_firdata/firDataConst_common.h +++ b/src/usr/diag/prdf/occ_firdata/firDataConst_common.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -35,7 +35,7 @@ /** Target types for all supported targets. */ typedef enum { - // NOTE: These will be used as array indexes. + /* NOTE: These will be used as array indexes. */ FIRST_TRGT = 0, PROC = FIRST_TRGT, EX, @@ -62,7 +62,7 @@ typedef enum /** All register types. */ typedef enum { - // NOTE: These will be used as array indexes. + /* NOTE: These will be used as array indexes. */ FIRST_REG = 0, GLBL = FIRST_REG, FIR, @@ -73,11 +73,12 @@ typedef enum } RegType_t; -/** IPL or Runtime flag in HOMER data */ +/** Indicates the state of the machine when the checkstop occurred. */ typedef enum { - HOMER_RUNTIME_STATE = 0, - HOMER_IPL_STATE = 1 -} Homer_IplRuntime_t; + FIRDATA_STATE_RUNTIME = 0, + FIRDATA_STATE_IPL = 1, -#endif // __firDataConst_common_h +} IplState_t; + +#endif /* __firDataConst_common_h */ diff --git a/src/usr/diag/prdf/occ_firdata/homerData_common.h b/src/usr/diag/prdf/occ_firdata/homerData_common.h index aec7dd949..e43d7ecfb 100644 --- a/src/usr/diag/prdf/occ_firdata/homerData_common.h +++ b/src/usr/diag/prdf/occ_firdata/homerData_common.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -77,17 +77,17 @@ typedef enum { - HOMER_FIR1 = 0x46495231, ///< FIR data version 1 ("FIR1" in ascii) + HOMER_FIR1 = 0x46495231, /** FIR data version 1 ("FIR1" in ascii) */ } HOMER_Version_t; /** PNOR information contained within the HOMER data. */ typedef struct __attribute__((packed)) { - uint32_t pnorOffset; ///< Physical offset of FIRDATA in PNOR - uint32_t pnorSize; ///< Maximum size of FIRDATA (includes ECC) - uint32_t mmioOffset; ///< Address of MMIO access - uint32_t norWorkarounds; ///< NOR flash vendor + uint32_t pnorOffset; /** Physical offset of FIRDATA in PNOR */ + uint32_t pnorSize; /** Maximum size of FIRDATA (includes ECC) */ + uint32_t mmioOffset; /** Address of MMIO access */ + uint32_t norWorkarounds; /** NOR flash vendor */ } HOMER_PnorInfo_t; @@ -95,12 +95,12 @@ typedef struct __attribute__((packed)) * register counts. */ typedef struct __attribute__((packed)) { - uint32_t header; ///< Magic number to indicate valid data and version + uint32_t header; /** Magic number to indicate valid data and version */ - uint16_t iplState : 1; // Uses enum Homer_iplRuntime_t + uint16_t iplState : 1; /** See enum IplState_t */ uint16_t reserved : 15; - uint8_t masterProc; ///< The position of the master PROC + uint8_t masterProc; /** The position of the master PROC */ /** Bitwise mask to indicate which PROCs are configured (max 8). The mask * bit position is consistant with PROC ATTR_POSITION attribute. */ @@ -170,4 +170,4 @@ static inline HOMER_Data_t HOMER_getData() return d; } -#endif // __homerData_common_h +#endif /* __homerData_common_h */ diff --git a/src/usr/diag/prdf/occ_firdata/pnorData_common.h b/src/usr/diag/prdf/occ_firdata/pnorData_common.h index 6199433e5..eab98e541 100644 --- a/src/usr/diag/prdf/occ_firdata/pnorData_common.h +++ b/src/usr/diag/prdf/occ_firdata/pnorData_common.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -66,18 +66,18 @@ typedef enum { - PNOR_FIR1 = 0x46495231, ///< FIR data version 1 ("FIR1" in ascii) + PNOR_FIR1 = 0x46495231, /** FIR data version 1 ("FIR1" in ascii) */ } PNOR_Version_t; /** PNOR data header information. */ typedef struct __attribute__((packed)) { - uint32_t header; ///< Magic number to indicate valid data and version + uint32_t header; /** Magic number to indicate valid data and version */ - uint32_t trgts : 8; ///< Number of targets with register data - uint32_t full : 1; ///< 1 if PNOR data is full and data may be missing - uint32_t iplState : 1; ///< Uses enum Homer_iplRuntime_t + uint32_t trgts : 8; /** Number of targets with register data */ + uint32_t full : 1; /** 1 if PNOR data is full and data may be missing*/ + uint32_t iplState : 1; /** See enum IplState_t */ uint32_t reserved : 22; } PNOR_Data_t; @@ -97,21 +97,21 @@ static inline PNOR_Data_t PNOR_getData() /** These values will match the corresponding bit fields in PNOR_Trgt_t. */ typedef enum { - PNOR_Trgt_MAX_REGS_PER_TRGT = 511, // Currently expect 266 on the PROC - PNOR_Trgt_MAX_ID_REGS_PER_TRGT = 15, // Currently expect 9 on the MBA - PNOR_Trgt_MAX_SCOM_ERRORS = 511, // Should be plenty + PNOR_Trgt_MAX_REGS_PER_TRGT = 511, /* Currently expect 266 on the PROC */ + PNOR_Trgt_MAX_ID_REGS_PER_TRGT = 15, /* Currently expect 9 on the MBA */ + PNOR_Trgt_MAX_SCOM_ERRORS = 511, /* Should be plenty */ } PNOR_Trgt_RegLimits_t; /** Information for each target with SCOM data. */ typedef struct __attribute__((packed)) { - uint32_t type : 3; ///< Target type. See enum TrgtType_t - uint32_t procPos : 3; ///< The processor position (0-7) - uint32_t unitPos : 4; ///< Unit position relative to the processor (0-15) - uint32_t regs : 9; ///< Number of normal registers - uint32_t idRegs : 4; ///< Number of indirect-SCOM registers - uint32_t scomErrs : 9; ///< Number of SCOM errors detected + uint32_t type : 3; /** Target type. See enum TrgtType_t */ + uint32_t procPos : 3; /** The processor position (0-7) */ + uint32_t unitPos : 4; /** Unit position relative to the processor (0-15) */ + uint32_t regs : 9; /** Number of normal registers */ + uint32_t idRegs : 4; /** Number of indirect-SCOM registers */ + uint32_t scomErrs : 9; /** Number of SCOM errors detected */ } PNOR_Trgt_t; @@ -137,16 +137,16 @@ static inline PNOR_Trgt_t PNOR_getTrgt( uint32_t i_type, uint32_t i_procPos, /** Information for a normal register. */ typedef struct __attribute__((packed)) { - uint32_t addr; ///< 32-bit address - uint64_t val; ///< 64-bit value + uint32_t addr; /** 32-bit address */ + uint64_t val; /** 64-bit value */ } PNOR_Reg_t; /** Information for an indirect-SCOM register. */ typedef struct __attribute__((packed)) { - uint64_t addr; ///< 64-bit address - uint32_t val; ///< 32-bit value + uint64_t addr; /** 64-bit address */ + uint32_t val; /** 32-bit value */ } PNOR_IdReg_t; diff --git a/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C b/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C index d8041f331..c57a9fbaf 100644 --- a/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C +++ b/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -203,7 +203,7 @@ errlHndl_t readPnorFirData( bool & o_validData, PnorTrgtMap & o_trgtMap, // Gather FFDC from header data. o_ffdc.trgts = data->trgts; o_ffdc.full = (0 == data->full) ? false : true; - o_ffdc.iplStateActive = (HOMER_IPL_STATE == data->iplState) + o_ffdc.iplStateActive = (FIRDATA_STATE_IPL == data->iplState) ? true:false; // Iterate each target and get the register data. diff --git a/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C b/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C index 67be5d5c1..ae6eb9695 100644 --- a/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C +++ b/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C @@ -811,7 +811,7 @@ errlHndl_t writeHomerFirData( uint8_t * i_hBuf, size_t i_hBufSize, // Set flag indicating if IPL or runtime situation. data.iplState = (ALL_HARDWARE == i_curHw) - ? HOMER_RUNTIME_STATE : HOMER_IPL_STATE; + ? FIRDATA_STATE_RUNTIME : FIRDATA_STATE_IPL; // Get the PNOR information errl = getPnorInfo( data ); |