From ca661f64019de70c4e18060d8bf67b143f6b7376 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Fri, 19 Oct 2012 13:24:04 -0500 Subject: 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 Reviewed-by: Terry J. Opie Reviewed-by: Melissa J. Connell Reviewed-by: A. Patrick Williams III --- src/include/usr/runtime/runtime.H | 37 +++++++++++++++++++++++++++ src/include/usr/runtime/runtime_reasoncodes.H | 23 ++++++++++++++--- 2 files changed, 57 insertions(+), 3 deletions(-) (limited to 'src/include/usr/runtime') 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, }; }; -- cgit v1.2.3