summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2014-05-19 21:44:46 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-06-30 19:31:30 -0500
commit3b65dfb45938d0e864749fe97f044c275f56f3db (patch)
tree2de41582ee15f85276a0e83002e1ae5bba622bad /src/usr/targeting
parent682fbef52aa03bf5920ecc422b9bdb4546f31143 (diff)
downloadtalos-hostboot-3b65dfb45938d0e864749fe97f044c275f56f3db.tar.gz
talos-hostboot-3b65dfb45938d0e864749fe97f044c275f56f3db.zip
Merge HWAS commits from Stradale
These changes are to reduce the amount of trace entries, disable garding, and to print the model type. Change-Id: Iff1cd4995367c7bfad621f41a36e0080007ec6ef RTC: 97496 Origin: Google Shared Technology Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11172 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rw-r--r--src/usr/targeting/HBconfig6
-rw-r--r--src/usr/targeting/common/test/testcommontargeting.H21
-rw-r--r--src/usr/targeting/targetservicestart.C17
3 files changed, 33 insertions, 11 deletions
diff --git a/src/usr/targeting/HBconfig b/src/usr/targeting/HBconfig
new file mode 100644
index 000000000..85f8d22da
--- /dev/null
+++ b/src/usr/targeting/HBconfig
@@ -0,0 +1,6 @@
+config TARG_TRACE_AS_DEBUG
+ default n
+ help
+ Reduce number of traces by making TARG_ENTER and TARG_EXIT debug traces
+
+# @TODO RTC:106879 BMC:Console - May reconsider approach to quiet trace.
diff --git a/src/usr/targeting/common/test/testcommontargeting.H b/src/usr/targeting/common/test/testcommontargeting.H
index b25853c62..c38e8157e 100644
--- a/src/usr/targeting/common/test/testcommontargeting.H
+++ b/src/usr/targeting/common/test/testcommontargeting.H
@@ -5,7 +5,10 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* [+] Google Inc. */
+/* [+] 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. */
@@ -1222,7 +1225,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
{
}
- TARG_TS_TRACE(INF_MRK "Found %d total targets", l_count);
+ TARG_TS_TRACE(INFO_MRK "Found %d total targets", l_count);
PredicateCTM l_procs(CLASS_CHIP);
PredicateCTM l_enclosures(CLASS_ENC);
@@ -1239,7 +1242,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
l_path.dump();
}
- TARG_TS_TRACE(INF_MRK "Found %d targets that are chips or enclosures ",
+ TARG_TS_TRACE(INFO_MRK "Found %d targets that are chips or enclosures ",
l_count);
l_query.Not();
@@ -1250,7 +1253,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
{
}
- TARG_TS_TRACE(INF_MRK "Found %d targets that are not chips or "
+ TARG_TS_TRACE(INFO_MRK "Found %d targets that are not chips or "
"enclosures",l_count);
Target* l_pMasterProcChipTargetHandle = NULL;
@@ -1281,7 +1284,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
l_path.dump();
}
- TARG_TS_TRACE(INF_MRK "Found %d targets that are ex/mba units off "
+ TARG_TS_TRACE(INFO_MRK "Found %d targets that are ex/mba units off "
"master processor",l_count);
TARG_TS_TRACE(EXIT_MRK "testComplexFilter" );
@@ -1292,7 +1295,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
TARG_TS_TRACE(ENTER_MRK "testFapiToHbMacros" );
- TARG_TS_TRACE(INF_MRK "Now using direct access macros");
+ TARG_TS_TRACE(INFO_MRK "Now using direct access macros");
using namespace TARGETING;
using namespace fapi;
@@ -1339,7 +1342,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
"attribute access",l_xscom,0x0003FC00000000ULL);
}
- TARG_TS_TRACE(INF_MRK "Now using FAPI get macros");
+ TARG_TS_TRACE(INFO_MRK "Now using FAPI get macros");
memset(l_dummyRw,0x00,sizeof(l_dummyRw));
fapi::ReturnCode l_rc = FAPI_ATTR_GET(
@@ -1355,7 +1358,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
l_dummyRw[0][2][4]);
}
- TARG_TS_TRACE(INF_MRK "Now using FAPI set macros");
+ TARG_TS_TRACE(INFO_MRK "Now using FAPI set macros");
l_dummyRw[0][2][3] = 6;
l_rc = FAPI_ATTR_SET(ATTR_DUMMY_SCRATCH_PLAT_INIT_UINT8, NULL,
@@ -1379,7 +1382,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
"prior write",l_dummyRw[0][2][3]);
}
- TARG_TS_TRACE(INF_MRK "Now using targets without the attribute");
+ TARG_TS_TRACE(INFO_MRK "Now using targets without the attribute");
memset(l_dummyRw,0x00,sizeof(l_dummyRw));
EntityPath l_realPath(EntityPath::PATH_PHYSICAL);
diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C
index 26679bf7d..8677c61ce 100644
--- a/src/usr/targeting/targetservicestart.C
+++ b/src/usr/targeting/targetservicestart.C
@@ -5,7 +5,10 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* [+] Google Inc. */
+/* [+] 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. */
@@ -104,6 +107,16 @@ static void initTargeting(errlHndl_t& io_pError)
initializeAttributes(l_targetService);
checkProcessorTargeting(l_targetService);
+ // Print out top-level model value from loaded targeting values.
+ // @TODO RTC:88056 Make the model printed more meaniful
+ Target* l_pTopLevel = NULL;
+ l_targetService.getTopLevelTarget(l_pTopLevel);
+ ATTR_MODEL_type l_model = MODEL_NA;
+ if (l_pTopLevel->tryGetAttr<ATTR_MODEL>(l_model)) {
+ TARG_INF("Initialized targeting for model: %s",
+ l_pTopLevel->getAttrAsString<ATTR_MODEL>());
+ }
+
// call ErrlManager function - tell him that TARG is ready!
ERRORLOG::ErrlManager::errlResourceReady(ERRORLOG::TARG);
}
@@ -114,7 +127,7 @@ static void initTargeting(errlHndl_t& io_pError)
}
/**
- * @brief Create _start entry point using task entry macro and vector to
+ * @brief Create _start entry point using task entry macro and vector to
* initTargeting function
*/
TASK_ENTRY_MACRO(initTargeting);
OpenPOWER on IntegriCloud