diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/htmgt/htmgt_cfgdata.C | 33 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types_openpower.xml | 32 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types_openpower.xml | 2 |
3 files changed, 62 insertions, 5 deletions
diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C index f464b2345..20cff5a52 100644 --- a/src/usr/htmgt/htmgt_cfgdata.C +++ b/src/usr/htmgt/htmgt_cfgdata.C @@ -248,7 +248,6 @@ enum occCfgDataVersion OCC_CFGDATA_PCAP_CONFIG_VERSION = 0x20, OCC_CFGDATA_SYS_CONFIG_VERSION = 0x21, OCC_CFGDATA_TCT_CONFIG_VERSION = 0x20, - OCC_CFGDATA_AVSBUS_CONFIG_VERSION = 0X01, }; @@ -1075,17 +1074,21 @@ void getAVSBusConfigMessageData( const TargetHandle_t i_occ, uint64_t & o_size ) { uint64_t index = 0; + uint8_t version = 0x01; o_size = 0; - assert( o_data != nullptr ); + Target* l_sys = nullptr; + targetService().getTopLevelTarget(l_sys); + assert(l_sys != nullptr); + // Get the parent processor ConstTargetHandle_t l_proc = getParentChip( i_occ ); assert( l_proc != nullptr ); // Populate the data o_data[index++] = OCC_CFGDATA_AVSBUS_CONFIG; - o_data[index++] = OCC_CFGDATA_AVSBUS_CONFIG_VERSION; + const uint64_t version_index = index++; // version updated later o_data[index++] = l_proc->getAttr<ATTR_VDD_AVSBUS_BUSNUM>();//Vdd Bus o_data[index++] = l_proc->getAttr<ATTR_VDD_AVSBUS_RAIL>(); //Vdd Rail Sel o_data[index++] = 0xFF; //reserved @@ -1094,8 +1097,8 @@ void getAVSBusConfigMessageData( const TargetHandle_t i_occ, o_data[index++] = l_proc->getAttr<ATTR_VDN_AVSBUS_RAIL>(); //Vdn Rail sel ATTR_NO_APSS_PROC_POWER_VCS_VIO_WATTS_type PowerAdder = 0; - if ( l_proc->tryGetAttr //if attr exists populate Proc Power Adder. - <ATTR_NO_APSS_PROC_POWER_VCS_VIO_WATTS>(PowerAdder)) + if (l_proc->tryGetAttr //if attr exists populate Proc Power Adder. + <ATTR_NO_APSS_PROC_POWER_VCS_VIO_WATTS>(PowerAdder)) { o_data[index++] = ((PowerAdder>>8)&0xFF); o_data[index++] = ((PowerAdder)&0xFF); @@ -1105,6 +1108,26 @@ void getAVSBusConfigMessageData( const TargetHandle_t i_occ, o_data[index++] = 0x00; o_data[index++] = 0x00; } + + ATTR_VDD_CURRENT_OVERFLOW_WORKAROUND_ENABLE_type overflow_enable = 0; + ATTR_MAX_VDD_CURRENT_READING_type max_vdd_current = 0; + if ((l_sys->tryGetAttr //if attr exists populate overflow_enable + <ATTR_VDD_CURRENT_OVERFLOW_WORKAROUND_ENABLE>(overflow_enable)) && + (l_sys->tryGetAttr //if attr exists populate max_vdd_current + <ATTR_MAX_VDD_CURRENT_READING>(max_vdd_current))) + { + if (overflow_enable == 1) + { + // Additional config info for Vdd Current overflow workaround + version = 0x02; + o_data[index++] = 0x7F; // Hardcode Vdd Current Rollover Point + o_data[index++] = 0xFF; + o_data[index++] = (max_vdd_current>>8) & 0xFF; + o_data[index++] = max_vdd_current & 0xFF; + } + } + + o_data[version_index] = version; // Version o_size = index; } diff --git a/src/usr/targeting/common/xmltohb/attribute_types_openpower.xml b/src/usr/targeting/common/xmltohb/attribute_types_openpower.xml index c49d2f75a..66adf8331 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types_openpower.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_openpower.xml @@ -1337,6 +1337,38 @@ ID for the sensor number returned with the elog. --> <writeable/> </attribute> +<attribute> + <id>VDD_CURRENT_OVERFLOW_WORKAROUND_ENABLE</id> + <description> + Used to enable Vdd current overflow worakaround. + To enable this attribute should be set to 1 and + MAX_VDD_CURRENT_READING must be populated. + Set to 0 to disable. + </description> + <simpleType> + <uint16_t> + <default>0x0000</default> + </uint16_t> + </simpleType> + <persistency>non-volatile</persistency> + <readable/> +</attribute> + +<attribute> + <id>MAX_VDD_CURRENT_READING</id> + <description> + Maximum theoretical Vdd current reading in 10mA units. + Used when VDD_CURRENT_OVERFLOW_WORKAROUND_ENABLE is set. + </description> + <simpleType> + <uint16_t> + <default>0x0000</default> + </uint16_t> + </simpleType> + <persistency>non-volatile</persistency> + <readable/> +</attribute> + <!-- end HTMGT attributes --> <attribute> diff --git a/src/usr/targeting/common/xmltohb/target_types_openpower.xml b/src/usr/targeting/common/xmltohb/target_types_openpower.xml index 83217b2da..5b6885902 100644 --- a/src/usr/targeting/common/xmltohb/target_types_openpower.xml +++ b/src/usr/targeting/common/xmltohb/target_types_openpower.xml @@ -103,6 +103,8 @@ <attribute><id>ALLOW_CALLHOME_ESELS_TO_BMC</id></attribute> <attribute><id>REPORT_THROTTLE_BELOW_NOMINAL</id></attribute> <attribute><id>HTMGT_SAVED_POWER_LIMIT</id></attribute> + <attribute><id>VDD_CURRENT_OVERFLOW_WORKAROUND_ENABLE</id></attribute> + <attribute><id>MAX_VDD_CURRENT_READING</id></attribute> </targetTypeExtension> <targetTypeExtension> |