From 0503f7874d3cdae1fe075294686a53cba57d70a4 Mon Sep 17 00:00:00 2001 From: Corey Swenson Date: Fri, 27 Sep 2013 16:45:31 -0500 Subject: 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 Reviewed-by: Daniel M. Crowell Reviewed-by: A. Patrick Williams III --- src/usr/runtime/common/hsvc_attribute_structs.H | 1 + src/usr/runtime/populate_attributes.C | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'src/usr/runtime') 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 @@ -143,6 +143,23 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", KILOBYTE); _output_ptr += _cur_header->sizeBytes; \ (*_num_attr)++; } +/** + * @brief Read the PLID attribute from targeting + * and stick it into mainstore + */ +#define ADD_PLID(__targ) \ + { TARGETING::AttributeTraits \ + ::Type plid_temp; \ + _rc = !(__targ->tryGetAttr \ + (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 */ @@ -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" -- cgit v1.2.3