diff options
author | mbroyles <mbroyles@us.ibm.com> | 2015-08-09 16:01:09 -0500 |
---|---|---|
committer | William A. Bryan <wilbryan@us.ibm.com> | 2015-08-10 11:48:42 -0500 |
commit | d4b74d20664271d6736008d87591a5fcbf815ded (patch) | |
tree | ee3c8b2bffaf3cfb127234a07d8f90e0bffa7631 /src | |
parent | 415a7a297bcd313516be30ae88277379f3377cc9 (diff) | |
download | talos-occ-d4b74d20664271d6736008d87591a5fcbf815ded.tar.gz talos-occ-d4b74d20664271d6736008d87591a5fcbf815ded.zip |
Start GPE0 and schedule APSS read tasks
Change-Id: I045a6b32bbbb4944ba766cde17f0ce9645f879e6
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19693
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Tested-by: William A. Bryan <wilbryan@us.ibm.com>
Tested-by: FSP CI Jenkins
Diffstat (limited to 'src')
-rw-r--r-- | src/ipc_func_ids.h | 2 | ||||
-rwxr-xr-x | src/occApplet/productApplet/apssInitApplet.c | 56 | ||||
-rwxr-xr-x | src/occ_405/incl/occ_common.h | 2 | ||||
-rwxr-xr-x | src/occ_405/main.c | 253 | ||||
-rwxr-xr-x | src/occ_405/pss/apss.c | 83 |
5 files changed, 248 insertions, 148 deletions
diff --git a/src/ipc_func_ids.h b/src/ipc_func_ids.h index fd4a773..a2eb58c 100644 --- a/src/ipc_func_ids.h +++ b/src/ipc_func_ids.h @@ -56,6 +56,8 @@ IPC_FUNCIDS_TABLE_START IPC_FUNCIDS_ST_START(OCCHW_INST_ID_GPE0) IPC_FUNC_ID(IPC_ST_TEST_FUNC0) IPC_FUNC_ID(IPC_ST_APSS_START_PWR_MEAS_READ_FUNCID) + IPC_FUNC_ID(IPC_ST_APSS_CONTINUE_PWR_MEAS_READ_FUNCID) + IPC_FUNC_ID(IPC_ST_APSS_COMPLETE_PWR_MEAS_READ_FUNCID) IPC_FUNCIDS_ST_END(OCCHW_INST_ID_GPE0) //Functions that are only supported by GPE1 should be defined here diff --git a/src/occApplet/productApplet/apssInitApplet.c b/src/occApplet/productApplet/apssInitApplet.c index acb3fca..06421fd 100755 --- a/src/occApplet/productApplet/apssInitApplet.c +++ b/src/occApplet/productApplet/apssInitApplet.c @@ -35,21 +35,19 @@ #include <appletId.h> // For applet ID num #include "ssx_io.h" // For printf #include <state.h> +#include "occhw_async.h" //async (GPE, OCB, etc) interfaces //************************************************************************* // Externs //************************************************************************* -extern PoreEntryPoint GPE_apss_initialize_gpio; -extern PoreEntryPoint GPE_apss_set_composite_mode; -extern PoreFlex G_meas_start_request; -extern PoreFlex G_meas_cont_request; -extern PoreFlex G_meas_complete_request; +//extern PoreEntryPoint GPE_apss_initialize_gpio; +//extern PoreEntryPoint GPE_apss_set_composite_mode; +extern GpeRequest G_meas_start_request; +extern GpeRequest G_meas_cont_request; +extern GpeRequest G_meas_complete_request; extern apss_start_args_t G_gpe_start_pwr_meas_read_args; extern apss_continue_args_t G_gpe_continue_pwr_meas_read_args; extern apss_complete_args_t G_gpe_complete_pwr_meas_read_args; -extern PoreEntryPoint GPE_apss_start_pwr_meas_read; -extern PoreEntryPoint GPE_apss_continue_pwr_meas_read; -extern PoreEntryPoint GPE_apss_complete_pwr_meas_read; //************************************************************************* // Macros @@ -87,7 +85,7 @@ extern PoreEntryPoint GPE_apss_complete_pwr_meas_read; errlHndl_t apss_initialize() { errlHndl_t l_err = NULL; - PoreFlex request; + GpeRequest request; // Setup the GPIO init structure to pass to the GPE program G_gpe_apss_initialize_gpio_args.error.error = 0; @@ -106,8 +104,8 @@ errlHndl_t apss_initialize() // Create/schedule GPE_apss_initialize_gpio and wait for it to complete (BLOCKING) TRAC_INFO("Creating request for GPE_apss_initialize_gpio"); - pore_flex_create(&request, // request - &G_pore_gpe0_queue, // queue + gpe_request_create(&request, // request + &G_async_gpe_queue0, // queue (void*)GPE_apss_initialize_gpio, // GPE entry_point (uint32_t)&G_gpe_apss_initialize_gpio_args,// GPE argument_ptr SSX_SECONDS(5), // timeout @@ -115,7 +113,7 @@ errlHndl_t apss_initialize() NULL, // callback arg ASYNC_REQUEST_BLOCKING); // options // Schedule the request to be executed - pore_flex_schedule(&request); + gpe_request_schedule(&request); // Check for a timeout, will create the error log later // NOTE: As of 2013/07/16, simics will still fail here on a OCC reset @@ -146,15 +144,15 @@ errlHndl_t apss_initialize() // Create/schedule GPE_apss_set_composite_mode and wait for it to complete (BLOCKING) TRAC_INFO("Creating request for GPE_apss_set_composite_mode"); - pore_flex_create(&request, // request - &G_pore_gpe0_queue, // queue + gpe_request_create(&request, // request + &G_async_gpe_queue0, // queue (void*)GPE_apss_set_composite_mode, // GPE entry_point (uint32_t)&G_gpe_apss_set_composite_mode_args,// GPE argument_ptr SSX_SECONDS(5), // timeout NULL, // callback NULL, // callback arg ASYNC_REQUEST_BLOCKING); // options - pore_flex_schedule(&request); + gpe_request_schedule(&request); // Check for a timeout, will create the error log later if(ASYNC_REQUEST_STATE_TIMED_OUT == request.request.completion_state) @@ -203,9 +201,9 @@ errlHndl_t apss_initialize() TRAC_INFO("apss_initialize: Creating request G_meas_start_request."); //Create the request for measure start. Scheduling will happen in apss.c - pore_flex_create(&G_meas_start_request, - &G_pore_gpe0_queue, // queue - (void*)GPE_apss_start_pwr_meas_read, // entry_point + gpe_request_create(&G_meas_start_request, + &G_async_gpe_queue0, // queue + IPC_ST_APSS_START_PWR_MEAS_READ_FUNCID, // entry_point (uint32_t)&G_gpe_start_pwr_meas_read_args, // entry_point arg SSX_WAIT_FOREVER, // no timeout NULL, // callback @@ -214,9 +212,9 @@ errlHndl_t apss_initialize() TRAC_INFO("apss_initialize: Creating request G_meas_cont_request."); //Create the request for measure continue. Scheduling will happen in apss.c - pore_flex_create(&G_meas_cont_request, - &G_pore_gpe0_queue, // request - (void*)GPE_apss_continue_pwr_meas_read, // entry_point + gpe_request_create(&G_meas_cont_request, + &G_async_gpe_queue0, // request + IPC_ST_APSS_CONTINUE_PWR_MEAS_READ_FUNCID, // entry_point (uint32_t)&G_gpe_continue_pwr_meas_read_args, // entry_point arg SSX_WAIT_FOREVER, // no timeout NULL, // callback @@ -225,14 +223,14 @@ errlHndl_t apss_initialize() TRAC_INFO("apss_initialize: Creating request G_meas_complete_request."); //Create the request for measure complete. Scheduling will happen in apss.c - pore_flex_create(&G_meas_complete_request, - &G_pore_gpe0_queue, // queue - (void*)GPE_apss_complete_pwr_meas_read, // entry_point - (uint32_t)&G_gpe_complete_pwr_meas_read_args,// entry_point arg - SSX_WAIT_FOREVER, // no timeout - (AsyncRequestCallback)reformat_meas_data, // callback, - (void*)NULL, // callback arg - ASYNC_CALLBACK_IMMEDIATE); // options + gpe_request_create(&G_meas_complete_request, + &G_async_gpe_queue0, // queue + IPC_ST_APSS_COMPLETE_PWR_MEAS_READ_FUNCID, // entry_point + (uint32_t)&G_gpe_complete_pwr_meas_read_args, // entry_point arg + SSX_WAIT_FOREVER, // no timeout + (AsyncRequestCallback)reformat_meas_data, // callback, + (void*)NULL, // callback arg + ASYNC_CALLBACK_IMMEDIATE); // options } else diff --git a/src/occ_405/incl/occ_common.h b/src/occ_405/incl/occ_common.h index 032683f..abd8942 100755 --- a/src/occ_405/incl/occ_common.h +++ b/src/occ_405/incl/occ_common.h @@ -242,6 +242,8 @@ enum HOMER_ACCESS_INITS = 0x0318, INITIALIZING_IRQS = 0x0320, IRQS_INITIALIZED = 0x032f, + INITIALIZING_IPC = 0x0330, + IPC_INITIALIZED = 0x033f, MAIN_THREAD_STARTED = 0x03ff, ROLES_INITIALIZED = 0x04ff, SENSORS_INITIALIZED = 0x05ff, diff --git a/src/occ_405/main.c b/src/occ_405/main.c index 050038b..f81fe52 100755 --- a/src/occ_405/main.c +++ b/src/occ_405/main.c @@ -25,6 +25,8 @@ #include "ssx.h" #include "ssx_io.h" +#include "ipc_api.h" //ipc base interfaces +#include "occhw_async.h" //async (GPE, OCB, etc) interfaces #include "simics_stdio.h" //#include "heartbeat.h" #include <thread.h> @@ -60,6 +62,19 @@ extern uint32_t G_occ_phantom_critical_count; extern uint32_t G_occ_phantom_noncritical_count; extern uint8_t G_occ_interrupt_type; +// Remove the next LOC when dcom_initialize_roles() is un-commented +uint8_t G_occ_role = OCC_MASTER; // TEMP + +// TEMP Remove next 6 LOC when apssInitApplet.c is added +extern GpeRequest G_meas_start_request; +extern GpeRequest G_meas_cont_request; +extern GpeRequest G_meas_complete_request; +extern apss_start_args_t G_gpe_start_pwr_meas_read_args; +extern apss_continue_args_t G_gpe_continue_pwr_meas_read_args; +extern apss_complete_args_t G_gpe_complete_pwr_meas_read_args; + + + IMAGE_HEADER (G_mainAppImageHdr,__ssx_boot,MAIN_APP_ID,ID_NUM_INVALID); //Set main thread timer for one second @@ -100,62 +115,6 @@ void pmc_hw_error_isr(void *private, SsxIrqId irq, int priority); //mode interrupt handler SSX_IRQ_FAST2FULL(pmc_hw_error_fast, pmc_hw_error_isr); -// TODO: Verify whether the workaround is still needed. -/* - * Function Specification - * - * Name: workaround_HW258436 - * - * Description: Sets up the PBA so that there is no overlap in use of buffers between - * GPE engines and other engines. This came from Bishop Brock. - * It should be pulled out after the procedure that sets up the PBA - * has been fixed. Without this workaround we see an invalid instruction - * failure on the GPE. - * - * End Function Specification - */ -void workaround_HW258436() -{ - uint64_t l_scom_data = 0; - int l_rc = 0; - - do - { - //scom errors will be committed internally -- gm033 - l_rc = getscom_ffdc(0x64004, &l_scom_data, NULL); - if(l_rc) break; - l_scom_data &= 0xfffff1ffffffffffull; - l_scom_data |= 0x0000080000000000ull; - l_rc = putscom_ffdc(0x64004, l_scom_data, NULL); - if(l_rc) break; - - l_rc = getscom_ffdc(0x64005, &l_scom_data, NULL); - if(l_rc) break; - l_scom_data &= 0xfffff1ffffffffffull; - l_scom_data |= 0x0000040000000000ull; - l_rc = putscom_ffdc(0x64005, l_scom_data, NULL); - if(l_rc) break; - - l_rc = getscom_ffdc(0x64006, &l_scom_data, NULL); - if(l_rc) break; - l_scom_data &= 0xfffff1ffffffffffull; - l_scom_data |= 0x0000040000000000ull; - l_rc = putscom_ffdc(0x64006, l_scom_data, NULL); - if(l_rc) break; - - l_rc = getscom_ffdc(0x64007, &l_scom_data, NULL); - if(l_rc) break; - l_scom_data &= 0xfffff1ffffffffffull; - l_scom_data |= 0x0000040000000000ull; - l_rc = putscom_ffdc(0x64007, l_scom_data, NULL); - if(l_rc) break; - }while(0); - if(l_rc) - { - TRAC_ERR("workaround_HW258436: scom failure. rc=0x%08x", l_rc); - } -} - /* * Function Specification @@ -383,6 +342,119 @@ END TEMP */ /* * Function Specification * + * Name: gpe_reset + * + * Description: Force a GPE to start executing instructions at the reset vector + * + * End Function Specification + */ +void gpe_reset(uint32_t instance_id) +{ +#define GPE0_XCR 0xC0000080 +#define XCR_CMD_HRESET 0x60000000 +#define XCR_CMD_TOGGLE_XSR 0x40000000 +#define XCR_CMD_RESUME 0x20000000 +#define GPE_XCR_ADDR(inst) (GPE0_XCR + (0x10000 * instance_id)) + + + out32(GPE_XCR_ADDR(instance_id), XCR_CMD_HRESET); + out32(GPE_XCR_ADDR(instance_id), XCR_CMD_TOGGLE_XSR); + out32(GPE_XCR_ADDR(instance_id), XCR_CMD_TOGGLE_XSR); + out32(GPE_XCR_ADDR(instance_id), XCR_CMD_RESUME); +} + +/* + * Function Specification + * + * Name: occ_ipc_setup + * + * Description: Initialzes IPC (Inter Process Communication) that is used + * to communicate with GPEs. + * This will also start GPE0 and GPE1. + * NOTE: SGPE and PGPE are started prior to the OCC 405 during the IPL. + * + * End Function Specification + */ +void occ_ipc_setup() +{ + int l_rc; + errlHndl_t l_err; + + do + { + // install our IPC interrupt handler (this disables our cbufs) + l_rc = ipc_init(); + if(l_rc) + { + TRAC_ERR("ipc_init failed with rc=0x%08x", l_rc); + break; + } + + // enable IPC's + l_rc = ipc_enable(); + if(l_rc) + { + TRAC_ERR("ipc_enable failed with rc = 0x%08x", l_rc); + break; + } + + TRAC_INFO("Calling IPC disable on all GPE's"); + // disable all of the GPE cbufs. They will enable them once + // they are ready to communicate. + ipc_disable(OCCHW_INST_ID_GPE0); + ipc_disable(OCCHW_INST_ID_GPE1); + + TRAC_INFO("IPC initialization completed"); + + // start GPE's 0 and 1 + TRAC_INFO("Starting GPE0"); + gpe_reset(OCCHW_INST_ID_GPE0); + +// $TEMP start GPE1 at later phase for DIMM collection +// TRAC_INFO("Starting GPE1"); +// gpe_reset(OCCHW_INST_ID_GPE1); + + TRAC_INFO("GPE's taken out of reset"); + + }while(0); + +/* TEMP -- NO ERRL YET + if(l_rc) + { + // Log single error for all error cases, just look at trace to see where it failed. + /* @ + * @moduleid OCC_IPC_SETUP + * @reasonCode IPC_GENERIC_FAILURE + * @severity ERRL_SEV_UNRECOVERABLE + * @userdata1 IPC return code + * @userdata4 OCC_NO_EXTENDED_RC + * @devdesc Firmware failure initializing IPC + */ /* + l_err = createErrl( OCC_IRQ_SETUP, // i_modId, + SSX_GENERIC_FAILURE, // i_reasonCode, + OCC_NO_EXTENDED_RC, + ERRL_SEV_UNRECOVERABLE, + NULL, // tracDesc_t i_trace, + 0, // i_traceSz, + l_rc, // i_userData1, + 0); // i_userData2 + + //Callout firmware + addCalloutToErrl(l_err, + ERRL_CALLOUT_TYPE_COMPONENT_ID, + ERRL_COMPONENT_ID_FIRMWARE, + ERRL_CALLOUT_PRIORITY_HIGH); + + commitErrl(&l_err); + } +*/ +} + + + +/* + * Function Specification + * * Name: hmon_routine * * Description: Runs various routines that check the health of the OCC @@ -483,26 +555,54 @@ void hmon_routine() */ void master_occ_init() { - // Init DPSS chip & start associated tasks. - // At present, this is uses function which is part of the INIT_SEC so - // it needs to be run before any applet runs. In future, we can make - // this an applet - // Commented out below call since we are not going to have DPSS - // support in OCC. In future if we decide to support it, this call needs - // to be changed to applet call as we have applet for initializing DPSS. - - // start_dpss(); OCC_APLT_STATUS_CODES l_status = OCC_APLT_SUCCESS; errlHndl_t l_errl = NULL; // Initialize APSS - runApplet(OCC_APLT_APSS_INIT, // Applet enum Name + // Start TEMP code until apssInitApplet.c is compiled and running applets is supported + TRAC_INFO("apss_initialize: Creating request G_meas_start_request."); + //Create the request for measure start. Scheduling will happen in apss.c + gpe_request_create(&G_meas_start_request, + &G_async_gpe_queue0, // queue + IPC_ST_APSS_START_PWR_MEAS_READ_FUNCID, // entry_point + (uint32_t)&G_gpe_start_pwr_meas_read_args, // entry_point arg + SSX_WAIT_FOREVER, // no timeout + NULL, // callback + NULL, // callback arg + ASYNC_CALLBACK_IMMEDIATE); // options + + TRAC_INFO("apss_initialize: Creating request G_meas_cont_request."); + //Create the request for measure continue. Scheduling will happen in apss.c + gpe_request_create(&G_meas_cont_request, + &G_async_gpe_queue0, // request + IPC_ST_APSS_CONTINUE_PWR_MEAS_READ_FUNCID, // entry_point + (uint32_t)&G_gpe_continue_pwr_meas_read_args, // entry_point arg + SSX_WAIT_FOREVER, // no timeout + NULL, // callback + NULL, // callback arg + ASYNC_CALLBACK_IMMEDIATE); // options + + TRAC_INFO("apss_initialize: Creating request G_meas_complete_request."); + //Create the request for measure complete. Scheduling will happen in apss.c + gpe_request_create(&G_meas_complete_request, + &G_async_gpe_queue0, // queue + IPC_ST_APSS_COMPLETE_PWR_MEAS_READ_FUNCID, // entry_point + (uint32_t)&G_gpe_complete_pwr_meas_read_args, // entry_point arg + SSX_WAIT_FOREVER, // no timeout + (AsyncRequestCallback)reformat_meas_data, // callback, + (void*)NULL, // callback arg + ASYNC_CALLBACK_IMMEDIATE); // options + + // END TEMP code. Un-comment runApplet() when TEMP code is removed +/* runApplet(OCC_APLT_APSS_INIT, // Applet enum Name NULL, // Applet arguments TRUE, // Blocking call? NULL, // Applet finished semaphore &l_errl, // Error log handle &l_status); // Error status +*/ + if( (NULL != l_errl) || (l_status != OCC_APLT_SUCCESS)) { @@ -736,9 +836,6 @@ void Main_thread_routine(void *private) TRAC_INFO("Main Thread Started ... " ); - //FIXME: Need to investigate if we need this workaround for P9 - //Owner: Wael - //workaround_HW258436(); // NOTE: At present, we are not planning to use any config data from // mainstore. OCC Role will be provided by FSP after FSP communication @@ -747,8 +844,13 @@ void Main_thread_routine(void *private) // change to use config_data_init at that time. // Default role initialization and determine OCC/Chip Id - // TEMP -- NO DCOM YET + // TEMP -- NO DCOM YET, init as OCC Master //dcom_initialize_roles(); + // Remove the next 2 LOC when dcom_initialize_roles is un-commented + // AND cmdh is running to call master_occ_init + rtl_set_run_mask(RTL_FLAG_MSTR); + master_occ_init(); + CHECKPOINT(ROLES_INITIALIZED); // Sensor Initialization @@ -809,7 +911,7 @@ void Main_thread_routine(void *private) // initWatchdogTimers called before will start running the timer but // the interrupt handler will just restart the timer until we use this // enable switch to actually start the watchdog function. - ENABLE_WDOG; +// ENABLE_WDOG; while (TRUE) { @@ -1185,6 +1287,15 @@ int main(int argc, char **argv) CHECKPOINT(IRQS_INITIALIZED); + // enable IPC and start GPEs + CHECKPOINT(INITIALIZING_IPC); + + occ_ipc_setup(); + + CHECKPOINT(IPC_INITIALIZED); + + + // Create and resume main thread int l_rc = createAndResumeThreadHelper(&Main_thread, Main_thread_routine, diff --git a/src/occ_405/pss/apss.c b/src/occ_405/pss/apss.c index d530b7e..00d67ad 100755 --- a/src/occ_405/pss/apss.c +++ b/src/occ_405/pss/apss.c @@ -63,10 +63,9 @@ GPE_BUFFER(apss_start_args_t G_gpe_start_pwr_meas_read_args); GPE_BUFFER(apss_continue_args_t G_gpe_continue_pwr_meas_read_args); GPE_BUFFER(apss_complete_args_t G_gpe_complete_pwr_meas_read_args); -// TEMP -- NO MORE PORE -//PoreEntryPoint GPE_apss_start_pwr_meas_read; -//PoreEntryPoint GPE_apss_continue_pwr_meas_read; -//PoreEntryPoint GPE_apss_complete_pwr_meas_read; +GpeRequest G_meas_start_request; +GpeRequest G_meas_cont_request; +GpeRequest G_meas_complete_request; // Up / down counter for redundant apss failures uint32_t G_backup_fail_count = 0; @@ -198,9 +197,7 @@ void do_apss_recovery(void) */ // Special error handling on OCC backup. Keep an up/down counter of // fail/success and log predictive error when we reach the limit. -// if(G_occ_role == OCC_SLAVE) -// TEMP -- IN PHASE 1 WE ARE ALWAYS MASTER - if (FALSE) + if(G_occ_role == OCC_SLAVE) { if(G_backup_fail_count < MAX_BACKUP_FAILURES) { @@ -297,8 +294,7 @@ void do_apss_recovery(void) // Note: The complete request must be global, since it must stick around until after the // GPE program has completed (in order to do the callback). -// TEMP -- NO MORE PORE -//PoreFlex G_meas_start_request; + // Function Specification // // Name: task_apss_start_pwr_meas @@ -314,14 +310,13 @@ void task_apss_start_pwr_meas(struct task *i_self) int l_rc = 0; static bool L_scheduled = FALSE; static bool L_idle_traced = FALSE; - static bool L_ffdc_collected = FALSE; +// static bool L_ffdc_collected = FALSE; // Create/schedule GPE_start_pwr_meas_read (non-blocking) APSS_DBG("GPE_start_pwr_meas_read started\n"); do { -/* TEMP -- NO MORE PORE if (!async_request_is_idle(&G_meas_start_request.request)) { if (!L_idle_traced) @@ -331,7 +326,7 @@ void task_apss_start_pwr_meas(struct task *i_self) } break; } -*/ + // Check if we need to try recovering the apss if(G_apss_recovery_requested) { @@ -342,10 +337,11 @@ void task_apss_start_pwr_meas(struct task *i_self) if (L_scheduled) { -// TEMP -- UNCOMMENT ONCE G_meas_start_request is defined again -/* if ((ASYNC_REQUEST_STATE_COMPLETE != G_meas_start_request.request.completion_state) || + + if ((ASYNC_REQUEST_STATE_COMPLETE != G_meas_start_request.request.completion_state) || (0 != G_gpe_start_pwr_meas_read_args.error.error)) { +/* TEMP No error handling //error should only be non-zero in the case where the GPE timed out waiting for //the APSS master to complete the last operation. Just keep retrying until //DCOM resets us due to not having valid power data. @@ -359,6 +355,7 @@ void task_apss_start_pwr_meas(struct task *i_self) // Collect FFDC and log error once. if (!L_ffdc_collected) { + errlHndl_t l_err = NULL; /* @@ -386,12 +383,12 @@ void task_apss_start_pwr_meas(struct task *i_self) // Commit Error commitErrl(&l_err); - // Set to true so that we don't log this error again. L_ffdc_collected = TRUE; } - } */ + } + } // Clear these out prior to starting the GPE (GPE only sets them) @@ -399,8 +396,7 @@ void task_apss_start_pwr_meas(struct task *i_self) G_gpe_start_pwr_meas_read_args.error.ffdc = 0; // Submit the next request -// TEMP -- NO MORE PORE -// l_rc = pore_flex_schedule(&G_meas_start_request); + l_rc = gpe_request_schedule(&G_meas_start_request); if (0 != l_rc) { errlHndl_t l_err = NULL; @@ -449,8 +445,7 @@ void task_apss_start_pwr_meas(struct task *i_self) // Note: The complete request must be global, since it must stick around until after the // GPE program has completed (in order to do the callback). -// TEMP -- NO MORE PORE -//PoreFlex G_meas_cont_request; + // Function Specification // // Name: task_apss_continue_pwr_meas @@ -474,7 +469,6 @@ void task_apss_continue_pwr_meas(struct task *i_self) do { -/* TEMP -- NO MORE PORE if (!async_request_is_idle(&G_meas_cont_request.request)) { if (!L_idle_traced) @@ -484,7 +478,7 @@ void task_apss_continue_pwr_meas(struct task *i_self) } break; } -*/ + //Don't run anything if apss recovery is in progress if(G_apss_recovery_requested) { @@ -493,7 +487,6 @@ void task_apss_continue_pwr_meas(struct task *i_self) if (L_scheduled) { -/* TEMP -- UNCOMMENT ONCE G_meas_cont_request IS DEFINED AGAIN if ((ASYNC_REQUEST_STATE_COMPLETE != G_meas_cont_request.request.completion_state) || (0 != G_gpe_continue_pwr_meas_read_args.error.error)) { @@ -511,6 +504,7 @@ void task_apss_continue_pwr_meas(struct task *i_self) // Collect FFDC and log error once. if (!L_ffdc_collected) { +/* TEMP no error logging errlHndl_t l_err = NULL; /* @@ -539,12 +533,11 @@ void task_apss_continue_pwr_meas(struct task *i_self) // Commit Error commitErrl(&l_err); - +*/ // Set to true so that we don't log this error again. L_ffdc_collected = TRUE; } } -*/ } // Clear these out prior to starting the GPE (GPE only sets them) @@ -552,10 +545,10 @@ void task_apss_continue_pwr_meas(struct task *i_self) G_gpe_continue_pwr_meas_read_args.error.ffdc = 0; // Submit the next request -/* TEMP -- UNCOMMENT ONCE G_meas_cont_request IS DEFINED AGAIN - l_rc = pore_flex_schedule(&G_meas_cont_request); + l_rc = gpe_request_schedule(&G_meas_cont_request); if (0 != l_rc) { +/* TEMP no error logging errlHndl_t l_err = NULL; TRAC_ERR("task_apss_cont_pwr_meas: schedule failed w/rc=0x%08X (%d us)", l_rc, @@ -581,12 +574,13 @@ void task_apss_continue_pwr_meas(struct task *i_self) // Request reset since this should never happen. REQUEST_RESET(l_err); +*/ L_scheduled = FALSE; break; } L_scheduled = TRUE; -*/ + }while (0); APSS_DBG("task_apss_continue_pwr_meas: finished w/rc=0x%08X\n", G_gpe_continue_pwr_meas_read_args.error.rc); @@ -634,11 +628,8 @@ void reformat_meas_data() } // Don't do the copy unless this is the master OCC -// if(G_occ_role == OCC_MASTER) - // TEMP -- IN PHASE 1 WE ARE ALWAYS MASTER - if (TRUE) + if(G_occ_role == OCC_MASTER) { - // Fail every 16 seconds APSS_DBG("Populate meas data:\n"); @@ -673,8 +664,6 @@ void reformat_meas_data() // Note: The complete request must be global, since it must stick around until after the // GPE program has completed (in order to do the callback). -// TEMP -- NO MORE PORE -//PoreFlex G_meas_complete_request; // Function Specification // @@ -691,15 +680,13 @@ void task_apss_complete_pwr_meas(struct task *i_self) int l_rc = 0; static bool L_scheduled = FALSE; static bool L_idle_traced = FALSE; - static bool L_ffdc_collected = FALSE; +// static bool L_ffdc_collected = FALSE; // Create/schedule GPE_apss_complete_pwr_meas_read (non-blocking) APSS_DBG("Calling task_apss_complete_pwr_meas.\n"); do { -// TEMP -- UNCOMMENT ONCE G_meas_complete_request IS DEFINED AGAIN -/* if (!async_request_is_idle(&G_meas_complete_request.request)) { if (!L_idle_traced) @@ -709,7 +696,6 @@ void task_apss_complete_pwr_meas(struct task *i_self) } break; } -*/ if(G_apss_recovery_requested) { // Allow apss measurement to proceed on next tick @@ -720,11 +706,10 @@ void task_apss_complete_pwr_meas(struct task *i_self) if (L_scheduled) { -// TEMP -- UNCOMMENT ONCE G_meas_complete_request IS DEFINED AGAIN -/* if ((ASYNC_REQUEST_STATE_COMPLETE != G_meas_complete_request.request.completion_state) || (0 != G_gpe_complete_pwr_meas_read_args.error.error)) { +/* TEMP no error logging // Error should only be non-zero in the case where the GPE timed out waiting for // the APSS master to complete the last operation. Just keep retrying until // DCOM resets us due to not having valid power data. @@ -766,12 +751,12 @@ void task_apss_complete_pwr_meas(struct task *i_self) // Commit Error commitErrl(&l_err); - // Set to true so that we don't log this error again. L_ffdc_collected = TRUE; } - } */ + + } } // Clear these out prior to starting the GPE (GPE only sets them) @@ -779,16 +764,15 @@ void task_apss_complete_pwr_meas(struct task *i_self) G_gpe_complete_pwr_meas_read_args.error.ffdc = 0; // Submit the next request -// TEMP -- UNCOMMENT ONCE G_meas_complete_request IS DEFINED AGAIN -/* - l_rc = pore_flex_schedule(&G_meas_complete_request); + + l_rc = gpe_request_schedule(&G_meas_complete_request); if (0 != l_rc) { + errlHndl_t l_err = NULL; TRAC_ERR("task_apss_complete_pwr_meas: schedule failed w/rc=0x%08X (%d us)", l_rc, (int) ((ssx_timebase_get())/(SSX_TIMEBASE_FREQUENCY_HZ/1000000))); - /* * @errortype * @moduleid PSS_MID_APSS_COMPLETE_MEAS @@ -797,7 +781,10 @@ void task_apss_complete_pwr_meas(struct task *i_self) * @userdata2 0 * @userdata4 ERC_APSS_SCHEDULE_FAILURE * @devdesc task_apss_complete_pwr_meas schedule failed - */ /* + */ + +/* TEMP no error logging + l_err = createErrl(PSS_MID_APSS_COMPLETE_MEAS, SSX_GENERIC_FAILURE, ERC_APSS_SCHEDULE_FAILURE, @@ -809,10 +796,10 @@ void task_apss_complete_pwr_meas(struct task *i_self) // Request reset since this should never happen. REQUEST_RESET(l_err); +*/ L_scheduled = FALSE; break; } -*/ L_scheduled = TRUE; |