summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2013-09-27 16:45:31 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-03 12:01:59 -0500
commit0503f7874d3cdae1fe075294686a53cba57d70a4 (patch)
treed3eddbb262bf2a06ea49952639d19aaa8210a8cb /src/usr
parentb4a1de33d66270d23dbb1eea368fa5a12c1a0d82 (diff)
downloadtalos-hostboot-0503f7874d3cdae1fe075294686a53cba57d70a4.tar.gz
talos-hostboot-0503f7874d3cdae1fe075294686a53cba57d70a4.zip
Persistent PLID for HSVC logs
Change-Id: Ie44fad8c75bdcb2f3e947dec67b5b7adedf38d13 RTC: 68879 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6385 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/runtime/common/hsvc_attribute_structs.H1
-rw-r--r--src/usr/runtime/populate_attributes.C18
2 files changed, 19 insertions, 0 deletions
diff --git a/src/usr/runtime/common/hsvc_attribute_structs.H b/src/usr/runtime/common/hsvc_attribute_structs.H
index 9a02df933..524934f46 100644
--- a/src/usr/runtime/common/hsvc_attribute_structs.H
+++ b/src/usr/runtime/common/hsvc_attribute_structs.H
@@ -79,5 +79,6 @@ static const uint64_t HSVC_HUID = 0xFF000001FFFFFFFF;
static const uint64_t HSVC_PHYS_PATH = 0xFF000002FFFFFFFF;
static const uint64_t HSVC_ECMD_STRING = 0xFF000003FFFFFFFF;
static const uint64_t HSVC_IBSCOM_BASE = 0xFF000004FFFFFFFF;
+static const uint64_t HSVC_PLID = 0xFF000005FFFFFFFF;
#endif
diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C
index 1370a51a2..57ef6bf5c 100644
--- a/src/usr/runtime/populate_attributes.C
+++ b/src/usr/runtime/populate_attributes.C
@@ -144,6 +144,23 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", KILOBYTE);
(*_num_attr)++; }
/**
+ * @brief Read the PLID attribute from targeting
+ * and stick it into mainstore
+ */
+#define ADD_PLID(__targ) \
+ { TARGETING::AttributeTraits \
+ <TARGETING::ATTR_HOSTSVC_PLID>::Type plid_temp; \
+ _rc = !(__targ->tryGetAttr \
+ <TARGETING::ATTR_HOSTSVC_PLID>(plid_temp)); \
+ _cur_header = &(_all_headers[(*_num_attr)]); \
+ _cur_header->id = HSVC_PLID; \
+ _cur_header->sizeBytes = sizeof(uint32_t); \
+ _cur_header->offset = (_output_ptr - _beginning); \
+ memcpy( _output_ptr, &plid_temp, _cur_header->sizeBytes ); \
+ _output_ptr += _cur_header->sizeBytes; \
+ (*_num_attr)++; }
+
+/**
* @brief Insert a terminator into the attribute list
*/
#define EMPTY_ATTRIBUTE \
@@ -313,6 +330,7 @@ errlHndl_t populate_system_attributes( void )
// Fill up the attributes
ADD_HUID( sys ); // for debug
ADD_PHYS_PATH( sys );
+ ADD_PLID( sys );
// Use a generated file for the list of attributes to load
#include "common/hsvc_sysdata.C"
OpenPOWER on IntegriCloud