summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2012-10-19 13:24:04 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-12-13 15:11:25 -0600
commitca661f64019de70c4e18060d8bf67b143f6b7376 (patch)
tree5481c8e3d17969c3d837f2e44d70447b556e7a75 /src/include
parent219b91a0ae64a987471cfe07e669bb55d70cf594 (diff)
downloadtalos-hostboot-ca661f64019de70c4e18060d8bf67b143f6b7376.tar.gz
talos-hostboot-ca661f64019de70c4e18060d8bf67b143f6b7376.zip
Host Data Service
Implemented functions to load the Host Interface Data into memory and retrieve pointers to specific pieces of data therein. Verified in Murano and Tuleta configs. RTC: 49509 Change-Id: I18b44cd53f2cab91b83ecad283b998783e275d4f Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2367 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Terry J. Opie <opiet@us.ibm.com> Reviewed-by: Melissa J. Connell <missyc@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/errno.h46
-rw-r--r--src/include/usr/runtime/runtime.H37
-rw-r--r--src/include/usr/runtime/runtime_reasoncodes.H23
-rw-r--r--src/include/usr/vmmconst.h15
4 files changed, 92 insertions, 29 deletions
diff --git a/src/include/errno.h b/src/include/errno.h
index 020366357..5e7833985 100644
--- a/src/include/errno.h
+++ b/src/include/errno.h
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/errno.h $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * 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 other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/errno.h $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* 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 _ERRNO_H
#define _ERRNO_H
@@ -34,6 +33,7 @@
#define EINVAL 22 // Invalid argument
#define ENFILE 23 // Too many open files in system
#define EDEADLK 35 // Operation would cause deadlock.
+#define EALREADY 114 // Operation already in progress
#define EWOULDBLOCK EAGAIN // operation would block
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H
index f638d9762..0681ad3a8 100644
--- a/src/include/usr/runtime/runtime.H
+++ b/src/include/usr/runtime/runtime.H
@@ -38,6 +38,43 @@ namespace RUNTIME
*/
errlHndl_t populate_attributes( void );
+/**
+ * @brief Add the host data mainstore location to VMM
+ */
+errlHndl_t load_host_data( void );
+
+/**
+ * HDAT Sections
+ */
+enum SectionId
+{
+ HSVC_NODE_DATA, //< HostServices Node Attributes
+ HSVC_SYSTEM_DATA, //< HostServices System Attributes
+ IPLPARMS_SYSTEM, //< IPL Parms
+ MS_DUMP_SRC_TBL, //< MDST: Memory Dump Source Table
+ MS_DUMP_DST_TBL, //< MDDT: Memory Dump Destination Table
+ MS_DUMP_RESULTS_TBL, //< MDRT: Memory Dump Results Table
+};
+
+/**
+ * @brief Get a pointer to the beginning of a particular section of
+ * the host data memory.
+ *
+ * @description The returned pointer will not include any header hdat header
+ * information.
+ *
+ * @param[in] i_section Chunk of data to find
+ * @param[in] i_instance Instance of section when there are multiple entries
+ * @param[out] o_dataAddr Physical memory address of data
+ * @param[out] o_dataSize Size of data in bytes, 0 on error, DATA_SIZE_UNKNOWN if unknown
+ *
+ * @return errlHndl_t NULL on success
+ */
+errlHndl_t get_host_data_section( SectionId i_section,
+ uint64_t i_instance,
+ uint64_t& o_dataAddr,
+ size_t& o_dataSize );
+const size_t DATA_SIZE_UNKNOWN = 0xFFFFFFFFFFFFFFFF;
}
diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H
index 3c81ac54b..0986d585b 100644
--- a/src/include/usr/runtime/runtime_reasoncodes.H
+++ b/src/include/usr/runtime/runtime_reasoncodes.H
@@ -29,14 +29,31 @@ namespace RUNTIME
{
enum RuntimeModuleId
{
- MOD_RUNTIME_INVALID = 0x00, /**< Zero is an invalid module id */
- MOD_RUNTIME_POP_SYS_ATTR = 0x01,
- MOD_RUNTIME_POP_NODE_ATTR = 0x02,
+ MOD_RUNTIME_INVALID = 0x00, /**< Invalid module id */
+ MOD_RUNTIME_POP_SYS_ATTR = 0x01, /**< populate_attributes.C */
+ MOD_RUNTIME_POP_NODE_ATTR = 0x02, /**< populate_attributes.C */
+ MOD_HDATSERVICE_CHECK_HEADER = 0x03, /**< hdatservice.C */
+ MOD_HDATSERVICE_CHECK_TUPLE = 0x04, /**< hdatservice.C */
+ MOD_HDATSERVICE_LOAD_HOST_DATA = 0x05, /**< hdatservice.C */
+ 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 */
};
enum RuntimeReasonCode
{
RC_ATTR_GET_FAIL = RUNTIME_COMP_ID | 0x01,
+ RC_BAD_HDAT_HEADER = RUNTIME_COMP_ID | 0x02,
+ RC_BAD_HDAT_TUPLE = RUNTIME_COMP_ID | 0x03,
+ RC_INVALID_STANDALONE = RUNTIME_COMP_ID | 0x04,
+ RC_CANNOT_MAP_MEMORY = RUNTIME_COMP_ID | 0x05,
+ RC_WRONG_PAYLOAD_ATTRS = RUNTIME_COMP_ID | 0x06,
+ RC_CANNOT_MAP_MEMORY2 = RUNTIME_COMP_ID | 0x07,
+ RC_INVALID_PAYLOAD_KIND = RUNTIME_COMP_ID | 0x08,
+ RC_NO_HSVC_NODE_DATA_FOUND = RUNTIME_COMP_ID | 0x09,
+ RC_BAD_NACA = RUNTIME_COMP_ID | 0x0A,
+ RC_INVALID_ADDRESS = RUNTIME_COMP_ID | 0x0B,
+ RC_INVALID_SECTION = RUNTIME_COMP_ID | 0x0C,
};
};
diff --git a/src/include/usr/vmmconst.h b/src/include/usr/vmmconst.h
index 7a5250cce..d858ebbdb 100644
--- a/src/include/usr/vmmconst.h
+++ b/src/include/usr/vmmconst.h
@@ -58,13 +58,17 @@
#define VMM_ADDR_BASE_BLOCK 0
/** Base Segment Base Block size */
-#define VMM_BASE_BLOCK_SIZE 8*MEGABYTE
+#define VMM_BASE_BLOCK_SIZE (8*MEGABYTE)
/** Base Segment Extended Memory Block Base Address */
-#define VMM_ADDR_EXTEND_BLOCK VMM_ADDR_BASE_BLOCK + VMM_BASE_BLOCK_SIZE
+#define VMM_ADDR_EXTEND_BLOCK (VMM_ADDR_BASE_BLOCK + VMM_BASE_BLOCK_SIZE)
+
+/** Maximize size of Base Segment Memory after expansion */
+#define VMM_MEMORY_SIZE (32*MEGABYTE)
/** Base Segment Extended Memory Block Size */
-#define VMM_EXTEND_BLOCK_SIZE (32*MEGABYTE)-VMM_BASE_BLOCK_SIZE
+#define VMM_EXTEND_BLOCK_SIZE (VMM_MEMORY_SIZE-VMM_BASE_BLOCK_SIZE)
+
/**
* Resource Providers
*/
@@ -113,11 +117,16 @@ enum BlockPriority
/**
* Test Constants
*/
+
/** Base virtual address used in remove pages test */
#define VMM_VADDR_RMVPAGE_TEST (700 * GIGABYTE)
/** Block size used in remove pages test */
#define VMM_SIZE_RMVPAGE_TEST (8 * PAGESIZE)
+/** Chunk of physical memory to use for HostServices Attributes */
+#define HSVC_TEST_MEMORY_ADDR (VMM_MEMORY_SIZE + 32*MEGABYTE)
+#define HSVC_TEST_MEMORY_SIZE (2*MEGABYTE)
+
#endif /* _VMMCONST_H */
OpenPOWER on IntegriCloud