diff options
-rw-r--r-- | src/occ_405/amec/amec_controller.c | 68 | ||||
-rw-r--r-- | src/occ_405/amec/amec_controller.h | 9 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_health.c | 76 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_health.h | 1 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_sensors_power.c | 208 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_sensors_power.h | 4 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_service_codes.h | 1 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_slave_smh.c | 18 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_sys.h | 5 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds.c | 14 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c | 10 | ||||
-rwxr-xr-x | src/occ_405/dcom/dcom.h | 4 | ||||
-rwxr-xr-x | src/occ_405/errl/errl.h | 16 | ||||
-rwxr-xr-x | src/occ_405/main.c | 5 | ||||
-rw-r--r-- | src/occ_405/occ_service_codes.h | 12 | ||||
-rwxr-xr-x | src/occ_405/occ_sys_config.c | 2 | ||||
-rwxr-xr-x | src/occ_405/occ_sys_config.h | 1 | ||||
-rw-r--r-- | src/occ_405/pss/avsbus.c | 456 | ||||
-rwxr-xr-x | src/occ_405/pss/avsbus.h | 14 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_enum.h | 24 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_info.c | 23 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_table.c | 37 |
22 files changed, 619 insertions, 389 deletions
diff --git a/src/occ_405/amec/amec_controller.c b/src/occ_405/amec/amec_controller.c index 3f8228a..1ee5169 100644 --- a/src/occ_405/amec/amec_controller.c +++ b/src/occ_405/amec/amec_controller.c @@ -334,74 +334,6 @@ void amec_controller_centaur_thermal() //************************************************************************* // Function Specification // -// Name: amec_controller_vrhotproc -// -// Description: This function implements a Single-step Controller for the -// processor VRHOT signal. Although it doesn't return any -// results, it populates the frequency vote in the field -// g_amec->vrhotproc.freq_request -// -// -// End Function Specification -void amec_controller_vrhotproc() -{ - /*------------------------------------------------------------------------*/ - /* Local Variables */ - /*------------------------------------------------------------------------*/ - int16_t l_cpu_speed = 0; - int16_t l_throttle_chg = 0; - sensor_t *l_sensor = NULL; - - /*------------------------------------------------------------------------*/ - /* Code */ - /*------------------------------------------------------------------------*/ - // Get VRHOT sensor, which is really a counter of consecutive times the - // VRHOT signal has been asserted - l_sensor = getSensorByGsid(VRHOT250USPROC); - - // Single-step controller: - // If sensor VRHOT250USPROC is above the set-point, we need to step down. - // Else, do a single step up. - if (l_sensor->sample >= g_amec->vrhotproc.setpoint) - { - l_throttle_chg = (int16_t)(-1); - } - else - { - l_throttle_chg = (int16_t)(1); - } - - // Calculate the new VRHOTPROC speed request - l_cpu_speed = g_amec->vrhotproc.speed_request + - (int16_t) l_throttle_chg * g_amec->sys.speed_step; - - // Never allow negative speed requests - if (l_cpu_speed < 0) - { - l_cpu_speed = 0; - } - - // Enforce actuator saturation limits - if (l_cpu_speed > g_amec->sys.max_speed) - { - l_cpu_speed = g_amec->sys.max_speed; - } - if (l_cpu_speed < g_amec->sys.min_speed) - { - l_cpu_speed = g_amec->sys.min_speed; - } - - // Generate the new VRHOTPROC frequency request - g_amec->vrhotproc.speed_request = l_cpu_speed; - g_amec->vrhotproc.freq_request = - amec_controller_speed2freq(g_amec->vrhotproc.speed_request, - g_amec->sys.fmax); - -} - -//************************************************************************* -// Function Specification -// // Name: amec_controller_speed2freq // // Description: Helper function to convert speed to MHz. diff --git a/src/occ_405/amec/amec_controller.h b/src/occ_405/amec/amec_controller.h index 8b2c1b9..76e70ef 100644 --- a/src/occ_405/amec/amec_controller.h +++ b/src/occ_405/amec/amec_controller.h @@ -86,7 +86,7 @@ typedef struct amec_controller * This function implements the Proportional Controller for the thermal * control loop. Although it doesn't return any results, it populates the * thermal vote in the field g_amec->thermalproc.speed_request. - * + * */ void amec_controller_proc_thermal(); @@ -121,12 +121,5 @@ void amec_controller_dimm_thermal(); */ uint16_t amec_controller_speed2freq (const uint16_t i_speed, const uint16_t i_fmax); -/** - * Thermal Control Loop based on VRHOT signal from processor - * regulators. - * - */ -void amec_controller_vrhotproc(); - #endif //_AMEC_CONTROLLER_H diff --git a/src/occ_405/amec/amec_health.c b/src/occ_405/amec/amec_health.c index 8ad5e0a..132dc30 100755 --- a/src/occ_405/amec/amec_health.c +++ b/src/occ_405/amec/amec_health.c @@ -1010,82 +1010,6 @@ void amec_health_check_proc_timeout() }while(0); } -// Function Specification -// -// Name: amec_health_check_proc_vrhot -// -// Description: This function checks if VRHOT signal from processor regulator -// has been asserted. The VRHOT signal is actually derived in firmware: if -// VR_FAN signal is assserted and the 'fans_full_speed' GPIO is ON, then OCC -// will considered VR_HOT as being asserted. -// -// End Function Specification -void amec_health_check_proc_vrhot() -{ - /*------------------------------------------------------------------------*/ - /* Local Variables */ - /*------------------------------------------------------------------------*/ - static BOOLEAN L_error_logged = FALSE; - sensor_t *l_sensor; - errlHndl_t l_err = NULL; - - /*------------------------------------------------------------------------*/ - /* Code */ - /*------------------------------------------------------------------------*/ - - // Get VRHOT50USPROC sensor - l_sensor = getSensorByGsid(VRHOT250USPROC); - - // Check to see if we have exceeded our ERROR_COUNT - if(l_sensor->sample >= g_amec->vrhotproc.setpoint) - { - // We have reached the number of successive VRHOT samples allowed. Need - // to log an error (only once per OCC reset). - if(!L_error_logged) - { - L_error_logged = TRUE; - - TRAC_ERR("amec_health_check_proc_vrhot: VRHOT has been asserted! num_samples[%u]", - l_sensor->sample); - - /* @ - * @errortype - * @moduleid AMEC_HEALTH_CHECK_PROC_VRHOT - * @reasoncode VRM_ERROR_TEMP - * @userdata1 VRHOT error threshold - * @userdata2 0 - * @userdata4 OCC_NO_EXTENDED_RC - * @devdesc VRHOT signal has been asserted long enough to - * exceed its error threshold. - * - */ - l_err = createErrl(AMEC_HEALTH_CHECK_PROC_VRHOT, - VRM_ERROR_TEMP, - OCC_NO_EXTENDED_RC, - ERRL_SEV_PREDICTIVE, - NULL, - DEFAULT_TRACE_SIZE, - g_amec->vrhotproc.setpoint, - 0); - - // Callout the Ambient procedure - addCalloutToErrl(l_err, - ERRL_CALLOUT_TYPE_COMPONENT_ID, - ERRL_COMPONENT_ID_OVER_TEMPERATURE, - ERRL_CALLOUT_PRIORITY_HIGH); - - // Callout backplane - addCalloutToErrl(l_err, - ERRL_CALLOUT_TYPE_HUID, - G_sysConfigData.backplane_huid, - ERRL_CALLOUT_PRIORITY_MED); - - // Commit Error - commitErrl(&l_err); - } - } -} - /*----------------------------------------------------------------------------*/ /* End */ /*----------------------------------------------------------------------------*/ diff --git a/src/occ_405/amec/amec_health.h b/src/occ_405/amec/amec_health.h index 35271c0..0f5baf0 100755 --- a/src/occ_405/amec/amec_health.h +++ b/src/occ_405/amec/amec_health.h @@ -43,7 +43,6 @@ void amec_health_check_proc_temp(void); void amec_health_check_proc_timeout(void); -void amec_health_check_proc_vrhot(); void amec_health_check_cent_temp(void); void amec_health_check_cent_timeout(void); void amec_health_check_dimm_temp(void); diff --git a/src/occ_405/amec/amec_sensors_power.c b/src/occ_405/amec/amec_sensors_power.c index 5b98877..622a9f4 100755 --- a/src/occ_405/amec/amec_sensors_power.c +++ b/src/occ_405/amec/amec_sensors_power.c @@ -23,6 +23,8 @@ /* */ /* IBM_PROLOG_END_TAG */ +//#define AVSDEBUG + /******************************************************************************/ /* Includes */ /******************************************************************************/ @@ -58,6 +60,7 @@ uint32_t G_lastValidAdcValue[MAX_APSS_ADC_CHANNELS] = {0}; ((i_chan < MAX_APSS_ADC_CHANNELS) ? G_lastValidAdcValue[i_chan] : 0) extern uint8_t G_occ_interrupt_type; +extern bool G_vrm_thermal_monitoring; //************************************************************************* // Code @@ -414,7 +417,7 @@ void process_avsbus_current() uint32_t current = avsbus_read(AVSBUS_VDD, AVSBUS_CURRENT); if (current != 0) { - // Current value stored in the sensor should be in 10mA (scale -2) + // Current value stored in the sensor should be in 10mA (A scale -2) sensor_update(AMECSENSOR_PTR(CURVDD), (uint16_t)current); } } @@ -424,7 +427,7 @@ void process_avsbus_current() uint32_t current = avsbus_read(AVSBUS_VDN, AVSBUS_CURRENT); if (current != 0) { - // Current value stored in the sensor should be in 10mA (scale -2) + // Current value stored in the sensor should be in 10mA (A scale -2) sensor_update(AMECSENSOR_PTR(CURVDN), (uint16_t)current); } } @@ -440,8 +443,8 @@ void process_avsbus_voltage() uint32_t voltage = avsbus_read(AVSBUS_VDD, AVSBUS_VOLTAGE); if (voltage != 0) { - // Voltage value stored in the sensor should be in 100mV (scale -1) - voltage /= 100; + // Voltage value stored in the sensor should be in 100uV (mV scale -1) + voltage *= 10; sensor_update(AMECSENSOR_PTR(VOLTVDD), (uint16_t)voltage); } } @@ -451,8 +454,8 @@ void process_avsbus_voltage() uint32_t voltage = avsbus_read(AVSBUS_VDN, AVSBUS_VOLTAGE); if (voltage != 0) { - // Voltage value stored in the sensor should be in 100mV (scale -1) - voltage /= 100; + // Voltage value stored in the sensor should be in 100uV (mV scale -1) + voltage *= 10; sensor_update(AMECSENSOR_PTR(VOLTVDN), (uint16_t)voltage); } } @@ -466,8 +469,8 @@ void update_avsbus_power_sensors(const avsbus_type_e i_type) static bool L_throttle_vdn = FALSE; bool * L_throttle = &L_throttle_vdd; // TODO: RTC 130216 : read loadline and distloss from Pstate Super Structure - uint16_t l_loadline = 0x61AB; // OCCPstateParmBlock.vdd_sysparm.loadline_uohm - uint16_t l_distloss = 0x0000; // OCCPstateParmBlock.vdd_sysparm.distloss_uohm + uint32_t l_loadline = 0x61AB; // OCCPstateParmBlock.vdd_sysparm.loadline_uohm + uint32_t l_distloss = 0x0000; // OCCPstateParmBlock.vdd_sysparm.distloss_uohm uint32_t l_currentSensor = CURVDD; uint32_t l_voltageSensor = VOLTVDD; uint32_t l_voltageChip = VOLTVDDSENSE; @@ -484,46 +487,54 @@ void update_avsbus_power_sensors(const avsbus_type_e i_type) } // Read latest voltage/current sensors - const sensor_t *volt = getSensorByGsid(l_voltageSensor); - const uint32_t l_voltage_100mv = volt->sample; - const sensor_t *curr = getSensorByGsid(l_currentSensor); - const uint32_t l_current_10ma = curr->sample; + uint32_t l_voltage_100uv = 0; + uint32_t l_current_10ma = 0; + sensor_t *l_sensor = getSensorByGsid(l_voltageSensor); + if (l_sensor != NULL) + { + l_voltage_100uv = l_sensor->sample; + } + l_sensor = getSensorByGsid(l_currentSensor); + if (l_sensor != NULL) + { + l_current_10ma = l_sensor->sample; + } #ifdef AVSDEBUG // TODO: RTC 130216 : REMOVE AFTER VERIFYING loadline/distlost from Pstate Super Structure - static uint8_t L_traceCount = 0; + static uint32_t L_traceCount = 0; if (L_traceCount < 4) { - TRAC_INFO("update_avsbus_power_sensors: #%d Vd%c=%dx100mV, I=%dx10mA", L_traceCount, (i_type==AVSBUS_VDD)?'d':'n', - l_voltage_100mv, l_current_10ma); + TRAC_INFO("update_avsbus_power_sensors: #%d Vd%c=%dx100uV, I=%dx10mA", L_traceCount, (i_type==AVSBUS_VDD)?'d':'n', + l_voltage_100uv, l_current_10ma); TRAC_INFO("update_avsbus_power_sensors: #%d Vd%c Rloadline=%d, Rdistloss=%d", L_traceCount, (i_type==AVSBUS_VDD)?'d':'n', l_loadline, l_distloss); } #endif - if ((l_voltage_100mv != 0) && (l_current_10ma != 0)) + if ((l_voltage_100uv != 0) && (l_current_10ma != 0)) { // Calculate voltage on just processor package (need to take load-line into account) - // Voltage value stored in the sensor should be in 100mV (scale -1) - // (current is in 10mA units, and load-line is in tenth of microOhms) + // Voltage value stored in the sensor should be in 100uV (mV scale -1) + // (current is in 10mA units, and load-line is in microOhms) // v(V) = i(10mA)*(1 A/1000 mA) * r(1 uOhm)*(1 Ohm/1,000,000 uOhm) // = i * (1 A/100) * r * (1 Ohm/1,000,000) // = i * r / 100,000,000 - // v(mV) = v(V) * 1,000 - // v(100mV) = v(mV) / 100 - // = (v(V) * 1,000) / 100 = v(V) * 10 - // = (i * r / 100,000,000) * 10 = i * r / 10,000,000 + // v(uV) = v(V) * 1,000,000 + // v(100uV) = v(uV) / 100 + // = (v(V) * 1,000,000) / 100 = v(V) * 10,000 + // = (i * r / 100,000,000) * 10,000 = i * r / 10,000 // NOTE: distloss is the same as Rpath in the WOF algorithm - const uint64_t l_volt_drop_100mv = (l_current_10ma * (l_loadline+l_distloss)) / 10000000; + const uint64_t l_volt_drop_100uv = (l_current_10ma * (l_loadline+l_distloss)) / 10000; // Calculate chip voltage - int32_t l_chip_voltage_100mv = l_voltage_100mv - l_volt_drop_100mv; - if ((l_chip_voltage_100mv <= 0) || (l_chip_voltage_100mv > 0xFFFF)) + int32_t l_chip_voltage_100uv = l_voltage_100uv - l_volt_drop_100uv; + if ((l_chip_voltage_100uv <= 0) || (l_chip_voltage_100uv > 0xFFFF)) { // Voltage out of range, do not write sensors if (!*L_throttle) { - TRAC_ERR("update_avsbus_power_sensors: chip voltage out of range! %dmV - %d(100mV) = %d(100mV)", - l_voltage_100mv, WORD_LOW(l_volt_drop_100mv), l_chip_voltage_100mv); + TRAC_ERR("update_avsbus_power_sensors: chip voltage out of range! %d(100uV) - %d(100uV) = %d(100uV)", + l_voltage_100uv, WORD_LOW(l_volt_drop_100uv), l_chip_voltage_100uv); *L_throttle = TRUE; } } @@ -531,14 +542,14 @@ void update_avsbus_power_sensors(const avsbus_type_e i_type) { *L_throttle = FALSE; - // Update chip voltage (remote sense adjusted for loadline) (100mV units) - sensor_update(AMECSENSOR_PTR(l_voltageChip), (uint16_t)l_chip_voltage_100mv); + // Update chip voltage (remote sense adjusted for loadline) (100uV units) + sensor_update(AMECSENSOR_PTR(l_voltageChip), (uint16_t)l_chip_voltage_100uv); // Power value stored in the sensor should be in W (scale 0) - // p(W) = v(V) * i(A) = v(100mV)*100/1000 * i(10mA)*10/1000 - // = v(100mV)/10 * i(10mA)/100 - // = v(100mv) * i(10mA) / 1000 - const uint32_t l_power = l_chip_voltage_100mv * l_current_10ma / 1000; + // p(W) = v(V) * i(A) = v(100uV)*100/1,000,000 * i(10mA)*10/1000 + // = v(100uV)/10,000 * i(10mA)/100 + // = v(100uV) * i(10mA) / 1,000,000 + const uint32_t l_power = l_chip_voltage_100uv * l_current_10ma / 1000000; sensor_update(AMECSENSOR_PTR(l_powerSensor), (uint16_t)l_power); } @@ -547,15 +558,18 @@ void update_avsbus_power_sensors(const avsbus_type_e i_type) if (L_traceCount < 4) { const sensor_t *power = getSensorByGsid(l_powerSensor); - TRAC_INFO("update_avsbus_power_sensors: #%d Vd%cs=%dx100mV, P=%dW", L_traceCount, (i_type==AVSBUS_VDD)?'d':'n', - l_chip_voltage_100mv, power->sample); + TRAC_INFO("update_avsbus_power_sensors: #%d Vd%cs=%dx100uV, P=%dW", L_traceCount, (i_type==AVSBUS_VDD)?'d':'n', + l_chip_voltage_100uv, power->sample); } #endif } #ifdef AVSDEBUG // TODO: RTC 130216 : REMOVE AFTER VERIFYING loadline/distlost from Pstate Super Structure - ++L_traceCount; + if (L_traceCount < 4) + { + ++L_traceCount; + } #endif } // end update_avsbus_power_sensors() @@ -581,14 +595,20 @@ void amec_update_avsbus_sensors(void) AVSBUS_STATE_DISABLED = 0, AVSBUS_STATE_INITIATE_READ = 1, AVSBUS_STATE_PROCESS_CURRENT = 2, - AVSBUS_STATE_PROCESS_VOLTAGE = 3 + AVSBUS_STATE_PROCESS_VOLTAGE = 3, + AVSBUS_STATE_PROCESS_STATUS = 4 } L_avsbus_state = AVSBUS_STATE_INITIATE_READ; + // Number of Curr/Volt readings between Status readings +#define NUM_VRM_READINGS_PER_STATUS 2 + static unsigned int L_readingCount = 0; + if (isSafeStateRequested()) { L_avsbus_state = AVSBUS_STATE_DISABLED; G_avsbus_vdd_monitoring = FALSE; G_avsbus_vdn_monitoring = FALSE; + G_vrm_thermal_monitoring = FALSE; } switch (L_avsbus_state) @@ -610,7 +630,30 @@ void amec_update_avsbus_sensors(void) case AVSBUS_STATE_PROCESS_VOLTAGE: // Process the voltage readings process_avsbus_voltage(); - // Initiate read of currents + + if ((G_vrm_thermal_monitoring == FALSE) || (++L_readingCount < NUM_VRM_READINGS_PER_STATUS)) + { + // Initiate read of currents + initiate_avsbus_reads(AVSBUS_CURRENT); + L_avsbus_state = AVSBUS_STATE_PROCESS_CURRENT; + } + else + { + // Periodically read status for VR FAN (VRM OT WARNING) + initiate_avsbus_read_status(); + L_avsbus_state = AVSBUS_STATE_PROCESS_STATUS; + L_readingCount = 0; + } + break; + + case AVSBUS_STATE_PROCESS_STATUS: + // Process the status + { + // Update sensor with the OT status (0 / 1) + uint16_t otStatus = process_avsbus_status(); + sensor_update(AMECSENSOR_PTR(VRFAN), otStatus); + } + // Back to reading currents initiate_avsbus_reads(AVSBUS_CURRENT); L_avsbus_state = AVSBUS_STATE_PROCESS_CURRENT; break; @@ -637,95 +680,6 @@ void amec_update_avsbus_sensors(void) } // end amec_update_avsbus_sensors() -// Function Specification -// -// Name: amec_update_vrm_sensors -// -// Description: Updates sensors that use data from the VRMs -// (e.g., VR_FAN, FANS_FULL_SPEED, VR_HOT). -// -// Thread: RealTime Loop -// -// End Function Specification -void amec_update_vrm_sensors(void) -{ -// TODO: RTC 132561 - VR_FAN support -#if 0 - /*------------------------------------------------------------------------*/ - /* Local Variables */ - /*------------------------------------------------------------------------*/ - int l_rc = 0; - int l_vrfan = 0; - int l_softoc = 0; - int l_minus_np1_regmode = 0; - int l_minus_n_regmode = 0; - static uint8_t L_error_count = 0; - uint8_t l_pin_value = 1; // active low, so set default to high - uint8_t l_vrhot_count = 0; - errlHndl_t l_err = NULL; - - /*------------------------------------------------------------------------*/ - /* Code */ - /*------------------------------------------------------------------------*/ - - // VR_FAN and SOFT_OC come from SPIVID - l_rc = vrm_read_state(SPIVRM_PORT(0), - &l_minus_np1_regmode, - &l_minus_n_regmode, - &l_vrfan, - &l_softoc); - if (l_rc == 0) - { - // Update the VR_FAN sensor - sensor_update( AMECSENSOR_PTR(VRFAN250USPROC), (uint16_t)l_vrfan ); - - // Clear our error count - L_error_count = 0; - - // No longer reading gpio from APSS in GA1 due to instability in - // APSS composite mode - //apss_gpio_get(l_pin, &l_pin_value); - - // VR_HOT sensor is a counter of number of times the VRHOT signal - // has been asserted - l_vrhot_count = AMECSENSOR_PTR(VRHOT250USPROC)->sample; - - // Check if VR_FAN is asserted AND if 'fans_full_speed' GPIO is ON. - // Note that this GPIO is active low. - if (AMECSENSOR_PTR(VRFAN250USPROC)->sample && !(l_pin_value)) - { - // VR_FAN is asserted and 'fans_full_speed' GPIO is ON, - // then increment our VR_HOT counter - if (l_vrhot_count < g_amec->vrhotproc.setpoint) - { - l_vrhot_count++; - } - } - else - { - // Reset our VR_HOT counter - l_vrhot_count = 0; - } - sensor_update(AMECSENSOR_PTR(VRHOT250USPROC), l_vrhot_count); - } - else - { - // Increment our error count - L_error_count++; - - // Don't allow the error count to wrap - if (L_error_count == 0) - { - L_error_count = 0xFF; - } - } - - sensor_update( AMECSENSOR_PTR(VRFAN250USMEM), 0 ); - sensor_update( AMECSENSOR_PTR(VRHOT250USMEM), 0 ); -#endif -} // end amec_update_vrm_sensors() - - /*----------------------------------------------------------------------------*/ /* End */ /*----------------------------------------------------------------------------*/ diff --git a/src/occ_405/amec/amec_sensors_power.h b/src/occ_405/amec/amec_sensors_power.h index 7307b74..9fef1de 100755 --- a/src/occ_405/amec/amec_sensors_power.h +++ b/src/occ_405/amec/amec_sensors_power.h @@ -50,8 +50,4 @@ void amec_update_apss_sensors(void); // sensors for data that comes from the AVS Bus (Voltage/Current) void amec_update_avsbus_sensors(void); -// Function that is called by AMEC State Machine that will update the AMEC -// sensors for data that comes from the SPIVID chip (VR_FAN, SoftOC) -void amec_update_vrm_sensors(void); - #endif // _AMEC_SENSORS_POWER_H diff --git a/src/occ_405/amec/amec_service_codes.h b/src/occ_405/amec/amec_service_codes.h index ddc92e0..076bef9 100755 --- a/src/occ_405/amec/amec_service_codes.h +++ b/src/occ_405/amec/amec_service_codes.h @@ -63,7 +63,6 @@ enum occAmecModuleId AMEC_HEALTH_CHECK_CENT_TIMEOUT = AMEC_COMP_ID | 0x12, AMEC_HEALTH_CHECK_VRFAN_TIMEOUT = AMEC_COMP_ID | 0x13, AMEC_HEALTH_CHECK_PROC_TIMEOUT = AMEC_COMP_ID | 0x14, - AMEC_HEALTH_CHECK_PROC_VRHOT = AMEC_COMP_ID | 0x15, AMEC_CALC_DTS_SENSORS = AMEC_COMP_ID | 0x16, AMEC_SET_FREQ_RANGE = AMEC_COMP_ID | 0x17, }; diff --git a/src/occ_405/amec/amec_slave_smh.c b/src/occ_405/amec/amec_slave_smh.c index 1385e8b..18db711 100755 --- a/src/occ_405/amec/amec_slave_smh.c +++ b/src/occ_405/amec/amec_slave_smh.c @@ -61,7 +61,6 @@ // Externs //************************************************************************* extern dcom_slv_inbox_t G_dcom_slv_inbox_rx; -extern uint8_t G_vrm_thermal_monitoring; //************************************************************************* // Macros @@ -287,8 +286,6 @@ void amec_slv_check_apss_fail(void) // End Function Specification void amec_slv_common_tasks_pre(void) { - static uint16_t L_counter = 0; - AMEC_DBG("\tAMEC Slave Pre-State Common\n"); // Update the FW Worst Case sensors every tick @@ -304,17 +301,6 @@ void amec_slv_common_tasks_pre(void) // TODO: RTC 163683 - AMEC analytics //amec_analytics_sb_recording(); - // Update the sensors that come from the VRM - L_counter++; - if (L_counter == AMEC_UPDATE_VRM_TICKS) - { - if (G_vrm_thermal_monitoring) - { - amec_update_vrm_sensors(); - } - L_counter = 0; - } - // Over-subscription check amec_oversub_check(); } @@ -1066,10 +1052,6 @@ void amec_slv_substate_5_1(void) // Update Proc Core sensors (for this substate) //------------------------------------------------------- amec_update_proc_core_group(6); - - // Call controller on VRHOT signal from processor regulator - // TODO: RTC 155562 - VRM thermal monitoring - //amec_controller_vrhotproc(); } diff --git a/src/occ_405/amec/amec_sys.h b/src/occ_405/amec/amec_sys.h index bf2a003..61e716a 100755 --- a/src/occ_405/amec/amec_sys.h +++ b/src/occ_405/amec/amec_sys.h @@ -364,10 +364,7 @@ typedef struct sensor_t pwrapssch[MAX_APSS_ADC_CHANNELS]; sensor_t cur12Vstby; - sensor_t vrfan250usmem; - sensor_t vrhot250usmem; - sensor_t vrfan250usproc; - sensor_t vrhot250usproc; + sensor_t vrfan; // Chip Sensors sensor_t todclock0; diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c index dbdd75a..9f3adfa 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c @@ -50,6 +50,7 @@ #include "cmdh_dbug_cmd.h" extern dimm_sensor_flags_t G_dimm_temp_expired_bitmap; +extern bool G_vrm_thermal_monitoring; // This table contains tunable parameter information that can be exposed to // customers (only Master OCC should access/control this table) @@ -328,6 +329,19 @@ ERRL_RC cmdh_poll_v20(cmdh_fsp_rsp_t * o_rsp_ptr) } } + if (G_vrm_thermal_monitoring) + { + // Add VRFAN + const sensor_t *vrfan = getSensorByGsid(VRFAN); + if (vrfan != NULL) + { + l_tempSensorList[l_sensorHeader.count].id = 0; + l_tempSensorList[l_sensorHeader.count].fru_type = DATA_FRU_VRM; + l_tempSensorList[l_sensorHeader.count].value = vrfan->sample & 0xFF; + l_sensorHeader.count++; + } + } + // Copy header first. memcpy ((void *) &(o_rsp_ptr->data[l_rsp_index]), (void *)&l_sensorHeader, sizeof(l_sensorHeader)); // Increment index into response buffer. diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c index 30e2ea9..47bc2eb 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c @@ -99,7 +99,7 @@ cmdh_ips_config_data_t G_ips_config_data = {0}; bool G_mem_monitoring_allowed = FALSE; // Flag will get enabled when OCC receives Thermal Threshold data -uint8_t G_vrm_thermal_monitoring = 0; +bool G_vrm_thermal_monitoring = FALSE; // Function Specification // @@ -1568,16 +1568,16 @@ errlHndl_t data_store_thrm_thresholds(const cmdh_fsp_cmd_t * i_cmd_ptr, { // Then, set a global variable so that OCC attempts to talk to // the VRMs - G_vrm_thermal_monitoring = 1; + G_vrm_thermal_monitoring = TRUE; } else { - // No VRM data was received, so do not attempt to talk to the VRMs. + // No VRM data was received, so do not read AVS Bus status from VRMs // Also, make the error count very high so that the health // monitor doesn't complain about VRHOT being asserted. - G_vrm_thermal_monitoring = 0; + G_vrm_thermal_monitoring = FALSE; G_data_cnfg->thrm_thresh.data[DATA_FRU_VRM].error_count = 0xFF; - CMDH_TRAC_IMP("data_store_thrm_thresholds: No VRM data was received! OCC won't attempt to talk to VRMs."); + CMDH_TRAC_IMP("data_store_thrm_thresholds: No VRM limits received. OCC will not monitor AVS bus status"); } } while(0); diff --git a/src/occ_405/dcom/dcom.h b/src/occ_405/dcom/dcom.h index b14312a..c7e0b4b 100755 --- a/src/occ_405/dcom/dcom.h +++ b/src/occ_405/dcom/dcom.h @@ -200,8 +200,8 @@ typedef struct __attribute__ ((packed)) uint16_t tempprocavg; // [172] uint16_t tempprocthermal; // [174] uint16_t util4msp0cy[MAX_CORES]; // [176] - uint16_t vrfan250usmem; // [224] - uint16_t vrfan250usproc; // [226] + uint16_t vrfan; // [224] + uint16_t reserved0; // [226] uint16_t mrd2msp0mx[MAX_NUM_MEM_CONTROLLERS]; // [228] uint16_t mwr2msp0mx[MAX_NUM_MEM_CONTROLLERS]; // [244] uint16_t pwrpx250usp0cy[MAX_CORES]; // [260] diff --git a/src/occ_405/errl/errl.h b/src/occ_405/errl/errl.h index fcfb83b..6e8b589 100755 --- a/src/occ_405/errl/errl.h +++ b/src/occ_405/errl/errl.h @@ -270,12 +270,16 @@ extern errlHndl_t G_occErrSlots[ERRL_MAX_SLOTS]; #define ERR_HISTORY_SIZE 32 extern uint8_t G_error_history[ERR_HISTORY_SIZE]; typedef enum { - ERR_AVSBUS_VDD_CURRENT = 1, - ERR_AVSBUS_VDD_VOLTAGE = 2, - ERR_AVSBUS_VDN_CURRENT = 3, - ERR_AVSBUS_VDN_VOLTAGE = 4, - ERR_DIMM_I2C_PORT0 = 5, - ERR_DIMM_I2C_PORT1 = 6 + ERR_AVSBUS_VDD_CURRENT = 1, + ERR_AVSBUS_VDD_VOLTAGE = 2, + ERR_AVSBUS_VDN_CURRENT = 3, + ERR_AVSBUS_VDN_VOLTAGE = 4, + ERR_DIMM_I2C_PORT0 = 5, + ERR_DIMM_I2C_PORT1 = 6, + ERR_AVSBUS_VDD_OVER_TEMPERATURE = 7, + ERR_AVSBUS_VDN_OVER_TEMPERATURE = 8, + ERR_AVSBUS_VDD_OVER_CURRENT = 9, + ERR_AVSBUS_VDN_OVER_CURRENT = 10, } ERR_HISTORY_INDEX; #define INCREMENT_ERR_HISTORY(errorIndex) { \ if ((errorIndex < ERR_HISTORY_SIZE) && (G_error_history[errorIndex] < 255)) { \ diff --git a/src/occ_405/main.c b/src/occ_405/main.c index e4eaf6e..defb159 100755 --- a/src/occ_405/main.c +++ b/src/occ_405/main.c @@ -967,12 +967,11 @@ void hmon_routine() commitErrl(&l_err); } - //if we are in observation or activate state, then monitor the processor temperature - //for timeout conditions and the processor VRHOT signal. + //if we are in observation or active state, then monitor the processor temperature + //for timeout conditions if (IS_OCC_STATE_OBSERVATION() || IS_OCC_STATE_ACTIVE()) { amec_health_check_proc_timeout(); - amec_health_check_proc_vrhot(); } //if we are in observation or active state with memory temperature data being collected diff --git a/src/occ_405/occ_service_codes.h b/src/occ_405/occ_service_codes.h index 6633ba5..163ee99 100644 --- a/src/occ_405/occ_service_codes.h +++ b/src/occ_405/occ_service_codes.h @@ -61,10 +61,8 @@ enum occReasonCode EXTERNAL_INTERFACE_FAILURE = 0x18, /// VRM reached error threshold (VR_HOT asserted) VRM_ERROR_TEMP = 0x20, - /// Timed out reading VR_FAN signal from VRM - VRM_VRFAN_TIMEOUT = 0x21, - /// VR_FAN signal from VRM has been asserted - VRM_VRFAN_ASSERTED = 0x22, + /// VR_FAN - AVS Bus over-temperature reported + VRM_VRFAN_WARNING = 0x22, /// DIMM reached error threshold DIMM_ERROR_TEMP = 0x30, /// Frequency limited due to oversubscription condition @@ -98,9 +96,8 @@ enum occReasonCode OCC_SYSTEM_HALTED = 0xB5, /// Request to read APSS data failed. APSS_GPE_FAILURE = 0xC0, - /// Connector overcurrent pin still asserted. - CONNECTOR_OC_PINS_WARNING = 0xC1, - CONNECTOR_OC_PINS_FAILURE = 0xC2, + /// AVS Bus output over-current reported + VRM_OVER_CURRENT_WARNING = 0xC1, /// Slave OCC failed to receive new APSS data over a short time interval APSS_SLV_SHORT_TIMEOUT = 0xC3, /// Slave OCC failed to receive new APSS data over a long time interval @@ -232,6 +229,7 @@ enum occExtReasonCode ERC_AVSBUS_VDD_CURRENT_FAILURE = 0x00AB, ERC_AVSBUS_VDN_VOLTAGE_FAILURE = 0x00AC, ERC_AVSBUS_VDN_CURRENT_FAILURE = 0x00AD, + ERC_AVSBUS_STATUS_FAILURE = 0x00AE, ERC_PGPE_BEACON_TIMEOUT = 0x00B0, ERC_PGPE_NOT_IDLE = 0x00B1, diff --git a/src/occ_405/occ_sys_config.c b/src/occ_405/occ_sys_config.c index 867dc8d..cc6c3cc 100755 --- a/src/occ_405/occ_sys_config.c +++ b/src/occ_405/occ_sys_config.c @@ -159,12 +159,10 @@ occSysConfigData_t G_sysConfigData = .avsbus_vdd = { .bus = 0, .rail = 0, - .loadline = 0 }, .avsbus_vdn = { .bus = 0, .rail = 0, - .loadline = 0 }, // ----------------------------------------------------------- diff --git a/src/occ_405/occ_sys_config.h b/src/occ_405/occ_sys_config.h index 6b85d7c..fb45635 100755 --- a/src/occ_405/occ_sys_config.h +++ b/src/occ_405/occ_sys_config.h @@ -214,7 +214,6 @@ typedef struct { uint8_t bus; uint8_t rail; - uint16_t loadline; } avsbusData_t; // Master/Slave Configuration diff --git a/src/occ_405/pss/avsbus.c b/src/occ_405/pss/avsbus.c index 6b76379..6e65b2f 100644 --- a/src/occ_405/pss/avsbus.c +++ b/src/occ_405/pss/avsbus.c @@ -34,6 +34,7 @@ #include "pss_service_codes.h" #include "ssx.h" #include "occ_util.h" +#include "cmdh_fsp_cmds_datacnfg.h" //#define AVSDEBUG @@ -49,12 +50,16 @@ bool G_avsbus_vdn_monitoring = FALSE; extern uint32_t G_nest_frequency_mhz; #define AVSBUS_FREQUENCY_MHZ 10 +extern bool G_vrm_thermal_monitoring; // Number of read failures allowed before elog is created and reset requested. // This should be no longer than 4ms (or it will impact WOF calculations) // (readings are taken every 500us => 500us * 8 = 4ms) const uint8_t MAX_READ_ATTEMPTS = 8; +const uint16_t AVSBUS_STATUS_READ_ERROR = 0xFFFF; +extern data_cnfg_t * G_data_cnfg; + // NOTE: OCC must use Bridge B, because Bridge A is reserved for PGPE // AVS Bus setup that must be done once (common between read/write operations) @@ -275,12 +280,12 @@ void avsbus_read_start(const avsbus_type_e i_type, // HW: Wait for bus op to complete // HW: arbitration between two bridges - // HW: o2s_ongoning: 0 -> 1 + // HW: o2s_ongoing: 0 -> 1 // HW: execution completes // HW: o2s_ongoing 1 -> 0 #ifdef AVSDEBUG - ++*l_trace_count; // DEBUG + ++*l_trace_count; #endif } // end avsbus_read_start() @@ -293,7 +298,7 @@ uint16_t avsbus_read(const avsbus_type_e i_type, { if (isSafeStateRequested()) { - // No need to attempt read if OCC will be reset + // No need to process data if OCC will be reset return 0; } @@ -342,7 +347,7 @@ uint16_t avsbus_read(const avsbus_type_e i_type, // HW: Wait for bus op to complete // HW: arbitration between two bridges - // HW: o2s_ongoning: 0 -> 1 + // HW: o2s_ongoing: 0 -> 1 // HW: execution completes // HW: o2s_ongoing 1 -> 0 @@ -379,7 +384,7 @@ uint16_t avsbus_read(const avsbus_type_e i_type, rc = AVSBUS_ERROR; } } - else if (1 == (l_status >> 63)) // o2s_ongoing + else if (l_status & 0x8000000000000000) // o2s_ongoing { // o2s_ongoing bit was still set (operation did not complete) l_failure = TRUE; @@ -508,6 +513,7 @@ uint16_t avsbus_read(const avsbus_type_e i_type, *l_error_count, l_trace_type, l_trace_cmd); G_avsbus_vdd_monitoring = FALSE; G_avsbus_vdn_monitoring = FALSE; + G_vrm_thermal_monitoring = FALSE; errlHndl_t l_err = createErrl(PSS_MID_AVSBUS_READ, rc, exrc, @@ -526,7 +532,7 @@ uint16_t avsbus_read(const avsbus_type_e i_type, } #ifdef AVSDEBUG - ++*l_trace_count; // DEBUG + ++*l_trace_count; #endif return o_reading; @@ -553,3 +559,441 @@ void initiate_avsbus_reads(avsbus_cmdtype_e i_cmdType) } // end initiate_avsbus_reads() + +// Initiate read for vr fan +void initiate_avsbus_read_status() +{ + if (isSafeStateRequested() || (G_vrm_thermal_monitoring == FALSE)) + { + // No need to attempt read if OCC will be reset + return; + } + +#ifdef AVSDEBUG + static uint32_t L_trace_count = 0; + uint32_t DEBUG_TRACE_MAX = 2; +#endif + + unsigned int index; + for (index = 0; index <= 1; ++index) + { + // Determine busses that are being monitored + uint8_t bus = 0xFF; + if ((index == 0) && G_avsbus_vdd_monitoring) + { + bus = G_sysConfigData.avsbus_vdd.bus; + } + else if ((index == 1) && G_avsbus_vdn_monitoring) + { + bus = G_sysConfigData.avsbus_vdn.bus; + } + if (bus != 0xFF) + { + // Determine register based on the bus number + uint32_t o2scmd_reg = OCB_O2SCMD0B; + uint32_t o2swd_reg = OCB_O2SWD0B; + if (0 == bus) + { + o2scmd_reg = OCB_O2SCMD0B; + o2swd_reg = OCB_O2SWD0B; + } + else + { + o2scmd_reg = OCB_O2SCMD1B; + o2swd_reg = OCB_O2SWD1B; + } + +#ifdef AVSDEBUG + if (L_trace_count < DEBUG_TRACE_MAX) + { + TRAC_INFO("initiate_avsbus_read_status: read Status - bus[%d], rail[broadcast]", bus); + } +#endif + + // Write O2SCMD[a][n] + // o2s_clear_sticky_bits = 1 + uint64_t value; + value = 0x4000000000000000; + out64(o2scmd_reg, value); + + // Write O2SWD[a][n] - write commands and initiate hardware operation + // o2s_wdata with content + // AVS Bus command (read staus): + // 0:1 StartCode = 0b01 + // 2:3 Cmd = 0b11 (read) + // 4 CmdGroup = 0b0 (AVSBus) + // 5:8 CmdDataType (STATUS = 01110b) + // 9:12 Select (All rails / broadcast = 01111b ) + // 13:28 CmdData (reserved / must be 1s) + // 29:31 CRC + // 01110DDD DRRRR111 11111111 11111CCC + // 01110111 01111111 11111111 11111CCC + value = 0x777FFFF800000000; + // Calculate/add CRC + value |= avs_crc_calculate(value); + out64(o2swd_reg, value); + } + } + + // Read has been started so now just wait for HW to complete + + // HW: Wait for bus op to complete + // HW: arbitration between two bridges + // HW: o2s_ongoing: 0 -> 1 + // HW: execution completes + // HW: o2s_ongoing 1 -> 0 + +#ifdef AVSDEBUG + ++L_trace_count; +#endif + +} // end initiate_avsbus_read_status() + + +// Process AVS Bus read status results (or errors) +// Predictive error will be logged after "VRMs: max_read_timeout" failures +// and a mfg error will be committed. +// Returns the status data or AVSBUS_STATUS_READ_ERROR on error +uint16_t avsbus_read_status(const avsbus_type_e i_type) +{ + if (isSafeStateRequested() || (G_vrm_thermal_monitoring == FALSE)) + { + // No need to process data if OCC will be reset + return 0; + } + + uint16_t o_reading = 0; + bool l_failure = FALSE; + const uint8_t max_read_attempts = G_data_cnfg->thrm_thresh.data[DATA_FRU_VRM].max_read_timeout; + + // Static error counters for each type (Vdd/Vdn) + static uint32_t L_error_count[ERRORCOUNT_MAXTYPES] = {0}; + uint32_t * l_error_count = &L_error_count[i_type]; + + char l_trace_type = 'd'; + avsbusData_t l_data = G_sysConfigData.avsbus_vdd; + if (AVSBUS_VDN == i_type) + { + l_trace_type = 'n'; + l_data = G_sysConfigData.avsbus_vdn; + } + +#ifdef AVSDEBUG + static uint32_t L_trace_count = 0; + uint32_t DEBUG_TRACE_MAX = 2; + if (L_trace_count < DEBUG_TRACE_MAX) + { + TRAC_INFO("avsbus_read_status: Vd%c - bus[%d] rail[%d]", + l_trace_type, l_data.bus, l_data.rail); + } +#endif + + // Determine register based on the bus number + uint32_t o2sst_reg = OCB_O2SST0B; + uint32_t o2srd_reg = OCB_O2SRD0B; + if (1 == l_data.bus) + { + o2sst_reg = OCB_O2SST1B; + o2srd_reg = OCB_O2SRD1B; + } + + // HW: Wait for bus op to complete + // HW: arbitration between two bridges + // HW: o2s_ongoing: 0 -> 1 + // HW: execution completes + // HW: o2s_ongoing 1 -> 0 + + // Since read was started in previous tick, it should have already completed + // (no need to poll/wait on o2s_ongoing) + enum occReasonCode rc = OCC_SUCCESS_REASON_CODE; + uint64_t l_status = in64(o2sst_reg); + // OCC O2S Status Register + // 0 o2s_ongoing + // 1:4 reserved + // 5 write_while_bridge_busy_error + // 6 reserved + // 7 FSM error + // 8:63 reserved + // GrrrrBrF rrrrrrrr rrrrrrrr rrrrrrrr + + if (0 != (l_status & 0x0500000000000000)) + { + // error bit was set + l_failure = TRUE; + (*l_error_count)++; + if ((*l_error_count == 1) || (*l_error_count == max_read_attempts)) + { + TRAC_ERR("avsbus_read_status: Error found in Vd%c O2SST[0x%08X] = [0x%08X]", + l_trace_type, o2sst_reg, WORD_HIGH(l_status)); + /* + * @errortype + * @moduleid PSS_MID_AVSBUS_READ + * @reasoncode AVSBUS_ERROR + * @userdata1 AVS Bus type/bus/rail + * @userdata2 status + * @devdesc Error encountered when reading AVS Bus + */ + rc = AVSBUS_ERROR; + } + } + else if (l_status & 0x8000000000000000) // o2s_ongoing + { + // o2s_ongoing bit was still set (operation did not complete) + l_failure = TRUE; + (*l_error_count)++; + if ((*l_error_count == 1) || (*l_error_count == max_read_attempts)) + { + TRAC_ERR("avsbus_read_status: Vd%c timeout waiting for o2s_ongoing change O2SST[0x%08X] = [0x%08X]", + l_trace_type, o2sst_reg, WORD_HIGH(l_status)); + /* + * @errortype + * @moduleid PSS_MID_AVSBUS_READ + * @reasoncode AVSBUS_TIMEOUT + * @userdata1 AVS Bus type/bus/rail + * @userdata2 status + * @devdesc Timeout when reading AVS Bus + */ + rc = AVSBUS_TIMEOUT; + } + } + + if (FALSE == l_failure) + { + // Read the response data + uint64_t value = in64(o2srd_reg); + // AVS Bus response (read status): + // 0:1 SlaveAck (0b00 from slave indicates good CRC and action was taken) + // 2 0 + // 3:7 StatusResp + // 8:23 CmdData (LSB = 1mV or 10mA) + // 24:28 Reserved (must be all 1s) + // 29:31 CRC + // AA0SSSSS VVVVVVVV VVVVVVVV 11111CCC + + // Validate CRC + const uint64_t crc = avs_crc_calculate(value); + if (crc != (value & AVS_CRC_MASK)) + { + l_failure = TRUE; + (*l_error_count)++; + if ((*l_error_count == 1) || (*l_error_count == max_read_attempts)) + { + TRAC_ERR("avsbus_read_status: CRC mismatch in Vd%c rsp O2SRD[0x%08X] = [0x%08X] (calculated CRC 0x%08X)", + l_trace_type, o2srd_reg, WORD_HIGH(value), WORD_HIGH(crc)); + /* + * @errortype + * @moduleid PSS_MID_AVSBUS_READ + * @reasoncode AVSBUS_CRC_ERROR + * @userdata1 AVS Bus type/bus/rail + * @userdata2 status + * @devdesc CRC error reading AVS Bus + */ + rc = AVSBUS_CRC_ERROR; + } + } + // Check for valid command operation and extract read data + else if (0 == (value & 0xC000000000000000)) + { + // AVS Bus Status: + // 0 VDone + // 1 IOUT_OC_WARNING (over-current) + // 2 VOUT_UV_WARNING (under-voltage) + // 3 IOUT_OT_WARNING (over-temperature) + // 4 POUT_OP_WARNING (over power) + // 5-7 reserved + // 8-15 reserved + o_reading = (value >> 40) & 0x0000FFFF; + +#ifdef AVSDEBUG + static uint16_t L_lastReading = 0; + if ((L_trace_count < DEBUG_TRACE_MAX) || (o_reading != L_lastReading)) + { + TRAC_INFO("avsbus_read_status: Successfully read Vd%c status 0x%04X [0x%08X]", + l_trace_type, o_reading, WORD_HIGH(value)); + L_lastReading = o_reading; + } +#endif + if (*l_error_count) + { + // Trace and clear the error count + TRAC_INFO("avsbus_read_status: Successfully read Vd%c status [0x%08X] (error count=%d)", + l_trace_type, WORD_HIGH(value), *l_error_count); + *l_error_count = 0; + } + } + else + { + l_failure = TRUE; + (*l_error_count)++; + if ((*l_error_count == 1) || (*l_error_count == max_read_attempts)) + { + TRAC_ERR("avsbus_read_status: SlaveAck reported no action taken[0x%08X]", WORD_HIGH(value)); + rc = AVSBUS_ERROR; + } + } + } + + if (l_failure) + { + if (*l_error_count == max_read_attempts) + { + TRAC_ERR("avsbus_read_status: Reached %d consecutive Vd%c errors reading status", + *l_error_count, l_trace_type); + G_avsbus_vdd_monitoring = FALSE; + G_avsbus_vdn_monitoring = FALSE; + G_vrm_thermal_monitoring = FALSE; + errlHndl_t l_err = createErrl(PSS_MID_AVSBUS_READ, + rc, + ERC_AVSBUS_STATUS_FAILURE, + ERRL_SEV_PREDICTIVE, + NULL, + DEFAULT_TRACE_SIZE, + (i_type << 16) | (l_data.bus << 8) | l_data.rail, + WORD_HIGH(l_status)); + setErrlActions(l_err, ERRL_ACTIONS_MANUFACTURING_ERROR); + // add processor callout + addCalloutToErrl(l_err, + ERRL_CALLOUT_TYPE_HUID, + G_sysConfigData.proc_huid, + ERRL_CALLOUT_PRIORITY_MED); + commitErrl(&l_err); + } + o_reading = AVSBUS_STATUS_READ_ERROR; + } + +#ifdef AVSDEBUG + ++L_trace_count; // DEBUG +#endif + + return o_reading; + +} // end avsbus_read_status() + + +// Read the status from AVS Bus and return 1 if over-temperature was found for either bus +// or 0 if no OT was found. 0xFF will be returned if there was an error reading status. +// Error history counters will be incremented for any over-temp/over-current condition. +// Mfg error will be logged for the first OT or first OC condition. +uint8_t process_avsbus_status() +{ + uint8_t foundOT = 0; + uint8_t foundOC = 0; + uint16_t vdd_status = 0; + uint16_t vdn_status = 0; + + if (G_vrm_thermal_monitoring) + { + if (G_avsbus_vdd_monitoring) + { + vdd_status = avsbus_read_status(AVSBUS_VDD); + if (vdd_status != AVSBUS_STATUS_READ_ERROR) + { + if (vdd_status & AVSBUS_STATUS_OVER_TEMPERATURE_MASK) + { + foundOT = 1; + INCREMENT_ERR_HISTORY(ERR_AVSBUS_VDD_OVER_TEMPERATURE); + } + + if (vdd_status & AVSBUS_STATUS_OVER_CURRENT_MASK) + { + foundOC = 1; + INCREMENT_ERR_HISTORY(ERR_AVSBUS_VDD_OVER_CURRENT); + } + } + else + { + // 0xFF indicates error reading status + foundOT = 0xFF; + } + } + if (G_avsbus_vdn_monitoring) + { + vdn_status = avsbus_read_status(AVSBUS_VDN); + if (vdn_status != AVSBUS_STATUS_READ_ERROR) + { + if (vdn_status & AVSBUS_STATUS_OVER_TEMPERATURE_MASK) + { + // if no Vdd error, update OT result + if (foundOT != 0xFF) + { + foundOT = 1; + } + INCREMENT_ERR_HISTORY(ERR_AVSBUS_VDN_OVER_TEMPERATURE); + } + + if (vdn_status & AVSBUS_STATUS_OVER_CURRENT_MASK) + { + foundOC = 1; + INCREMENT_ERR_HISTORY(ERR_AVSBUS_VDN_OVER_CURRENT); + } + } + else + { + // 0xFF indicates error reading status + foundOT = 0xFF; + } + } + + // Log an error the first time either condition is asserted + static bool loggedOT = FALSE; + static bool loggedOC = FALSE; + errlHndl_t l_err; + if ((foundOT == 1) && !loggedOT) + { + loggedOT = TRUE; + /* @ + * @errortype + * @moduleid PSS_MID_AVSBUS_READ + * @reasoncode VRM_VRFAN_WARNING + * @userdata1 Vdd Status + * @userdata2 Vdn Status + * @devdesc VRFAN / over-temperature asserted + */ + l_err = createErrl(PSS_MID_AVSBUS_READ, + VRM_VRFAN_WARNING, + OCC_NO_EXTENDED_RC, + ERRL_SEV_INFORMATIONAL, + NULL, + DEFAULT_TRACE_SIZE, + vdd_status, vdn_status); + setErrlActions(l_err, ERRL_ACTIONS_MANUFACTURING_ERROR); + // add processor callout + addCalloutToErrl(l_err, + ERRL_CALLOUT_TYPE_HUID, + G_sysConfigData.proc_huid, + ERRL_CALLOUT_PRIORITY_MED); + commitErrl(&l_err); + } + if ((foundOC == 1) && !loggedOC) + { + loggedOC = TRUE; + /* @ + * @errortype + * @moduleid PSS_MID_AVSBUS_READ + * @reasoncode VRM_OVER_CURRENT_WARNING + * @userdata1 Vdd Status + * @userdata2 Vdn Status + * @devdesc Output over-current asserted + */ + l_err = createErrl(PSS_MID_AVSBUS_READ, + VRM_OVER_CURRENT_WARNING, + OCC_NO_EXTENDED_RC, + ERRL_SEV_INFORMATIONAL, + NULL, + DEFAULT_TRACE_SIZE, + vdd_status, vdn_status); + setErrlActions(l_err, ERRL_ACTIONS_MANUFACTURING_ERROR); + // add processor callout + addCalloutToErrl(l_err, + ERRL_CALLOUT_TYPE_HUID, + G_sysConfigData.proc_huid, + ERRL_CALLOUT_PRIORITY_MED); + commitErrl(&l_err); + } + } + + return foundOT; + +} // end process_avsbus_status() + + diff --git a/src/occ_405/pss/avsbus.h b/src/occ_405/pss/avsbus.h index 80b91cf..49a2af9 100755 --- a/src/occ_405/pss/avsbus.h +++ b/src/occ_405/pss/avsbus.h @@ -31,6 +31,11 @@ extern bool G_avsbus_vdd_monitoring; extern bool G_avsbus_vdn_monitoring; +#define AVSBUS_STATUS_OVER_CURRENT_MASK 0x4000 +#define AVSBUS_STATUS_UNDER_VOLTAGE_MASK 0x2000 +#define AVSBUS_STATUS_OVER_TEMPERATURE_MASK 0x1000 +#define AVSBUS_STATUS_OVER_POWER_MASK 0x0800 + typedef enum { AVSBUS_VDD = 0x00, @@ -59,5 +64,14 @@ void initiate_avsbus_reads(avsbus_cmdtype_e i_cmdType); uint16_t avsbus_read(const avsbus_type_e i_type, const avsbus_cmdtype_e i_cmdtype); +// Initiate read of AVS Bus Status +// (results can then be read on the next tick) +void initiate_avsbus_read_status(); + +// Read the status from AVS Bus and return 1 if over-temperature was found for either bus +// or 0 if no OT was found. 0xFF will be returned if there was an error reading status +// on either bus. Mfg error will be logged for the first OT or first OC condition. +// Error history counters will be incremented for any over-temp/over-current condition. +uint8_t process_avsbus_status(); #endif //_AVSBUS_H diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h index 37c411c..9b70941 100755 --- a/src/occ_405/sensor/sensor_enum.h +++ b/src/occ_405/sensor/sensor_enum.h @@ -69,9 +69,6 @@ enum e_gsid PROBE250US6, // Internal Sensor for debug via AMESTER PROBE250US7, // Internal Sensor for debug via AMESTER - VOLTVDDSENSE, // chip voltage (remote sense adjusted for loadline) - VOLTVDNSENSE, // chip voltage (remote sense adjusted for loadline) - GPEtickdur0, // Duration on the GPE0 Engine GPEtickdur1, // Duration on the GPE1 Engine RTLtickdur, // Duration on the RTL tick interrupt @@ -120,7 +117,6 @@ enum e_gsid MEMSP2MSP0, PWR250USP0, PWR250USVDD0, // from APSS (no change) - CURVDD, // from AVSBUS - renamed from CUR250USVDD0 (was calculated from APSS data) PWRVCSVIOVDN, // from APSS - rename from PWR250USVCS0 to show what it includes PWR250USMEM0, SLEEPCNT4MSP0, @@ -130,8 +126,10 @@ enum e_gsid TEMPPROCTHRM, UTIL4MSP0, TEMPNEST, - VRFAN250USPROC, - VRHOT250USPROC, + VOLTVDDSENSE, // chip voltage (remote sense adjusted for loadline) + VOLTVDNSENSE, // chip voltage (remote sense adjusted for loadline) + PWRVDD, // calculated from AVSBUS data + PWRVDN, // calculated from AVSBUS data TEMPQ0, TEMPQ1, @@ -465,24 +463,20 @@ enum e_gsid TEMPC22, TEMPC23, - CURVDN, // new - from AVSBUS - PWRVDD, // new - calculated from AVSBUS data - PWRVDN, // new - calculated from AVSBUS data - // ------------------------------------------------------ // Regulator Sensors // ------------------------------------------------------ UVOLT250USP0V0, UVOLT250USP0V1, - VOLTVDD, // always from AVSBUS - renamed from VOLT250USP0V0 - VOLTVDN, // always from AVSBUS - renamed from VOLT250USP0V1 + VOLTVDD, + VOLTVDN, + CURVDD, + CURVDN, + VRFAN, // ------------------------------------------------------ // Memory Sensors // ------------------------------------------------------ - VRFAN250USMEM, - VRHOT250USMEM, - MRD2MSP0M0, MRD2MSP0M1, MRD2MSP0M2, diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c index dc7e77f..a457c20 100755 --- a/src/occ_405/sensor/sensor_info.c +++ b/src/occ_405/sensor/sensor_info.c @@ -26,10 +26,11 @@ #include <occ_common.h> // STATIC_ASSERT macro #include <sensor.h> // For Sensor defines -#define AMEEFP_2MS_IN_HZ AMEFP(5,2) // 500 Hz -#define AMEEFP_4MS_IN_HZ AMEFP(25,1) // 250 Hz #define AMEEFP_250US_IN_HZ AMEFP(4,3) // 4000 Hz #define AMEEFP_500US_IN_HZ AMEFP(2,3) // 2000 Hz +#define AMEEFP_1MS_IN_HZ AMEFP(1,3) // 1000 Hz +#define AMEEFP_2MS_IN_HZ AMEFP(5,2) // 500 Hz +#define AMEEFP_4MS_IN_HZ AMEFP(25,1) // 250 Hz #define AMEEFP_3S_IN_HZ AMEFP(333,-3) // 0.333 Hz #define AMEFP_SCALE_0_16384 AMEFP(610352,-8) // scalar so that digital 16384=100% @@ -223,8 +224,6 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( PROBE250US5, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PROBE250US6, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PROBE250US7, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( VOLTVDDSENSE, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), - SENSOR_INFO_T_ENTRY( VOLTVDNSENSE, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), SENSOR_INFO_T_ENTRY( GPEtickdur0, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( GPEtickdur1, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( RTLtickdur, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), @@ -268,7 +267,6 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( MEMSP2MSP0, "%\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWR250USP0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWR250USVDD0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( CURVDD, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1,-2) ), SENSOR_INFO_T_ENTRY( PWRVCSVIOVDN, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWR250USMEM0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( SLEEPCNT4MSP0, "#\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), @@ -278,18 +276,21 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( TEMPPROCTHRM, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( UTIL4MSP0, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1,-2) ), SENSOR_INFO_T_ENTRY( TEMPNEST, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( VRFAN250USPROC, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( VRHOT250USPROC, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), + SENSOR_INFO_T_ENTRY( VOLTVDDSENSE, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), + SENSOR_INFO_T_ENTRY( VOLTVDNSENSE, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), + SENSOR_INFO_T_ENTRY( PWRVDD, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1, 0) ), + SENSOR_INFO_T_ENTRY( PWRVDN, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1, 0) ), + SENS_QUAD_ENTRY_SET( TEMPQ, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( CURVDN, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1,-2) ), - SENSOR_INFO_T_ENTRY( PWRVDD, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PWRVDN, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1, 0) ), /* ==ReguSensors== NameString Units Type Location Number Freq ScaleFactor */ SENSOR_INFO_T_ENTRY( UVOLT250USP0V0, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), SENSOR_INFO_T_ENTRY( UVOLT250USP0V1, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), SENSOR_INFO_T_ENTRY( VOLTVDD, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1, -1) ), SENSOR_INFO_T_ENTRY( VOLTVDN, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1, -1) ), + SENSOR_INFO_T_ENTRY( CURVDD, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1,-2) ), + SENSOR_INFO_T_ENTRY( CURVDN, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_500US_IN_HZ, AMEFP( 1,-2) ), + SENSOR_INFO_T_ENTRY( VRFAN, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_1MS_IN_HZ, AMEFP( 1, 0) ), /* ==CoreSensors== NameString Units Type Location Number Freq ScaleFactor */ SENS_CORE_ENTRY_SET( FREQ250USP0C, "MHz\0", AMEC_SENSOR_TYPE_FREQ, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), @@ -307,8 +308,6 @@ const sensor_info_t G_sensor_info[] = SENS_CORE_ENTRY_SET( TEMPC, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), /* ==MemSensors== NameString Units Type Location Number Freq ScaleFactor */ - SENSOR_INFO_T_ENTRY( VRFAN250USMEM, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( VRHOT250USMEM, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENS_MEMC_ENTRY_SET( MRD2MSP0M, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 128, -5) ), SENS_MEMC_ENTRY_SET( MWR2MSP0M, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 128, -5) ), SENS_MEMC_ENTRY_SET( MIRC2MSP0M, "eps\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c index faa7d68..3761b4a 100755 --- a/src/occ_405/sensor/sensor_table.c +++ b/src/occ_405/sensor/sensor_table.c @@ -287,8 +287,6 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( PROBE250US5, &g_amec_sys.fw.probe250us[5]), SENSOR_PTR( PROBE250US6, &g_amec_sys.fw.probe250us[6]), SENSOR_PTR( PROBE250US7, &g_amec_sys.fw.probe250us[7]), - SENSOR_PTR( VOLTVDDSENSE, &g_amec_sys.fw.voltvddsense), - SENSOR_PTR( VOLTVDNSENSE, &g_amec_sys.fw.voltvdnsense), SENSOR_PTR( GPEtickdur0, &g_amec_sys.fw.gpetickdur[0]), SENSOR_PTR( GPEtickdur1, &g_amec_sys.fw.gpetickdur[1]), SENSOR_PTR( RTLtickdur, &g_amec_sys.fw.prcdupdatedur), @@ -337,7 +335,6 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( MEMSP2MSP0, &g_amec_sys.proc[0].memsp2ms), SENSOR_PTR( PWR250USP0, &g_amec_sys.proc[0].pwr250us), SENSOR_PTR( PWR250USVDD0, &g_amec_sys.proc[0].pwr250usvdd), - SENSOR_PTR( CURVDD, &g_amec_sys.proc[0].curvdd), SENSOR_PTR( PWRVCSVIOVDN, &g_amec_sys.proc[0].pwrvcsviovdn), SENSOR_PTR( PWR250USMEM0, &g_amec_sys.proc[0].pwr250usmem), SENSOR_PTR( SLEEPCNT4MSP0, &g_amec_sys.proc[0].sleepcnt4ms), @@ -347,8 +344,10 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( TEMPPROCTHRM, &g_amec_sys.proc[0].tempprocthermal), SENSOR_PTR( UTIL4MSP0, &g_amec_sys.proc[0].util4ms), SENSOR_PTR( TEMPNEST, &g_amec_sys.proc[0].tempnest), - SENSOR_PTR( VRFAN250USPROC, &g_amec_sys.sys.vrfan250usproc), - SENSOR_PTR( VRHOT250USPROC, &g_amec_sys.sys.vrhot250usproc), + SENSOR_PTR( VOLTVDDSENSE, &g_amec_sys.fw.voltvddsense), + SENSOR_PTR( VOLTVDNSENSE, &g_amec_sys.fw.voltvdnsense), + SENSOR_PTR( PWRVDD, &g_amec_sys.proc[0].pwrvdd), + SENSOR_PTR( PWRVDN, &g_amec_sys.proc[0].pwrvdn), // ------------------------------------------------------ // Quad Sensors (6 each) @@ -372,16 +371,9 @@ const sensor_ptr_t G_amec_sensor_list[] = CORE_SENSOR_PTRS( PWRPX250USP0C , &g_amec_sys.proc[0].core, pwrpx250us), CORE_SENSOR_PTRS( TEMPC, &g_amec_sys.proc[0].core, tempc), - SENSOR_PTR( CURVDN, &g_amec_sys.proc[0].curvdn), - SENSOR_PTR( PWRVDD, &g_amec_sys.proc[0].pwrvdd), - SENSOR_PTR( PWRVDN, &g_amec_sys.proc[0].pwrvdn), - // ------------------------------------------------------ // Memory Sensors // ------------------------------------------------------ - SENSOR_PTR( VRFAN250USMEM, &g_amec_sys.sys.vrfan250usmem), - SENSOR_PTR( VRHOT250USMEM, &g_amec_sys.sys.vrhot250usmem), - MEMCONTROL_SENSOR_PTRS(MRD2MSP0M, &g_amec_sys.proc[0].memctl, mrd2ms), MEMCONTROL_SENSOR_PTRS(MWR2MSP0M, &g_amec_sys.proc[0].memctl, mwr2ms), MEMCONTROL_SENSOR_PTRS(MIRC2MSP0M, &g_amec_sys.proc[0].memctl, centaur.mirc2ms), @@ -412,6 +404,9 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( UVOLT250USP0V1, &g_amec_sys.proc[0].vrm[1].uvolt250us), SENSOR_PTR( VOLTVDD, &g_amec_sys.proc[0].vrm[0].volt250us), SENSOR_PTR( VOLTVDN, &g_amec_sys.proc[0].vrm[1].volt250us), + SENSOR_PTR( CURVDD, &g_amec_sys.proc[0].curvdd), + SENSOR_PTR( CURVDN, &g_amec_sys.proc[0].curvdn), + SENSOR_PTR( VRFAN, &g_amec_sys.sys.vrfan), // ------------------------------------------------------ // Partition Sensors @@ -468,8 +463,6 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = MINI_SENSOR_PTR( PROBE250US5, NULL), MINI_SENSOR_PTR( PROBE250US6, NULL), MINI_SENSOR_PTR( PROBE250US7, NULL), - MINI_SENSOR_PTR( VOLTVDDSENSE, NULL), - MINI_SENSOR_PTR( VOLTVDNSENSE, NULL), MINI_SENSOR_PTR( GPEtickdur0, NULL), MINI_SENSOR_PTR( GPEtickdur1, NULL), MINI_SENSOR_PTR( RTLtickdur, NULL), @@ -501,7 +494,6 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = MINI_SENSOR_PTR( MEMSP2MSP0, NULL), MINI_SENSOR_PTR( PWR250USP0, &G_dcom_slv_outbox_tx.pwr250usp0), MINI_SENSOR_PTR( PWR250USVDD0, NULL), - MINI_SENSOR_PTR( CURVDD, NULL), MINI_SENSOR_PTR( PWRVCSVIOVDN, NULL), MINI_SENSOR_PTR( PWR250USMEM0, &G_dcom_slv_outbox_tx.pwr250usmemp0), MINI_SENSOR_PTR( SLEEPCNT4MSP0, &G_dcom_slv_outbox_tx.sleepcnt4msp0), @@ -511,8 +503,10 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = MINI_SENSOR_PTR( TEMPPROCTHRM, &G_dcom_slv_outbox_tx.tempprocthermal), MINI_SENSOR_PTR( UTIL4MSP0, &G_dcom_slv_outbox_tx.util4msp0), MINI_SENSOR_PTR( TEMPNEST, NULL), - MINI_SENSOR_PTR( VRFAN250USPROC, &G_dcom_slv_outbox_tx.vrfan250usproc), - MINI_SENSOR_PTR( VRHOT250USPROC, NULL), + MINI_SENSOR_PTR( VOLTVDDSENSE, NULL), + MINI_SENSOR_PTR( VOLTVDNSENSE, NULL), + MINI_SENSOR_PTR( PWRVDD, NULL), + MINI_SENSOR_PTR( PWRVDN, NULL), // ------------------------------------------------------ // Quad Sensors (6 each) @@ -536,15 +530,9 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = CORE_MINI_SENSOR_PTRS( PWRPX250USP0C, &G_dcom_slv_outbox_tx.pwrpx250usp0cy), CORE_MINI_SENSOR_PTRS_NULL( TEMPC ), - MINI_SENSOR_PTR( CURVDN, NULL), - MINI_SENSOR_PTR( PWRVDD, NULL), - MINI_SENSOR_PTR( PWRVDN, NULL), - // ------------------------------------------------------ // Memory Sensors // ------------------------------------------------------ - MINI_SENSOR_PTR( VRFAN250USMEM, &G_dcom_slv_outbox_tx.vrfan250usmem), - MINI_SENSOR_PTR( VRHOT250USMEM, NULL), MEMCONTROL_MINI_SENSOR_PTRS(MRD2MSP0M, &G_dcom_slv_outbox_tx.mrd2msp0mx), // MEMCONTROL_MINI_SENSOR_PTRS(MWR2MSP0M, &G_dcom_slv_outbox_tx.mwr2msp0mx), // @@ -573,6 +561,9 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = MINI_SENSOR_PTR( UVOLT250USP0V1, NULL), MINI_SENSOR_PTR( VOLTVDD, NULL), MINI_SENSOR_PTR( VOLTVDN, NULL), + MINI_SENSOR_PTR( CURVDD, NULL), + MINI_SENSOR_PTR( CURVDN, NULL), + MINI_SENSOR_PTR( VRFAN, NULL), // ------------------------------------------------------ // Partition Sensors |