summaryrefslogtreecommitdiffstats
path: root/src/include/runtime/interface.h
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-07-16 15:29:15 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-09-17 16:45:31 -0500
commit5652d7c0c6a8db05699f2b4334e4615e1ba22127 (patch)
treea04321010213943bc44a908a0de0e88149a7e7de /src/include/runtime/interface.h
parent7c3226b7ef2b3e09bd40823732f05fbf0fe6778f (diff)
downloadtalos-hostboot-5652d7c0c6a8db05699f2b4334e4615e1ba22127.tar.gz
talos-hostboot-5652d7c0c6a8db05699f2b4334e4615e1ba22127.zip
Initial Hostboot Runtime image support.
RTC: 76675 Change-Id: Ibd21cf5b555e6dcee182a2f1a292b47d4f384ba0 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6127 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/runtime/interface.h')
-rw-r--r--src/include/runtime/interface.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
new file mode 100644
index 000000000..fd3e1ba79
--- /dev/null
+++ b/src/include/runtime/interface.h
@@ -0,0 +1,79 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/runtime/interface.h $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __RUNTIME__INTERFACE_H
+#define __RUNTIME__INTERFACE_H
+
+/** @file interface.h
+ * @brief Interfaces between Hostboot Runtime and Sapphire.
+ *
+ * This file has two structures of function pointers: hostInterfaces_t and
+ * runtimeInterfaces_t. hostInterfaces are provided by Sapphire (or a
+ * similar environment, such as Hostboot IPL's CxxTest execution).
+ * runtimeInterfaces are provided by Hostboot Runtime to Sapphire.
+ *
+ * @note This file must be in C rather than C++.
+ */
+
+#include <stdint.h>
+
+/** @typedef hostInterfaces_t
+ * @brief Interfaces provided by the underlying environment (ex. Sapphire).
+ *
+ * @note Some of these functions are not required (marked optional) and
+ * may be NULL.
+ */
+typedef struct hostInterfaces
+{
+ /** Put a string to the console. */
+ void (*puts)(const char*);
+ /** Critical failure in runtime execution. */
+ void (*assert)();
+
+ /** OPTIONAL. Hint to environment that the page may be executed. */
+ int (*set_page_execute)(void*);
+
+ /** malloc */
+ void* (*malloc)(size_t);
+ /** free */
+ void (*free)(void*);
+ /** realloc */
+ void* (*realloc)(void*, size_t);
+
+} hostInterfaces_t;
+
+typedef struct runtimeInterfaces
+{
+ /** Execute CxxTests that may be contained in the image.
+ *
+ * @param[in] - Pointer to CxxTestStats structure for results reporting.
+ */
+ void (*cxxtestExecute)(void*);
+
+} runtimeInterfaces_t;
+
+#ifdef __HOSTBOOT_RUNTIME
+extern hostInterfaces_t* g_hostInterfaces;
+runtimeInterfaces_t* getRuntimeInterfaces();
+#endif
+
+#endif
OpenPOWER on IntegriCloud