diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/hwpf/hwp/occ/occ_common.H | 27 | ||||
-rw-r--r-- | src/usr/diag/HBconfig | 6 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ.C | 2 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ_common.C | 46 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/runtime/rt_occ.C | 2 |
5 files changed, 50 insertions, 33 deletions
diff --git a/src/include/usr/hwpf/hwp/occ/occ_common.H b/src/include/usr/hwpf/hwp/occ/occ_common.H index 1886e51ee..824553961 100644 --- a/src/include/usr/hwpf/hwp/occ/occ_common.H +++ b/src/include/usr/hwpf/hwp/occ/occ_common.H @@ -36,19 +36,38 @@ namespace HBOCC struct occHostConfigDataArea_t { uint32_t version; + + //For computation of timebase frequency uint32_t nestFrequency; + + // For determining the interrupt type to Host + // 0x00000000 = Use FSI2HOST Mailbox + // 0x00000001 = Use OCC interrupt line through PSIHB complex uint32_t interruptType; + + // For informing OCC if it is the FIR master: + // 0x00000000 = Default + // 0x00000001 = FIR Master + uint32_t firMaster; + + // FIR collection configuration data needed by FIR Master + // OCC in the event of a checkstop + uint8_t firdataConfig[3072]; }; enum { - OccHostDataVersion = 2, + OccHostDataVersion = 3, OCC_LIDID = 0x81e00430, OCC_IBSCOM_RANGE_IN_MB = MEGABYTE, // Interrupt Types USE_FSI2HOST_MAILBOX = 0x00000000, - USE_PSIHB_COMPLEX = 0x00000001 + USE_PSIHB_COMPLEX = 0x00000001, + + // FIR Master + NOT_FIR_MASTER = 0x00000000, + IS_FIR_MASTER = 0x00000001 }; enum occAction_t @@ -59,13 +78,15 @@ namespace HBOCC /** * @brief Sets up OCC Host data * + * @param[in] i_proc: target processor to load * @param[in] i_occHostDataVirtAddr Virtual * address of current * proc's Host data area. * * @return errlHndl_t Error log Host data setup failed */ - errlHndl_t loadHostDataToHomer(void* i_occHostDataVirtAddr); + errlHndl_t loadHostDataToHomer(TARGETING::Target* i_proc, + void* i_occHostDataVirtAddr); /** * @brief Execute procedures and steps required to load diff --git a/src/usr/diag/HBconfig b/src/usr/diag/HBconfig index a516133e1..973cecd2d 100644 --- a/src/usr/diag/HBconfig +++ b/src/usr/diag/HBconfig @@ -2,3 +2,9 @@ config HBRT_PRD default n help Enable HBRT PRD. + +config ENABLE_CHECKSTOP_ANALYSIS + default n + help + Enable collection of FIR data by OCC for checkstops and + post-checkstop analysis by PRD on system reboot diff --git a/src/usr/hwpf/hwp/occ/occ.C b/src/usr/hwpf/hwp/occ/occ.C index f56c90925..ac2f4b126 100644 --- a/src/usr/hwpf/hwp/occ/occ.C +++ b/src/usr/hwpf/hwp/occ/occ.C @@ -133,7 +133,7 @@ namespace HBOCC (i_homerVirtAddrBase) + tmpOffset + HOMER_OFFSET_TO_OCC_HOST_DATA; void* occHostVirt = reinterpret_cast<void*>(i_homerHostVirtAddr); - l_errl = HBOCC::loadHostDataToHomer(occHostVirt); + l_errl = HBOCC::loadHostDataToHomer(i_target,occHostVirt); if( l_errl != NULL ) { TRACFCOMP( g_fapiImpTd, ERR_MRK"loading Host Data Area failed!" ); diff --git a/src/usr/hwpf/hwp/occ/occ_common.C b/src/usr/hwpf/hwp/occ/occ_common.C index 97d36f48f..e444b26d4 100644 --- a/src/usr/hwpf/hwp/occ/occ_common.C +++ b/src/usr/hwpf/hwp/occ/occ_common.C @@ -119,14 +119,9 @@ namespace HBOCC /** * @brief Sets up OCC Host data - * - * @param[in] i_occHostDataVirtAddr Virtual - * address of current - * proc's Host data area. - * - * @return errlHndl_t Error log Host data setup failed */ - errlHndl_t loadHostDataToHomer(void* i_occHostDataVirtAddr) + errlHndl_t loadHostDataToHomer( TARGETING::Target* i_proc, + void* i_occHostDataVirtAddr) { TRACUCOMP( g_fapiTd, ENTER_MRK"loadHostDataToHomer(%p)", @@ -161,6 +156,22 @@ namespace HBOCC config_data->interruptType = USE_PSIHB_COMPLEX; } +#ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS + // Figure out the FIR master + TARGETING::Target* masterproc = NULL; + tS.masterProcChipTargetHandle( masterproc ); + if( masterproc == i_proc ) + { + config_data->firMaster = IS_FIR_MASTER; + } + else + { + config_data->firMaster = NOT_FIR_MASTER; + } +#else + config_data->firMaster = 0; +#endif + TRACUCOMP( g_fapiTd, EXIT_MRK"loadHostDataToHomer"); @@ -170,16 +181,6 @@ namespace HBOCC /** * @brief Execute procedures and steps necessary * to load OCC data in specified processor - * - * @param[in] i_target Target proc to load - * @param[in] i_homerVirtAddrBase Virtual - * address of current - * proc's HOMER - * @param[in] i_homerPhysAddrBase Physical - * address of current - * proc's HOMER - * - * @return errlHndl_t Error log image load failed */ errlHndl_t loadOCC(TARGETING::Target* i_target, uint64_t i_homerPhysAddr, @@ -299,12 +300,6 @@ namespace HBOCC * @brief Start OCC for specified DCM pair of processors. * If 2nd input is NULL, OCC will be setup on just * one target. - * - * @param[in] i_target0: target of first processor in DCM pair - * @param[in] i_target1: target of second processor in DCM pair - * @param[out] o_failedTarget failed target in case of an error - * - * @return errlHndl_t Error log of startOCC failed */ errlHndl_t startOCC (Target* i_target0, Target* i_target1, @@ -423,11 +418,6 @@ namespace HBOCC * @brief Stop OCC for specified DCM pair of processors. * If 2nd input is NULL, OCC will be setup on just * one target. - * - * @param[in] i_target0: target of first processor in DCM pair - * @param[in] i_target1: target of second processor in DCM pair - * - * @return errlHndl_t Error log of stopOCC failed */ errlHndl_t stopOCC(TARGETING::Target * i_target0, TARGETING::Target * i_target1) diff --git a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C index 29509a1b9..87d30b71b 100644 --- a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C +++ b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C @@ -179,7 +179,7 @@ namespace RT_OCC void* occHostVirt = reinterpret_cast <void *> (i_homer_addr_va + HOMER_OFFSET_TO_OCC_HOST_DATA); - err = HBOCC::loadHostDataToHomer(occHostVirt); + err = HBOCC::loadHostDataToHomer(proc_target,occHostVirt); if( err != NULL ) { TRACFCOMP( g_fapiImpTd, ERR_MRK"loading Host Data Area failed!" ); |