diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/hwpf/hwp/system_attributes.xml | 20 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatUtil.C | 4 | ||||
-rw-r--r-- | src/usr/hwpf/test/hwpftest.H | 8 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 20 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types.xml | 1 | ||||
-rw-r--r-- | src/usr/trace/compdesc.C | 38 | ||||
-rw-r--r-- | src/usr/trace/compdesc.H | 7 | ||||
-rw-r--r-- | src/usr/trace/interface.C | 9 | ||||
-rw-r--r-- | src/usr/trace/runtime/rt_service.C | 4 | ||||
-rw-r--r-- | src/usr/trace/service.C | 2 | ||||
-rw-r--r-- | src/usr/trace/service.H | 4 |
11 files changed, 93 insertions, 24 deletions
diff --git a/src/usr/hwpf/hwp/system_attributes.xml b/src/usr/hwpf/hwp/system_attributes.xml index 997c20782..da015fe80 100644 --- a/src/usr/hwpf/hwp/system_attributes.xml +++ b/src/usr/hwpf/hwp/system_attributes.xml @@ -5,7 +5,9 @@ <!-- --> <!-- OpenPOWER HostBoot Project --> <!-- --> -<!-- COPYRIGHT International Business Machines Corp. 2012,2014 --> +<!-- Contributors Listed Below - COPYRIGHT 2012,2015 --> +<!-- [+] International Business Machines Corp. --> +<!-- --> <!-- --> <!-- Licensed under the Apache License, Version 2.0 (the "License"); --> <!-- you may not use this file except in compliance with the License. --> @@ -20,7 +22,7 @@ <!-- permissions and limitations under the License. --> <!-- --> <!-- IBM_PROLOG_END_TAG --> -<!-- $Id: system_attributes.xml,v 1.22 2014/05/23 01:13:54 whs Exp $ --> +<!-- $Id: system_attributes.xml,v 1.23 2015/01/22 19:32:40 andrewg Exp $ --> <!-- XML file specifying HWPF attributes. These are platInit attributes associated with the system. @@ -374,4 +376,18 @@ <platInit/> </attribute> <!-- ********************************************************************* --> + <attribute> + <id>ATTR_MFG_TRACE_ENABLE</id> + <targetType>TARGET_TYPE_SYSTEM</targetType> + <description> + Override this to a non-zero value to have the FAPI manufacturing + traces output to the console or go to a fsp trace buffer when + console not enabled. + In cronus, setting this to a non-zero will output the FAPI_MFG + traces to the same location as your other FAPI traces. + </description> + <valueType>uint8</valueType> + <platInit/> + </attribute> + <!-- ********************************************************************* --> </attributes> diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C index dcf83d3b5..5e08ece80 100644 --- a/src/usr/hwpf/plat/fapiPlatUtil.C +++ b/src/usr/hwpf/plat/fapiPlatUtil.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -53,6 +53,7 @@ trace_desc_t* g_fapiTd; trace_desc_t* g_fapiImpTd; trace_desc_t* g_fapiScanTd; +trace_desc_t* g_fapiMfgTd; //****************************************************************************** // Global TracInit objects. Construction will initialize the trace buffer @@ -60,6 +61,7 @@ trace_desc_t* g_fapiScanTd; TRAC_INIT(&g_fapiTd, FAPI_TRACE_NAME, 2*KILOBYTE); TRAC_INIT(&g_fapiImpTd, FAPI_IMP_TRACE_NAME, 2*KILOBYTE); TRAC_INIT(&g_fapiScanTd, FAPI_SCAN_TRACE_NAME, 4*KILOBYTE); +TRAC_INIT(&g_fapiMfgTd, FAPI_MFG_TRACE_NAME, 4*KILOBYTE); extern "C" { diff --git a/src/usr/hwpf/test/hwpftest.H b/src/usr/hwpf/test/hwpftest.H index 0774111a8..ad416db08 100644 --- a/src/usr/hwpf/test/hwpftest.H +++ b/src/usr/hwpf/test/hwpftest.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -181,6 +183,10 @@ public: FAPI_DBG("Test DBG Trace. string: %s", l_pStr); FAPI_DBG("Test DBG Trace. 0x%x, %s", l_val, l_pStr); + FAPI_MFG("Test MFG Trace"); + FAPI_MFG("Test MFG Trace. hex: 0x%x", l_val); + FAPI_MFG("Test MFG Trace. string: %s", l_pStr); + FAPI_MFG("Test MFG Trace. 0x%x, %s", l_val, l_pStr); return; } diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 76b9e8046..0301b682e 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -15089,9 +15089,21 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript <readable/> <writeable/> </attribute> -</attributes> - - - +<attribute> + <id>MFG_TRACE_ENABLE</id> + <description> + Override this to a non-zero value to have the FAPI manufacturing + traces output to the console or go to a fsp trace buffer when + console not enabled. + </description> + <simpleType><uint8_t></uint8_t></simpleType> + <persistency>volatile-zeroed</persistency> + <readable/> + <hwpfToHbAttrMap> + <id>ATTR_MFG_TRACE_ENABLE</id> + <macro>DIRECT</macro> + </hwpfToHbAttrMap> +</attribute> +</attributes> diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 5f73d87d5..6d641059f 100644 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -123,6 +123,7 @@ <attribute><id>NOMINAL_FREQ_MHZ</id></attribute> <attribute><id>MNFG_FLAGS</id></attribute> <attribute><id>FABRIC_TO_PHYSICAL_NODE_MAP</id></attribute> + <attribute><id>MFG_TRACE_ENABLE</id></attribute> <!-- Start memory_attributes.xml --> <attribute><id>ISDIMM_POWER_CURVE_ALGORITHM_VERSION</id></attribute> <attribute><id>MRW_POWER_CONTROL_REQUESTED</id></attribute> diff --git a/src/usr/trace/compdesc.C b/src/usr/trace/compdesc.C index 9e1d77bea..72c7a2476 100644 --- a/src/usr/trace/compdesc.C +++ b/src/usr/trace/compdesc.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -94,19 +96,35 @@ namespace TRACE } #ifndef __HOSTBOOT_RUNTIME // TODO: RTC 79408 - // Check for special SCAN component to force enable debug trace on. - if (l_rc && !l_rc->iv_debugEnabled && - (0 == memcmp(l_compName, "SCAN", 5))) + // Check for special SCAN and FAPI_MFG component to + // force enable debug trace on. + if (l_rc && !l_rc->iv_debugEnabled) { - TARGETING::Target* sys = NULL; - TARGETING::targetService().getTopLevelTarget(sys); + if(0 == memcmp(l_compName, "SCAN", 5)) + { + TARGETING::Target* sys = NULL; + TARGETING::targetService().getTopLevelTarget(sys); - TARGETING::HbSettings hbSettings = - sys->getAttr<TARGETING::ATTR_HB_SETTINGS>(); + TARGETING::HbSettings hbSettings = + sys->getAttr<TARGETING::ATTR_HB_SETTINGS>(); - if (hbSettings.traceScanDebug) + if (hbSettings.traceScanDebug) + { + l_rc->iv_debugEnabled = true; + } + } + else if(0 == memcmp(l_compName, "FAPI_MFG",9)) { - l_rc->iv_debugEnabled = true; + TARGETING::Target* sys = NULL; + TARGETING::targetService().getTopLevelTarget(sys); + + TARGETING::ATTR_MFG_TRACE_ENABLE_type l_mfgTraceEnable = + sys->getAttr<TARGETING::ATTR_MFG_TRACE_ENABLE>(); + + if (l_mfgTraceEnable) + { + l_rc->iv_debugEnabled = true; + } } } #endif diff --git a/src/usr/trace/compdesc.H b/src/usr/trace/compdesc.H index 2c5335c87..9b57b32bb 100644 --- a/src/usr/trace/compdesc.H +++ b/src/usr/trace/compdesc.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -80,6 +82,9 @@ namespace TRACE Entry* iv_first; //< First (newest) trace entry. Entry* iv_last; //< Last (oldest) trace entry. + + friend bool TRACE::isDebugEnabled(ComponentDesc * i_td); + }; /** @class ComponentList diff --git a/src/usr/trace/interface.C b/src/usr/trace/interface.C index b450416f7..134940185 100644 --- a/src/usr/trace/interface.C +++ b/src/usr/trace/interface.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -115,6 +117,9 @@ namespace TRACE Singleton<Service>::instance().flushBuffers(); } - + bool isDebugEnabled(ComponentDesc * i_td) + { + return i_td->iv_debugEnabled; + } }; diff --git a/src/usr/trace/runtime/rt_service.C b/src/usr/trace/runtime/rt_service.C index 2c07aab17..ecbb26f2a 100644 --- a/src/usr/trace/runtime/rt_service.C +++ b/src/usr/trace/runtime/rt_service.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ diff --git a/src/usr/trace/service.C b/src/usr/trace/service.C index db5ea8590..0c125806c 100644 --- a/src/usr/trace/service.C +++ b/src/usr/trace/service.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ diff --git a/src/usr/trace/service.H b/src/usr/trace/service.H index 01c42af5d..e32dc1792 100644 --- a/src/usr/trace/service.H +++ b/src/usr/trace/service.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ |