summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/Makefile2
-rwxr-xr-xsrc/occ_405/Makefile3
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp.c14
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds.c3
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c52
-rw-r--r--src/occ_405/firdata/fir_data_collect.c10
-rw-r--r--src/occ_405/img_defs.mk3
-rw-r--r--src/occ_405/occLinkInputFile1
-rwxr-xr-xsrc/occ_405/state.c12
-rw-r--r--src/occ_405/topfiles.mk1
10 files changed, 42 insertions, 59 deletions
diff --git a/src/Makefile b/src/Makefile
index 6afecee..b355147 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -56,7 +56,7 @@ NEEDED_IMAGES = \
#SIMICS_WS = /gsa/ausgsa/home/d/a/davidy/work/simics-ppeWork
#default is to build images
-needed_images: $(NEEDED_IMAGES)
+needed_images: $(NEEDED_IMAGES) tracehash
run: $(NEEDED_IMAGES)
$(SIMICS_WS)/simics \
diff --git a/src/occ_405/Makefile b/src/occ_405/Makefile
index 2bc5d36..633b9d1 100755
--- a/src/occ_405/Makefile
+++ b/src/occ_405/Makefile
@@ -63,7 +63,8 @@ LIB_DIRS = -L$(OBJDIR) \
-L$(OBJDIR)/trac \
-L$(OBJDIR)/amec \
-L$(OBJDIR)/dcom \
- -L$(OBJDIR)/proc
+ -L$(OBJDIR)/proc \
+ -L$(OBJDIR)/firdata
#default target is to make a binary application image
#This removes all unecessary headers from the ELF executable
diff --git a/src/occ_405/cmdh/cmdh_fsp.c b/src/occ_405/cmdh/cmdh_fsp.c
index b427433..76b777f 100755
--- a/src/occ_405/cmdh/cmdh_fsp.c
+++ b/src/occ_405/cmdh/cmdh_fsp.c
@@ -692,7 +692,7 @@ int cmdh_fsp_attention(uint32_t i_type)
//
// Name: checksum16
//
-// Description: TODO -- Add description
+// Description: Generates the checksum of the message (sum of preceding bytes)
//
// End Function Specification
uint16_t checksum16(uint8_t * i_data, const uint16_t i_len)
@@ -1263,17 +1263,15 @@ errlHndl_t cmdh_processTmgtRequest (const cmdh_fsp_cmd_t * i_cmd_ptr,
i_rsp_ptr->data_length[1] = 0;
i_rsp_ptr->rc = ERRL_RC_SUCCESS;
- CMDH_TRAC_INFO("Commands are not supported yet!");
-
// Run command function based on cmd_type
switch(l_cmd_type)
{
-// TEMP -- NO SUPPORT YET
-// NOTE: It may be necessary to uncomment the function from cmdh_fsp_cmds.c as well
-/*
case CMDH_POLL:
l_err = cmdh_tmgt_poll (i_cmd_ptr,i_rsp_ptr);
break;
+// TEMP -- NO SUPPORT YET
+// NOTE: It may be necessary to uncomment the function from cmdh_fsp_cmds.c as well
+/*
case CMDH_QUERYFWLEVEL:
cmdh_tmgt_query_fw (i_cmd_ptr,i_rsp_ptr);
break;
@@ -1285,11 +1283,11 @@ errlHndl_t cmdh_processTmgtRequest (const cmdh_fsp_cmd_t * i_cmd_ptr,
case CMDH_SETMODESTATE:
l_err = cmdh_tmgt_setmodestate(i_cmd_ptr,i_rsp_ptr);
break;
-
+*/
case CMDH_SETCONFIGDATA:
l_err = DATA_store_cnfgdata (i_cmd_ptr,i_rsp_ptr);
break;
-
+/*
case CMDH_CLEARERRL:
l_err = cmdh_clear_elog(i_cmd_ptr, i_rsp_ptr);
break;
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c
index 36d937a..458ab71 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c
@@ -101,8 +101,6 @@ errlHndl_t cmdh_tmgt_poll (const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_errlHndl = NULL;
-/* TEMP -- NOT YET SUPPORTED (NEED AMEC/DCOM) */
-#if 0
cmdh_poll_query_t * l_poll_cmd = (cmdh_poll_query_t *) i_cmd_ptr;
ERRL_RC l_rc = ERRL_RC_INTERNAL_FAIL;
uint8_t k = 0;
@@ -195,7 +193,6 @@ errlHndl_t cmdh_tmgt_poll (const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_build_errl_rsp(i_cmd_ptr, o_rsp_ptr, l_rc, &l_errlHndl);
}
-#endif // #if 0
return l_errlHndl;
}
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
index 82b3aed..1b3a918 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
@@ -223,9 +223,7 @@ uint8_t DATA_request_cnfgdata ()
// Skip whenever we are trying to request pcap or freq as a slave
if(((G_data_pri_table[i].format == DATA_FORMAT_POWER_CAP) ||
(G_data_pri_table[i].format == DATA_FORMAT_FREQ)) &&
-// TEMP -- ALWAYS MASTER IN PHASE1
-// (G_occ_role == OCC_SLAVE))
- (FALSE))
+ (G_occ_role == OCC_SLAVE))
{
continue;
}
@@ -253,8 +251,6 @@ errlHndl_t data_store_freq_data(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
uint16_t l_req_freq;
cmdh_store_mode_freqs_t* l_cmdp = (cmdh_store_mode_freqs_t*)i_cmd_ptr;
uint8_t* l_buf = ((uint8_t*)(l_cmdp)) + sizeof(cmdh_store_mode_freqs_t);
@@ -430,7 +426,7 @@ errlHndl_t data_store_freq_data(const cmdh_fsp_cmd_t * i_cmd_ptr,
G_sysConfigData.sys_mode_freq.update_count++;
G_data_cnfg->data_mask |= DATA_MASK_FREQ_PRESENT;
}
-#endif // #if 0
+
return l_err;
}
@@ -444,8 +440,7 @@ errlHndl_t data_store_freq_data(const cmdh_fsp_cmd_t * i_cmd_ptr,
errlHndl_t apss_store_adc_channel(const eApssAdcChannelAssignments i_func_id, const uint8_t i_channel_num )
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
+
// Check function ID and channel number
if ( (i_func_id >= NUM_ADC_ASSIGNMENT_TYPES) ||
(i_channel_num >= MAX_APSS_ADC_CHANNELS) )
@@ -596,7 +591,7 @@ errlHndl_t apss_store_adc_channel(const eApssAdcChannelAssignments i_func_id, co
}
}
}
-#endif // #if 0
+
return l_err;
}
@@ -610,8 +605,6 @@ errlHndl_t apss_store_adc_channel(const eApssAdcChannelAssignments i_func_id, co
// End Function Specification
void apss_store_ipmi_sensor_id(const uint16_t i_channel, const apss_cfg_adc_v10_t *i_adc)
{
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
// Get current processor id.
uint8_t l_proc = G_pob_id.module_id;
@@ -718,7 +711,6 @@ void apss_store_ipmi_sensor_id(const uint16_t i_channel, const apss_cfg_adc_v10_
AMECSENSOR_PTR(PWRAPSSCH0 + i_channel)->ipmi_sid = i_adc->ipmisensorId;
}
}
-#endif // #if 0
}
// Function Specification
@@ -1066,6 +1058,7 @@ errlHndl_t data_store_pstate_super(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_errlHndl = NULL;
+ CMDH_TRAC_ERR("data_store_pstate_super: config type not yet supported!");
/* TEMP -- PSTATES NOT SUPPORTED IN PHASE1
// Cast the command to the struct for this format
cmdh_store_cnfgdata_pstatess_t * l_cmd_ptr = (cmdh_store_cnfgdata_pstatess_t *)i_cmd_ptr;
@@ -1123,8 +1116,6 @@ errlHndl_t data_store_role(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_errlHndl = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
uint8_t l_new_role = OCC_SLAVE;
uint8_t l_old_role = G_occ_role;
ERRL_RC l_rc = ERRL_RC_SUCCESS;
@@ -1174,8 +1165,7 @@ errlHndl_t data_store_role(const cmdh_fsp_cmd_t * i_cmd_ptr,
{
if(OCC_MASTER == l_old_role)
{
-// TEMP - WE ARE ALWAYS MASTER IN PHASE1
-// G_occ_role = OCC_SLAVE;
+ G_occ_role = OCC_SLAVE;
// Turn off anything master related since we are a slave
rtl_clr_run_mask_deferred(RTL_FLAG_MSTR);
@@ -1189,6 +1179,7 @@ errlHndl_t data_store_role(const cmdh_fsp_cmd_t * i_cmd_ptr,
if(OCC_BACKUP_MASTER == l_new_role)
{
// TEMP / TODO : NEED TO CHANGE THIS TO NOT BE USING AN APPLET
+CMDH_TRAC_ERR("data_store_role: not initializing APSS!");
#if 0 // Start
OCC_APLT_STATUS_CODES l_status = OCC_APLT_SUCCESS;
@@ -1280,7 +1271,7 @@ errlHndl_t data_store_role(const cmdh_fsp_cmd_t * i_cmd_ptr,
// Send back an error response to TMGT
cmdh_build_errl_rsp(i_cmd_ptr, o_rsp_ptr, l_rc, &l_errlHndl);
}
-#endif // #if 0
+
return l_errlHndl;
}
@@ -1297,6 +1288,7 @@ errlHndl_t data_store_power_cap(const cmdh_fsp_cmd_t * i_cmd_ptr,
{
errlHndl_t l_err = NULL;
/* TEMP -- NOT SUPPORTED IN PHASE1 */
+CMDH_TRAC_ERR("data_store_power_cap: data config type not yet supported!");
#if 0
// Cast the command to the struct for this format
cmdh_pcap_config_t * l_cmd_ptr = (cmdh_pcap_config_t *)i_cmd_ptr;
@@ -1409,8 +1401,7 @@ errlHndl_t data_store_sys_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
+
// Cast the command to the struct for this format
cmdh_sys_config_t * l_cmd_ptr = (cmdh_sys_config_t *)i_cmd_ptr;
uint16_t l_data_length = 0;
@@ -1501,7 +1492,7 @@ errlHndl_t data_store_sys_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
G_data_cnfg->data_mask |= DATA_MASK_SYS_CNFG;
TRAC_IMP("Got valid System Config data via TMGT for system type: 0x%02X", l_cmd_ptr->sys_config.system_type);
}
-#endif // #if 0
+
return l_err;
}
@@ -1517,8 +1508,6 @@ errlHndl_t data_store_thrm_thresholds(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
cmdh_thrm_thresholds_t* l_cmd_ptr = (cmdh_thrm_thresholds_t*)i_cmd_ptr;
uint16_t i = 0;
uint16_t l_data_length = 0;
@@ -1686,7 +1675,7 @@ errlHndl_t data_store_thrm_thresholds(const cmdh_fsp_cmd_t * i_cmd_ptr,
// Notify thermal thread to update its local copy of the thermal thresholds
THRM_thread_update_thresholds();
}
-#endif // #if 0
+
return l_err;
}
@@ -1703,8 +1692,6 @@ errlHndl_t data_store_mem_cfg(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
cmdh_mem_cfg_t* l_cmd_ptr = (cmdh_mem_cfg_t*)i_cmd_ptr;
uint16_t l_data_length = 0;
uint16_t l_exp_data_length = 0;
@@ -1860,7 +1847,7 @@ errlHndl_t data_store_mem_cfg(const cmdh_fsp_cmd_t * i_cmd_ptr,
TRAC_IMP("data_store_mem_cfg: Got valid mem cfg packet. cent#=%d, dimm#=%d",
l_num_centaurs, l_num_dimms);
}
-#endif // #if 0
+
return l_err;
}
@@ -1877,7 +1864,8 @@ errlHndl_t data_store_mem_throt(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
+/* TEMP -- NOT SUPPORTED IN PHASE1 */
+CMDH_TRAC_ERR("data_store_mem_throt: data config type not yet supported!");
#if 0
cmdh_mem_throt_t* l_cmd_ptr = (cmdh_mem_throt_t*)i_cmd_ptr;
uint16_t l_data_length = 0;
@@ -2040,7 +2028,7 @@ errlHndl_t data_store_mem_throt(const cmdh_fsp_cmd_t * i_cmd_ptr,
// Update the configured mba bitmap
G_configured_mbas = l_configured_mbas;
}
-#endif // #if 0
+#endif
return l_err;
}
@@ -2055,8 +2043,6 @@ errlHndl_t data_store_ips_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_err = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
cmdh_ips_config_t *l_cmd_ptr = (cmdh_ips_config_t *)i_cmd_ptr; // Cast the command to the struct for this format
uint16_t l_data_length = CMDH_DATALEN_FIELD_UINT16(l_cmd_ptr);
uint32_t l_ips_data_sz = sizeof(cmdh_ips_config_t) - sizeof(cmdh_fsp_cmd_header_t);
@@ -2108,7 +2094,7 @@ errlHndl_t data_store_ips_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
l_cmd_ptr->iv_ips_config.iv_utilizationForEntry,
l_cmd_ptr->iv_ips_config.iv_utilizationForExit );
}
-#endif // #if 0
+
return l_err;
}
@@ -2221,8 +2207,6 @@ errlHndl_t DATA_store_cnfgdata (const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
errlHndl_t l_errlHndl = NULL;
-/* TEMP -- NOT SUPPORTED IN PHASE1 */
-#if 0
UINT32 l_new_data = 0;
ERRL_RC l_rc = ERRL_RC_INTERNAL_FAIL;
@@ -2415,7 +2399,7 @@ errlHndl_t DATA_store_cnfgdata (const cmdh_fsp_cmd_t * i_cmd_ptr,
o_rsp_ptr->data_length[1] = 0;
o_rsp_ptr->rc = ERRL_RC_SUCCESS;
}
-#endif // #if 0
+
return(l_errlHndl);
}
diff --git a/src/occ_405/firdata/fir_data_collect.c b/src/occ_405/firdata/fir_data_collect.c
index 1930fa5..d0125b3 100644
--- a/src/occ_405/firdata/fir_data_collect.c
+++ b/src/occ_405/firdata/fir_data_collect.c
@@ -48,13 +48,17 @@ uint32_t G_fir_master = FIR_OCC_NOT_FIR_MASTER;
*/
void fir_data_collect(void)
{
+
+/* TEMP -- NOT YET SUPPORTED */
+TRAC_ERR("fir_data_collect: FirData_captureCsFirData not yet called/enabled");
+#if 0
int32_t l_rc = 0;
// Homer data section and size
- uint8_t *l_hBuf = FIR_PARMS_SECTION_BASE_ADDRESS;
+ uint8_t *l_hBuf = (uint8_t*) FIR_PARMS_SECTION_BASE_ADDRESS;
uint32_t l_hBufSize = HOMER_FIR_PARM_SIZE;
// PNOR working buffer in SRAM and size
- uint8_t *l_pBuf = FIR_HEAP_SECTION_BASE_ADDRESS;
+ uint8_t *l_pBuf = (uint8_t*) FIR_HEAP_SECTION_BASE_ADDRESS;
uint32_t l_pBufSize = FIR_HEAP_SECTION_SIZE;
l_rc = FirData_captureCsFirData(l_hBuf,
@@ -64,6 +68,8 @@ 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);
+#endif
+
}
diff --git a/src/occ_405/img_defs.mk b/src/occ_405/img_defs.mk
index 4695d51..42bfbe9 100644
--- a/src/occ_405/img_defs.mk
+++ b/src/occ_405/img_defs.mk
@@ -192,12 +192,11 @@ APP_INCLUDES = -I$(IMAGE_SRCDIR)/rtls \
-I$(IMAGE_SRCDIR)/pss \
-I$(IMAGE_SRCDIR)/timer \
-I$(IMAGE_SRCDIR)/proc \
- -I$(IMAGE_SRCDIR)/aplt \
- -I$(IMAGE_SRCDIR)/aplt/incl \
-I$(IMAGE_SRCDIR)/cmdh \
-I$(IMAGE_SRCDIR)/dcom \
-I$(IMAGE_SRCDIR)/amec \
-I$(IMAGE_SRCDIR)/cent \
+ -I$(IMAGE_SRCDIR)/firdata \
-I$(IMAGE_SRCDIR)/../occ_gpe0 \
INCLUDES += $(IMG_INCLUDES) $(GLOBAL_INCLUDES) $(APP_INCLUDES) \
diff --git a/src/occ_405/occLinkInputFile b/src/occ_405/occLinkInputFile
index 58fb6a6..4514bdf 100644
--- a/src/occ_405/occLinkInputFile
+++ b/src/occ_405/occLinkInputFile
@@ -20,6 +20,7 @@ INPUT ( amec_data.o
dcomSlaveTx.o
errl.o
ffdc.o
+ fir_data_collect.o
homer.o
ll_ffdc.o
main.o
diff --git a/src/occ_405/state.c b/src/occ_405/state.c
index 0786c15..b691fe1 100755
--- a/src/occ_405/state.c
+++ b/src/occ_405/state.c
@@ -39,8 +39,7 @@
// TEMP -- Doesn't exist anymore
//#include "heartbeat.h"
#include "scom.h"
-// TEMP -- Not supported in phase1
-//#include <fir_data_collect.h>
+#include <fir_data_collect.h>
extern proc_gpsm_dcm_sync_occfw_t G_proc_dcm_sync_state;
extern bool G_mem_monitoring_allowed;
@@ -708,7 +707,6 @@ errlHndl_t SMGR_set_state(OCC_STATE i_new_state)
uint8_t SMGR_validate_get_valid_states(void)
{
uint8_t l_valid_states = 0;
-/* TEMP -- NOT SUPPORTED IN PHASE1
uint32_t l_datamask = DATA_get_present_cnfgdata();
static BOOLEAN l_throttle_traced = FALSE;
@@ -723,7 +721,7 @@ uint8_t SMGR_validate_get_valid_states(void)
if(((l_datamask & SMGR_VALIDATE_DATA_ACTIVE_MASK) ==
SMGR_VALIDATE_DATA_ACTIVE_MASK) )
{
- l_valid_states |= SMGR_MASK_ACTIVE_READY; //@rt004c
+ l_valid_states |= SMGR_MASK_ACTIVE_READY;
if(!l_throttle_traced)
{
@@ -739,9 +737,7 @@ uint8_t SMGR_validate_get_valid_states(void)
}
// If we are master OCC, set this bit
-// TEMP -- IN PHASE 1 WE ARE ALWAYS MASTER
-// if(OCC_MASTER == G_occ_role)
- if (TRUE)
+ if(OCC_MASTER == G_occ_role)
{
l_valid_states |= SMGR_MASK_MASTER_OCC;
}
@@ -751,7 +747,7 @@ uint8_t SMGR_validate_get_valid_states(void)
{
l_valid_states |= OCC_ROLE_FIR_MASTER_MASK;
}
-*/
+
return l_valid_states;
}
diff --git a/src/occ_405/topfiles.mk b/src/occ_405/topfiles.mk
index 7e5fe37..5d2dd54 100644
--- a/src/occ_405/topfiles.mk
+++ b/src/occ_405/topfiles.mk
@@ -46,6 +46,7 @@ TOP-C-SOURCES = amec/amec_data.c \
dcom/dcomSlaveRx.c \
dcom/dcomSlaveTx.c \
errl/errl.c \
+ firdata/fir_data_collect.c \
homer.c \
main.c \
mode.c \
OpenPOWER on IntegriCloud