diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2012-10-08 14:26:42 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-11-07 16:03:23 -0600 |
commit | d871f70ebe8e9e91d8dd4b604dfee0303461b9aa (patch) | |
tree | 4e4ee913e7177514f5569df07ff51423a15432e3 /src/usr/runtime/populate_attributes.C | |
parent | 90190a610b3452c34eb1e4848f66ad54d22e6a6f (diff) | |
download | talos-hostboot-d871f70ebe8e9e91d8dd4b604dfee0303461b9aa.tar.gz talos-hostboot-d871f70ebe8e9e91d8dd4b604dfee0303461b9aa.zip |
Support for PM Attributes
Adding new HWP attribute xml files and associated Targeting
changes to go along with them. The MURANO and VENICE xml
files contain default values provided by Greg Still. We
are still waiting on the final MRW definition to update
the TULETA generation script.
Also using this commit to add a few other error xml files
for the HostServices procedures. We need this longterm
to get the error parsing stuff working.
Verified IPL against Murano and Tuleta configs.
Depends-On: I3af3b2bf99b4dbedb6efeb2cb35e49ba066a9c19
Change-Id: I3a5be5a7b49c7c6d7e6179f5e28e046a38a12b1e
RTC: 42293
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2002
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/runtime/populate_attributes.C')
-rw-r--r-- | src/usr/runtime/populate_attributes.C | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C index ed100dd9b..51b96668a 100644 --- a/src/usr/runtime/populate_attributes.C +++ b/src/usr/runtime/populate_attributes.C @@ -49,7 +49,7 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", 4096); fapi::__fid##_Type result_##__fid; \ _rc = FAPI_ATTR_GET( __fid, _target, result_##__fid ); \ if( _rc ) { \ - TRACFCOMP( g_trac_runtime, "Error reading %d, rc=0x%X", fapi::__fid, _rc ); \ + TRACFCOMP( g_trac_runtime, "Error reading 0x%X, rc=0x%X", fapi::__fid, _rc ); \ _failed_attribute = fapi::__fid; \ break; \ } \ @@ -69,7 +69,7 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", 4096); fapi::__fid##_Type result_##__fid; \ _rc = FAPI_ATTR_GET_PRIVILEGED( __fid, _target, result_##__fid ); \ if( _rc ) { \ - TRACFCOMP( g_trac_runtime, "Error reading %d, rc=0x%X", fapi::__fid, _rc ); \ + TRACFCOMP( g_trac_runtime, "Error reading 0x%X, rc=0x%X", fapi::__fid, _rc ); \ _failed_attribute = fapi::__fid; \ break; \ } \ @@ -188,7 +188,8 @@ errlHndl_t populate_system_attributes( void ) TRACFCOMP( g_trac_runtime, "-SYSTEM-" ); // allocate memory and fill it with some junk data - system_data_t* sys_data = reinterpret_cast<system_data_t*>(SYSTEM_DATA_POINTER); + system_data_t* sys_data = + reinterpret_cast<system_data_t*>(SYSTEM_DATA_POINTER); memset( sys_data, 'A', sizeof(system_data_t) ); // These variables are used by the HSVC_LOAD_ATTR macros directly @@ -212,7 +213,8 @@ errlHndl_t populate_system_attributes( void ) TARGETING::targetService().getTopLevelTarget(sys); // Fill in the metadata - sys_data->hsvc.offset = reinterpret_cast<uint64_t>(sys_data->attrHeaders) + sys_data->hsvc.offset = + reinterpret_cast<uint64_t>(sys_data->attrHeaders) - reinterpret_cast<uint64_t>(sys_data); sys_data->hsvc.nodePresent = 0x8000000000000000; sys_data->hsvc.numAttr = 0; @@ -268,7 +270,8 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) TRACFCOMP( g_trac_runtime, "-NODE-" ); // allocate memory and fill it with some junk data - node_data_t* node_data = reinterpret_cast<node_data_t*>(NODE_DATA_POINTER); + node_data_t* node_data = + reinterpret_cast<node_data_t*>(NODE_DATA_POINTER); memset( node_data, 'A', sizeof(node_data) ); // These variables are used by the HSVC_LOAD_ATTR macros directly @@ -290,7 +293,9 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) // Fill in the metadat node_data->hsvc.numTargets = 0; - node_data->hsvc.procOffset = reinterpret_cast<uint64_t>(node_data->procs) - reinterpret_cast<uint64_t>(node_data); + node_data->hsvc.procOffset = + reinterpret_cast<uint64_t>(node_data->procs) + - reinterpret_cast<uint64_t>(node_data); // Get the list of processors TARGETING::TargetHandleList all_procs; @@ -314,7 +319,9 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) // Fill in the metadata node_data->procs[p].procid = procid; - node_data->procs[p].offset = reinterpret_cast<uint64_t>(&(node_data->procAttrHeaders[p][0])) - reinterpret_cast<uint64_t>(node_data); + node_data->procs[p].offset = + reinterpret_cast<uint64_t>(&(node_data->procAttrHeaders[p][0])) + - reinterpret_cast<uint64_t>(node_data); node_data->procs[p].numAttr = 0; (node_data->hsvc.numTargets)++; @@ -326,6 +333,7 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) // Fill up the attributes ADD_HUID( (all_procs[p]) ); // for debug ADD_PHYS_PATH( (all_procs[p]) ); + HSVC_LOAD_ATTR_P( ATTR_EC ); // Use a generated file for the list of attributes to load #include "common/hsvc_procdata.C" @@ -339,15 +347,21 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) TARGETING::TYPE_EX, false ); for( size_t e = 0; e < all_ex.size(); e++ ) { - uint32_t chiplet = all_ex[e]->getAttr<TARGETING::ATTR_CHIP_UNIT>(); + uint32_t chiplet = + all_ex[e]->getAttr<TARGETING::ATTR_CHIP_UNIT>(); TRACFCOMP( g_trac_runtime, "EX:p%d c%d(%.8X)", procid, chiplet, get_huid(all_ex[e]) ); // Fill in the metadata (node_data->hsvc.numTargets)++; node_data->ex[next_ex].parent_procid = procid; node_data->ex[next_ex].chiplet = chiplet; - node_data->ex[next_ex].offset = reinterpret_cast<uint64_t>(&(node_data->exAttrHeaders[next_ex][0])) - reinterpret_cast<uint64_t>(node_data); - node_data->hsvc.exOffset = reinterpret_cast<uint64_t>(node_data->ex) - reinterpret_cast<uint64_t>(node_data); + node_data->ex[next_ex].offset = + reinterpret_cast<uint64_t>( + &(node_data->exAttrHeaders[next_ex][0])) + - reinterpret_cast<uint64_t>(node_data); + node_data->hsvc.exOffset = + reinterpret_cast<uint64_t>(node_data->ex) + - reinterpret_cast<uint64_t>(node_data); node_data->ex[next_ex].numAttr = 0; // Cast to a FAPI type of target. |