summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2017-03-07 09:03:17 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-03-08 17:48:03 -0500
commite7b1c8518656917f5202f069165d21aafd7a88ad (patch)
treed64c6249d5bd59da1a76fc66060f28b6eae335c9
parent24754646d5045981326ce26a878c16c6973e2ac8 (diff)
downloadtalos-hostboot-e7b1c8518656917f5202f069165d21aafd7a88ad.tar.gz
talos-hostboot-e7b1c8518656917f5202f069165d21aafd7a88ad.zip
Add a global to track when targeting has been loaded
This commit adds a global that keeps track of when targeting has loaded along with functions to get and set this global. Change-Id: Iddd65018918089163ebc03f042bfdd1bed31e730 RTC:165205 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37595 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/util/misc.H23
-rw-r--r--src/lib/utilmisc.C17
-rwxr-xr-xsrc/usr/targeting/targetservicestart.C4
3 files changed, 42 insertions, 2 deletions
diff --git a/src/include/util/misc.H b/src/include/util/misc.H
index 1c7aa7d5f..78d17f591 100644
--- a/src/include/util/misc.H
+++ b/src/include/util/misc.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* [+] 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. */
@@ -34,6 +36,25 @@ namespace Util
* @return bool true if running in simics; otherwise false
*/
bool isSimicsRunning( void );
+
+ /**
+ * @brief Determines if Targeting code has been loaded
+ *
+ * @param[in] void
+ *
+ * @return bool true if Targeting is loaded; otherwise false
+ */
+ bool isTargetingLoaded( void );
+
+ /**
+ * @brief Sets global that Targeting code has been loaded
+ * NOTE: this should only be called once by targeting
+ *
+ * @param[in] void
+ *
+ * @return N/A
+ */
+ void setIsTargetingLoaded( void );
};
#endif
diff --git a/src/lib/utilmisc.C b/src/lib/utilmisc.C
index f652e402c..d91af9bc1 100644
--- a/src/lib/utilmisc.C
+++ b/src/lib/utilmisc.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* [+] 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. */
@@ -41,5 +43,18 @@ bool isSimicsRunning()
return simics;
}
+static bool g_isTargetingLoaded = false;
+
+bool isTargetingLoaded()
+{
+ return g_isTargetingLoaded;
+}
+
+void setIsTargetingLoaded()
+{
+ g_isTargetingLoaded = true;
+}
+
+
};
diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C
index 62edd569c..c8300afd2 100755
--- a/src/usr/targeting/targetservicestart.C
+++ b/src/usr/targeting/targetservicestart.C
@@ -56,6 +56,7 @@
#include <devicefw/userif.H>
#include <config.h>
#include <initservice/initserviceif.H>
+#include <util/misc.H>
#ifdef CONFIG_DRTM
#include <secureboot/drtm.H>
@@ -177,6 +178,9 @@ static void initTargeting(errlHndl_t& io_pError)
// call ErrlManager function - tell him that TARG is ready!
ERRORLOG::ErrlManager::errlResourceReady(ERRORLOG::TARG);
#endif
+
+ // set global that TARG is ready
+ Util::setIsTargetingLoaded();
}
TARG_EXIT();
OpenPOWER on IntegriCloud