summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe0/firdata/fir_data_collect.c
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-07-16 09:53:32 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-07-21 16:26:29 -0400
commitcbedccff001c94de84fdc01d1ea8a38a8264598e (patch)
treee9b1ebae6fa2d95d4a9c0aea586888431d21ce7f /src/occ_gpe0/firdata/fir_data_collect.c
parentf301809e56b82fe61260a15f437183976db9ef75 (diff)
downloadtalos-occ-cbedccff001c94de84fdc01d1ea8a38a8264598e.tar.gz
talos-occ-cbedccff001c94de84fdc01d1ea8a38a8264598e.zip
rt_xstop_analysis: compile all of firdata on gpe0
Change-Id: I804cdf63879a2b80c9e14149e45ee665240c4a88 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43244 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_gpe0/firdata/fir_data_collect.c')
-rw-r--r--src/occ_gpe0/firdata/fir_data_collect.c112
1 files changed, 5 insertions, 107 deletions
diff --git a/src/occ_gpe0/firdata/fir_data_collect.c b/src/occ_gpe0/firdata/fir_data_collect.c
index a2af34f..d4e1b5e 100644
--- a/src/occ_gpe0/firdata/fir_data_collect.c
+++ b/src/occ_gpe0/firdata/fir_data_collect.c
@@ -25,18 +25,12 @@
#include <fir_data_collect.h>
-#include <scom.h>
-#include <occ_service_codes.h>
-#include <errl.h>
#include "tpc_firmware_registers.h"
#include "tpc_register_addresses.h"
-#include <trac.h>
-#include <homer.h>
#include <firData.h>
+#include <gpe_export.h>
-FIR_HEAP_BUFFER(uint8_t G_fir_heap[FIR_HEAP_SECTION_SIZE]);
-FIR_PARMS_BUFFER(uint8_t G_fir_data_parms[FIR_PARMS_SECTION_SIZE]);
-uint32_t G_fir_master = FIR_OCC_NOT_FIR_MASTER;
+extern gpe_shared_data_t * G_gpe_shared_data;
/*
* Function Specification
@@ -53,10 +47,11 @@ void fir_data_collect(void)
int32_t l_rc = 0;
// Homer data section and size
- uint8_t *l_hBuf = (uint8_t*) FIR_PARMS_SECTION_BASE_ADDRESS;
+ uint8_t *l_hBuf = (uint8_t*) G_gpe_shared_data->fir_params_buffer_ptr;
uint32_t l_hBufSize = HOMER_FIR_PARM_SIZE;
+
// PNOR working buffer in SRAM and size
- uint8_t *l_pBuf = (uint8_t*) FIR_HEAP_SECTION_BASE_ADDRESS;
+ uint8_t *l_pBuf = (uint8_t*) G_gpe_shared_data->fir_heap_buffer_ptr;
uint32_t l_pBufSize = FIR_HEAP_SECTION_SIZE;
l_rc = FirData_captureCsFirData(l_hBuf,
@@ -67,100 +62,3 @@ void fir_data_collect(void)
// Trace the rc only, error logs cannot be collected in this state
TRAC_IMP("Checkstop FIR data capture completed with rc=%d", l_rc);
}
-
-
-/*
- * Function Specification
- *
- * Name: pnor_access_ok
- *
- * Description: Determines if it is ok for this OCC to access the PNOR.
- *
- * End Function Specification
- */
-// TODO: This code is not allowed currently, as it relies on performing scom operations.
-#if 0
-bool pnor_access_allowed(void)
-{
- /* BMC ownership of the PNOR is indicated by bit 18 in TPC_GP0 */
- int l_rc = 0;
- tpc_gp0_t l_tp_gp0_read;
- bool l_access_allowed = FALSE;
-
- l_tp_gp0_read.words.high_order = 0x00000000;
- l_tp_gp0_read.words.low_order = 0x00000000;
-
- l_rc = getscom_ffdc(TPC_GP0, (uint64_t *)&l_tp_gp0_read, NULL);
-
- if (l_rc == 0)
- {
- if ((l_tp_gp0_read.words.high_order & TPC_GP0_BIT18_PNOR_OWNER_MASK) == 0)
- {
- TRAC_INFO("PNOR access allowed at this time");
- l_access_allowed = TRUE;
- }
- else
- {
- TRAC_INFO("PNOR access NOT allowed at this time, tpc_gp0.hi = 0x%08x",
- l_tp_gp0_read.words.high_order);
-
- /* @
- * @errortype
- * @moduleid FIR_DATA_MID
- * @reasoncode INTERNAL_FAILURE
- * @userdata1 TPC_GP0 high word
- * @userdata4 ERC_PNOR_OWNERSHIP_NOT_AVAILABLE
- * @devdesc PNOR access not allowed at this time.
- */
- errlHndl_t l_errl = createErrl(
- FIR_DATA_MID, /*ModId */
- INTERNAL_FAILURE, /*Reasoncode */
- ERC_PNOR_OWNERSHIP_NOT_AVAILABLE, /*Extended reasoncode */
- ERRL_SEV_INFORMATIONAL, /*Severity */
- NULL, /*Trace Buf */
- DEFAULT_TRACE_SIZE, /*Trace Size */
- l_tp_gp0_read.words.high_order, /*Userdata1 */
- 0 /*Userdata2 */
- );
-
- /* Commit log */
- commitErrl(&l_errl);
- }
- }
- else
- {
- /* getscom failure */
- TRAC_ERR("TPC_GP0 getscom failure rc = 0x%08x", -l_rc );
-
- /* @
- * @errortype
- * @moduleid FIR_DATA_MID
- * @reasoncode INTERNAL_HW_FAILURE
- * @userdata1 getscom failure rc
- * @userdata4 ERC_GETSCOM_TPC_GP0_FAILURE
- * @devdesc Failure determining PNOR ownership. Cannot read TPC_GP0.
- */
- errlHndl_t l_errl = createErrl(
- FIR_DATA_MID, /*ModId */
- INTERNAL_HW_FAILURE, /*Reasoncode */
- ERC_GETSCOM_TPC_GP0_FAILURE, /*Extended reasoncode */
- ERRL_SEV_PREDICTIVE, /*Severity */
- NULL, /*Trace Buf */
- DEFAULT_TRACE_SIZE, /*Trace Size */
- l_rc, /*Userdata1 */
- 0 /*Userdata2 */
- );
-
- /* Callout firmware */
- addCalloutToErrl(l_errl,
- ERRL_CALLOUT_TYPE_COMPONENT_ID,
- ERRL_COMPONENT_ID_FIRMWARE,
- ERRL_CALLOUT_PRIORITY_HIGH);
-
- /* Commit log */
- commitErrl(&l_errl);
- }
-
- return l_access_allowed;
-}
-#endif
OpenPOWER on IntegriCloud