summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMissy Connell <missyc@us.ibm.com>2013-03-26 09:23:58 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-10 16:25:07 -0500
commitc154ece8068c2f0fc366235ba952003e08df48a1 (patch)
tree458f94384d035d85bbb35c535fa3eec2b4b19b05 /src/include/usr
parent36da1243a5e1026fe10de3194c167cb1ceeb77c8 (diff)
downloadtalos-hostboot-c154ece8068c2f0fc366235ba952003e08df48a1.tar.gz
talos-hostboot-c154ece8068c2f0fc366235ba952003e08df48a1.zip
TCE support
RTC:36952 Change-Id: Icc1e88df4e8a8b50cae4fd9fe3789e98be61604e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4297 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/runtime/runtime_reasoncodes.H17
-rw-r--r--src/include/usr/runtime/tceif.H83
-rw-r--r--src/include/usr/vmmconst.h6
3 files changed, 105 insertions, 1 deletions
diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H
index 4a8f8c0ae..6d3df5bf2 100644
--- a/src/include/usr/runtime/runtime_reasoncodes.H
+++ b/src/include/usr/runtime/runtime_reasoncodes.H
@@ -38,6 +38,14 @@ namespace RUNTIME
MOD_HDATSERVICE_GET_STANDALONE_SECTION = 0x06, /**< hdatservice.C */
MOD_HDATSERVICE_GET_HOST_DATA_SECTION = 0x07, /**< hdatservice.C */
MOD_HDATSERVICE_VERIFY_HDAT_ADDRESS = 0x08, /**< hdatservice.C */
+ MOD_TCE_CREATE = 0x09, /**< tce.C */
+ MOD_TCE_INIT_HDW = 0x0A, /**< tce.C */
+ MOD_TCE_ALLOCATE = 0x0B, /**< tce.C */
+ MOD_TCE_DEALLOCATE = 0x0C, /**< tce.C */
+ MOD_TCE_INIT = 0x0D, /**< tce.C */
+ MOD_TCE_MAP = 0x0E, /**< tce.C */
+
+
};
enum RuntimeReasonCode
@@ -55,7 +63,14 @@ namespace RUNTIME
RC_INVALID_ADDRESS = RUNTIME_COMP_ID | 0x0B,
RC_INVALID_SECTION = RUNTIME_COMP_ID | 0x0C,
RC_CANNOT_MAP_MEMORY3 = RUNTIME_COMP_ID | 0x0D,
-
+ RC_TCE_INVALID_SIZE = RUNTIME_COMP_ID | 0x0E,
+ RC_TCE_ADDR_NOT_ALIGNED = RUNTIME_COMP_ID | 0x0F,
+ RC_TCE_INIT_NOT_RUN = RUNTIME_COMP_ID | 0x10,
+ RC_TCE_DEV_MAP_FAIL = RUNTIME_COMP_ID | 0x11,
+ RC_TCE_DEV_UNMAP_FAIL = RUNTIME_COMP_ID | 0x12,
+ RC_TCE_NO_ACTIVE_PSI = RUNTIME_COMP_ID | 0x13,
+ RC_TCE_NOT_ENOUGH_FREE_ENTRIES = RUNTIME_COMP_ID | 0x14,
+ RC_TCE_ENTRY_NOT_CONTIGUOUS = RUNTIME_COMP_ID | 0x15,
};
};
diff --git a/src/include/usr/runtime/tceif.H b/src/include/usr/runtime/tceif.H
new file mode 100644
index 000000000..9dcc7ca14
--- /dev/null
+++ b/src/include/usr/runtime/tceif.H
@@ -0,0 +1,83 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/runtime/tceif.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 __TCEIF_H
+#define __TCEIF_H
+
+#include <stdint.h>
+#include <builtins.h>
+#include <errl/errlentry.H>
+#include <devicefw/userif.H>
+
+
+namespace TCE
+{
+ /**
+ * @brief Responsible for initalizing the TCE entries
+ *
+ * @return errl - Return Error Handle if failed.
+ *
+ */
+ errlHndl_t createTceTable();
+
+ /**
+ * @brief Responsible for setting up the Processors to point to the TCE
+ * table
+ *
+ * @return errl - Return Error Handle if failed.
+ *
+ */
+ errlHndl_t initTceInHdw();
+
+ /**
+ * @brief Responsible for allocating TCE Entries
+ *
+ * @param[in] i_startingAddress - Starting address to TCE
+ * @param[in] i_size - Size of the address space
+ * @param[out] startingToken - Starting Entry into the table.
+ * (this is an offset into the array based on the
+ * TCE index * PAGESIZE. Each TCE entry maps to a
+ * pagesize of memory)
+ *
+ * Note: Must run createTceTable and InitTceInHdw or allocate will not work
+ *
+ * @return errl - Return Error Handle if failed.
+ *
+ */
+ errlHndl_t allocateTces(uint64_t startingAddress, uint64_t size, uint64_t&
+ startingToken);
+
+ /**
+ * @brief Responsible for deallocating TCE Entries
+ *
+ * @param[in] i_startingToken - Token indicating the starting entry to
+ * remove
+ * @param[in] i_size - Size of memory space to remove TCE entries
+ * associated
+ *
+ * @return errl - Return Error Handle if fatal failure occurred.
+ *
+ */
+ errlHndl_t deallocateTces(uint64_t startingToken, uint64_t size);
+};
+
+#endif
diff --git a/src/include/usr/vmmconst.h b/src/include/usr/vmmconst.h
index 3a0526347..544f0d32f 100644
--- a/src/include/usr/vmmconst.h
+++ b/src/include/usr/vmmconst.h
@@ -149,4 +149,10 @@ enum BlockPriority
#define DUMP_TEST_MEMORY_ADDR (HSVC_TEST_MEMORY_ADDR + HSVC_TEST_MEMORY_SIZE)
#define DUMP_TEST_MEMORY_SIZE (4*MEGABYTE)
+/** Location of the TCE Table */
+#define TCE_TABLE_ADDR (90*MEGABYTE)
+
+// The size if 512K bytes of entries each uint64_t or 8 bytes in size.
+#define TCE_TABLE_SIZE ((512*KILOBYTE)*sizeof(uint64_t))
+
#endif /* _VMMCONST_H */
OpenPOWER on IntegriCloud