summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/plat
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/hwpf/plat')
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H22
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H32
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatTrace.H46
3 files changed, 100 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
new file mode 100644
index 000000000..c2b7e5e10
--- /dev/null
+++ b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
@@ -0,0 +1,22 @@
+/**
+ * @file fapiPlatHwpExecutor.H
+ *
+ * @brief Defines the FAPI HWP Executor Macro.
+ *
+ * The HWP Executor macro is called when a PLAT invoker function or a HWP wants
+ * to execute a HWP. Each platform can modify the macro to do any platform
+ * specific work to execute the HWP (e.g. dlopening a shared library)
+ */
+
+#ifndef FAPIPLATHWPEXECUTOR_H_
+#define FAPIPLATHWPEXECUTOR_H_
+
+/**
+ * @brief HWP Executor macro
+ *
+ * By default, this macro just calls the HWP directly. If this cannot be done
+ * then the platform needs to modify
+ */
+#define FAPI_EXEC_HWP(RC, FUNC, _args_...) RC = FUNC(_args_)
+
+#endif // FAPIPLATHWPEXECUTOR_H_
diff --git a/src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H b/src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H
new file mode 100644
index 000000000..232cb981c
--- /dev/null
+++ b/src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H
@@ -0,0 +1,32 @@
+/**
+ * @file fapiPlatHwpInvoker.H
+ *
+ * @brief Defines the platform specific HW Procedure invoker functions.
+ *
+ * Note that each platform needs to provide an invoker function for each HW
+ * procedure. Prototypes cannot be provided because each platform will have
+ * functions that take platform specific targets and return platform specific
+ * return codes.
+ */
+
+#ifndef FAPIPLATHWPINVOKER_H_
+#define FAPIPLATHWPINVOKER_H_
+
+#include <targeting/targetservice.H>
+#include <errl/errlentry.H>
+
+namespace fapi
+{
+
+/**
+ * @brief Invokes hwpIsP7EM0ChipletClockOn procedure
+ *
+ * @param[in] i_target Pointer to Chip
+ * @param[out] o_clocksOn True if EM0 clocks are on, else false
+ */
+errlHndl_t invokeHwpIsP7EM0ChipletClockOn(TARGETING::Target* i_target,
+ bool & o_clocksOn);
+
+}
+
+#endif // FAPIPLATHWPINVOKER_H_
diff --git a/src/include/usr/hwpf/plat/fapiPlatTrace.H b/src/include/usr/hwpf/plat/fapiPlatTrace.H
new file mode 100644
index 000000000..e02bd481a
--- /dev/null
+++ b/src/include/usr/hwpf/plat/fapiPlatTrace.H
@@ -0,0 +1,46 @@
+/**
+ * @file platTrace.H
+ *
+ * @brief Defines the FAPI trace macros.
+ *
+ * Note that platform code must provide the implementation.
+ *
+ * FAPI has provided a default implementation of printfs. Platform code must
+ * provide an alternate implementation if needed.
+ */
+
+#ifndef PLATTRACE_H_
+#define PLATTRACE_H_
+
+#include <stdio.h>
+#include <trace/interface.H>
+
+//******************************************************************************
+// Trace buffer names
+//******************************************************************************
+const char * const FAPI_INF_TRACE_NAME = "FAPI_T";
+const char * const FAPI_IMP_TRACE_NAME = "FAPI_I";
+const char * const FAPI_ERR_TRACE_NAME = "FAPI_E";
+const char * const FAPI_DBG_TRACE_NAME = "FAPI_D";
+
+//******************************************************************************
+// Trace descriptors that are defined in a C file
+//******************************************************************************
+extern trace_desc_t* g_fapiInfTd;
+extern trace_desc_t* g_fapiImpTd;
+extern trace_desc_t* g_fapiErrTd;
+extern trace_desc_t* g_fapiDbgTd;
+
+// Information traces (standard flight recorder that can wrap often)
+#define FAPI_INF(_fmt_, _args_...) TRACFCOMP(g_fapiInfTd, _fmt_, ##_args_ )
+
+// Important traces (should not wrap often)
+#define FAPI_IMP(_fmt_, _args_...) TRACFCOMP(g_fapiImpTd, _fmt_, ##_args_ )
+
+// Error traces (should not wrap often)
+#define FAPI_ERR(_fmt_, _args_...) TRACFCOMP(g_fapiErrTd, _fmt_, ##_args_ )
+
+// Debug traces (can wrap often)
+#define FAPI_DBG(_fmt_, _args_...) TRACDCOMP(g_fapiDbgTd, _fmt_, ##_args_)
+
+#endif // PLATTRACE_H_
OpenPOWER on IntegriCloud