diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2017-07-16 09:53:32 -0500 |
---|---|---|
committer | William A. Bryan <wilbryan@us.ibm.com> | 2017-07-21 16:26:29 -0400 |
commit | cbedccff001c94de84fdc01d1ea8a38a8264598e (patch) | |
tree | e9b1ebae6fa2d95d4a9c0aea586888431d21ce7f /src/occ_405 | |
parent | f301809e56b82fe61260a15f437183976db9ef75 (diff) | |
download | talos-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_405')
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp.c | 1 | ||||
-rwxr-xr-x | src/occ_405/dcom/dcom.c | 1 | ||||
-rwxr-xr-x | src/occ_405/homer.h | 9 | ||||
-rw-r--r-- | src/occ_405/img_defs.mk | 1 | ||||
-rwxr-xr-x | src/occ_405/main.c | 16 | ||||
-rw-r--r-- | src/occ_405/occLinkInputFile | 15 | ||||
-rwxr-xr-x | src/occ_405/proc/proc_pstate.c | 1 | ||||
-rw-r--r-- | src/occ_405/scom.c | 185 | ||||
-rw-r--r-- | src/occ_405/scom.h | 41 | ||||
-rwxr-xr-x | src/occ_405/state.c | 3 | ||||
-rw-r--r-- | src/occ_405/topfiles.mk | 21 |
11 files changed, 22 insertions, 272 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp.c b/src/occ_405/cmdh/cmdh_fsp.c index 1247e8a..79d7544 100755 --- a/src/occ_405/cmdh/cmdh_fsp.c +++ b/src/occ_405/cmdh/cmdh_fsp.c @@ -36,7 +36,6 @@ #include "cmdh_mnfg_intf.h" #include "cmdh_tunable_parms.h" #include "cmdh_snapshot.h" -#include "scom.h" #include "homer.h" // OCB Channel Setup Defines diff --git a/src/occ_405/dcom/dcom.c b/src/occ_405/dcom/dcom.c index 0400871..0d58a66 100755 --- a/src/occ_405/dcom/dcom.c +++ b/src/occ_405/dcom/dcom.c @@ -39,7 +39,6 @@ #include <proc_pstate.h> #include <amec_data.h> #include <amec_sys.h> -#include "scom.h" #include "pss_constants.h" extern uint8_t G_occ_interrupt_type; diff --git a/src/occ_405/homer.h b/src/occ_405/homer.h index 4f2061e..6961a32 100755 --- a/src/occ_405/homer.h +++ b/src/occ_405/homer.h @@ -67,6 +67,15 @@ #define PPMR_OFFSET_HOMER 0x00300000 // PPMR image HOMER offset #define PPMR_ADDRESS_HOMER (HOMER_BASE_ADDRESS+PPMR_OFFSET_HOMER) // PPMR image memory address +extern uint32_t G_fir_master; +#define OCC_SET_FIR_MASTER(_fm_t) (G_fir_master = _fm_t) +#define OCC_IS_FIR_MASTER() ((G_fir_master == FIR_OCC_IS_FIR_MASTER) ? TRUE : FALSE) + +enum fir_master +{ + FIR_OCC_NOT_FIR_MASTER = 0x00000000, + FIR_OCC_IS_FIR_MASTER = 0x00000001 +}; // Version(s) of HOMER host data currently supported typedef enum homer_version diff --git a/src/occ_405/img_defs.mk b/src/occ_405/img_defs.mk index d0176c2..9ef7a30 100644 --- a/src/occ_405/img_defs.mk +++ b/src/occ_405/img_defs.mk @@ -234,7 +234,6 @@ APP_INCLUDES = -I$(IMAGE_SRCDIR)/rtls \ -I$(IMAGE_SRCDIR)/dcom \ -I$(IMAGE_SRCDIR)/amec \ -I$(IMAGE_SRCDIR)/cent \ - -I$(IMAGE_SRCDIR)/firdata \ -I$(IMAGE_SRCDIR)/dimm \ -I$(IMAGE_SRCDIR)/mem \ -I$(IMAGE_SRCDIR)/lock \ diff --git a/src/occ_405/main.c b/src/occ_405/main.c index bc89724..9ebccc5 100755 --- a/src/occ_405/main.c +++ b/src/occ_405/main.c @@ -52,8 +52,6 @@ #include <homer.h> #include <amec_health.h> #include <amec_freq.h> -#include "scom.h" -#include <fir_data_collect.h> #include <pss_service_codes.h> #include <dimm.h> #include "occhw_shared_data.h" @@ -62,11 +60,7 @@ #include <p9_pstates_occ.h> #include <wof.h> #include "pgpe_service_codes.h" -#include <native.h> -#include <ast_mboxdd.h> -#include <pnor_mboxdd.h> #include <common.h> -pnorMbox_t l_pnorMbox; extern uint32_t __ssx_boot; // Function address is 32 bits extern uint32_t G_occ_phantom_critical_count; @@ -154,6 +148,11 @@ void create_tlb_entry(uint32_t address, uint32_t size); //mode interrupt handler SSX_IRQ_FAST2FULL(pmc_hw_error_fast, pmc_hw_error_isr); + +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; + /* * Function Specification * @@ -2062,6 +2061,7 @@ int main(int argc, char **argv) homer_log_access_error(l_homerrc, l_ssxrc, l_occ_int_type); + // Get the FIR Master indicator uint32_t l_fir_master = FIR_OCC_NOT_FIR_MASTER; l_homerrc = homer_hd_map_read_unmap(HOMER_FIR_MASTER, @@ -2104,6 +2104,10 @@ int main(int argc, char **argv) (uint32_t)&G_fir_data_parms[0]); } + //Set the fir_heap and fir_params pointer in the shared buffer + G_shared_gpe_data.fir_heap_buffer_ptr = (uint32_t)G_fir_heap; + G_shared_gpe_data.fir_params_buffer_ptr = (uint32_t)G_fir_data_parms; + //TODO: RTC 134619: Currently causes an SSX Panic due to SSX believing the // interrupt is not owned by the 405. The fix is to update // both occhw_interrupts.h and ssx_app_cfg.h. The change diff --git a/src/occ_405/occLinkInputFile b/src/occ_405/occLinkInputFile index aafd59b..52f176e 100644 --- a/src/occ_405/occLinkInputFile +++ b/src/occ_405/occLinkInputFile @@ -18,7 +18,6 @@ INPUT ( amec_amester.o amec_slave_smh.o amec_tasks.o apss.o - ast_mboxdd.o avsbus.o centaur_control.o centaur_data.o @@ -45,7 +44,6 @@ INPUT ( amec_amester.o ffdc.o homer.o ll_ffdc.o - lpc.o lock.o main.o memory.o @@ -63,7 +61,6 @@ INPUT ( amec_amester.o occhw_ocb.o occhw_pba.o pgpe_interface.o - pnor_mboxdd.o ppc405_boot.o ppc405_breakpoint.o ppc405_cache_core.o @@ -82,7 +79,6 @@ INPUT ( amec_amester.o reset.o rtls_tables.o rtls.o - scom.o sensor_inband_cmd.o sensor_info.o sensor_main_memory.o @@ -102,13 +98,4 @@ INPUT ( amec_amester.o threadSch.o timer.o trac_interface.o - wof.o - firData.o - fir_data_collect.o - fsi.o - native.o - pnor_util.o - scom_trgt.o - scom_util.o - scom_addr_util.o - sbe_fifo.o) + wof.o) diff --git a/src/occ_405/proc/proc_pstate.c b/src/occ_405/proc/proc_pstate.c index b80e57b..6d68863 100755 --- a/src/occ_405/proc/proc_pstate.c +++ b/src/occ_405/proc/proc_pstate.c @@ -34,7 +34,6 @@ #include "cmdh_fsp_cmds.h" #include "proc_data.h" #include "proc_pstate.h" -#include "scom.h" #include "homer.h" #include <amec_freq.h> #include <common.h> diff --git a/src/occ_405/scom.c b/src/occ_405/scom.c deleted file mode 100644 index bda8ac0..0000000 --- a/src/occ_405/scom.c +++ /dev/null @@ -1,185 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/occ_405/scom.c $ */ -/* */ -/* OpenPOWER OnChipController Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2017 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#include <occ_common.h> -#include "ssx.h" -#include "scom.h" -#include "trac.h" -#include "occ_service_codes.h" -#include "occ_sys_config.h" -#include "polling.h" -#include <scom_util.h> - -// Function Specification -// -// Name: getscom_ffdc -// -// Description: peforms a getscom that does not panic on error and will add -// trace data and create a predictive error log with callouts. -// If caller passes in NULL for o_errp, the error will be -// committed internally. Otherwise, o_errp will point to the -// uncomitted error log. -// -// End Function Specification -int getscom_ffdc(uint32_t i_addr, uint64_t* o_data, errlHndl_t* o_errp) -{ - int l_rc; - errlHndl_t l_err = NULL; - - //P9 SCOM logic requires a target. However, if we're here, then it doesn't - //matter which target we pass in, so long as isMaster is true. This will - //allow to take the branch of code that schedules GPE scom job. See - //src/occ_405/firdata/scom_util.c for more info. - SCOM_Trgt_t l_tempTarget; - l_tempTarget.type = TRGT_PROC; - l_tempTarget.isMaster = TRUE; - l_tempTarget.procUnitPos = 0; - - l_rc = SCOM_getScom(l_tempTarget, i_addr, o_data); - - if(l_rc) - { - //grab additional ffdc - TRAC_ERR("getscom_ffdc: scom failed. addr[%08x] rc[%08x]", - i_addr, - -l_rc); - - /* @ - * @errortype - * @moduleid GETSCOM_FFDC_MID - * @reasoncode PROC_SCOM_ERROR - * @userdata1 scom address - * @userdata2 failure code - * @userdata4 OCC_NO_EXTENDED_RC - * @devdesc Processor register read failure - */ - l_err = createErrl(GETSCOM_FFDC_MID, //modId - PROC_SCOM_ERROR, //reasoncode - OCC_NO_EXTENDED_RC, //Extended reason code - ERRL_SEV_PREDICTIVE, //Severity - NULL, //Trace Buf - DEFAULT_TRACE_SIZE, //Trace Size - i_addr, //userdata1 - -l_rc); //userdata2 - - //adding a processor callout should also cause data to be collected by PRDF component on FSP - addCalloutToErrl(l_err, - ERRL_CALLOUT_TYPE_HUID, - G_sysConfigData.proc_huid, - ERRL_CALLOUT_PRIORITY_MED); - addCalloutToErrl(l_err, - ERRL_CALLOUT_TYPE_COMPONENT_ID, - ERRL_COMPONENT_ID_FIRMWARE, - ERRL_CALLOUT_PRIORITY_HIGH); - - if(o_errp) - { - //caller will commit the error - *o_errp = l_err; - } - else - { - //error committed internally - commitErrl(&l_err); - } - } - - return l_rc; -} - -// Function Specification -// -// Name: putscom_ffdc -// -// Description: peforms a putscom that does not panic on error and will add -// trace data and create a predictive error log with callouts. -// If caller passes in NULL for o_errp, the error will be -// committed internally. Otherwise, o_errp will point to the -// uncomitted error log. -// -// End Function Specification -int putscom_ffdc(uint32_t i_addr, uint64_t i_data, errlHndl_t* o_errp) -{ - int l_rc; - errlHndl_t l_err = NULL; - - //P9 SCOM logic requires a target. However, if we're here, then it doesn't - //matter which target we pass in, so long as isMaster is true. This will - //allow to take the branch of code that schedules GPE scom job. See - //src/occ_405/firdata/scom_util.c for more info. - SCOM_Trgt_t l_tempTarget; - l_tempTarget.type = TRGT_PROC; - l_tempTarget.isMaster = TRUE; - l_tempTarget.procUnitPos = 0; - - l_rc = SCOM_putScom(l_tempTarget, i_addr, i_data); - - if(l_rc) - { - TRAC_ERR("putscom_ffdc: scom failed. addr[%08x] rc[%08x]", - i_addr, - -l_rc); - - /* @ - * @errortype - * @moduleid PUTSCOM_FFDC_MID - * @reasoncode PROC_SCOM_ERROR - * @userdata1 scom address - * @userdata2 failure code - * @userdata4 OCC_NO_EXTENDED_RC - * @devdesc Processor register write failure - */ - l_err = createErrl(PUTSCOM_FFDC_MID, //modId - PROC_SCOM_ERROR, //reasoncode - OCC_NO_EXTENDED_RC, //Extended reason code - ERRL_SEV_PREDICTIVE, //Severity - NULL, //Trace Buf - DEFAULT_TRACE_SIZE, //Trace Size - i_addr, //userdata1 - -l_rc); //userdata2 - - //adding a processor callout should also cause data to be collected by PRDF component on FSP - addCalloutToErrl(l_err, - ERRL_CALLOUT_TYPE_HUID, - G_sysConfigData.proc_huid, - ERRL_CALLOUT_PRIORITY_MED); - addCalloutToErrl(l_err, - ERRL_CALLOUT_TYPE_COMPONENT_ID, - ERRL_COMPONENT_ID_FIRMWARE, - ERRL_CALLOUT_PRIORITY_HIGH); - if(o_errp) - { - //caller will commit the error - *o_errp = l_err; - } - else - { - //commit error internally - commitErrl(&l_err); - } - } - return l_rc; -} - diff --git a/src/occ_405/scom.h b/src/occ_405/scom.h deleted file mode 100644 index 5d500a0..0000000 --- a/src/occ_405/scom.h +++ /dev/null @@ -1,41 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/occ_405/scom.h $ */ -/* */ -/* OpenPOWER OnChipController Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef _scom_h -#define _scom_h - -#include <occ_common.h> -#include <common_types.h> -#include "errl.h" - -//uses non-panic version of getscom/putscom and creates predictive error log -//with trace and processor callout on failure. If o_err is NULL, error is -//committed internally. Otherwise, it is assumed the caller will handle -//committing the error log. These errors should not be discarded! -int putscom_ffdc(uint32_t i_addr, uint64_t i_data, errlHndl_t* o_err); -int getscom_ffdc(uint32_t i_addr, uint64_t* o_data, errlHndl_t* o_err); - -#endif - diff --git a/src/occ_405/state.c b/src/occ_405/state.c index a0efa22..f268024 100755 --- a/src/occ_405/state.c +++ b/src/occ_405/state.c @@ -35,8 +35,7 @@ #include "cmdh_fsp_cmds_datacnfg.h" #include "cmdh_fsp.h" #include "proc_data.h" -#include "scom.h" -#include <fir_data_collect.h> +#include <homer.h> #include <dimm.h> #include "pgpe_interface.h" #include "pstate_pgpe_occ_api.h" diff --git a/src/occ_405/topfiles.mk b/src/occ_405/topfiles.mk index 48bc052..9bb35e7 100644 --- a/src/occ_405/topfiles.mk +++ b/src/occ_405/topfiles.mk @@ -64,16 +64,6 @@ TOP-C-SOURCES = amec/amec_analytics.c \ dimm/dimm.c \ dimm/dimm_control.c \ errl/errl.c \ - firdata/ast_mboxdd.c \ - firdata/firData.c \ - firdata/fir_data_collect.c \ - firdata/fsi.c \ - firdata/native.c \ - firdata/pnor_mboxdd.c \ - firdata/sbe_fifo.c \ - firdata/scom_addr_util.c \ - firdata/scom_trgt.c \ - firdata/scom_util.c \ homer.c \ lock/lock.c \ main.c \ @@ -104,16 +94,7 @@ TOP-C-SOURCES = amec/amec_analytics.c \ thread/threadSch.c \ timer/timer.c \ trac/trac_interface.c \ - wof/wof.c \ - firdata/scom_addr_util.c \ - firdata/firData.c \ - firdata/fir_data_collect.c \ - firdata/fsi.c \ - firdata/lpc.c \ - firdata/native.c \ - firdata/pnor_util.c \ - firdata/scom_trgt.c \ - firdata/scom_util.c + wof/wof.c TOP-S-SOURCES = cmdh/ll_ffdc.S \ |