summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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