summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime/populate_attributes.C
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-11-13 15:36:05 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-11-14 15:45:36 -0600
commit073d82a61ee7ce0ec4522c18ce92cd93537025db (patch)
tree382b3db4c6032fb83b2e1c7e9f50eb6c0507fb5b /src/usr/runtime/populate_attributes.C
parentf5fc4c94d84ed3a5263d4139cb09179a5722f382 (diff)
downloadtalos-hostboot-073d82a61ee7ce0ec4522c18ce92cd93537025db.tar.gz
talos-hostboot-073d82a61ee7ce0ec4522c18ce92cd93537025db.zip
Expand memory footprint to full 8MB cache.
If fake PNOR isn't being used, we can expand our memory space to the full 8MB cache. There will be follow up work with RTC: 49137 to support 4MB degraded caches for bring-up. Change-Id: I1248efa37965f39ebab62aae556349c34aa24b66 RTC: 47356 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2319 Tested-by: Jenkins Server Reviewed-by: Melissa J. Connell <missyc@us.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> 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.C33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C
index 51b96668a..cba9612bc 100644
--- a/src/usr/runtime/populate_attributes.C
+++ b/src/usr/runtime/populate_attributes.C
@@ -36,6 +36,7 @@
#include <targeting/common/targetservice.H>
#include <targeting/common/utilFilter.H>
#include <runtime/runtime_reasoncodes.H>
+#include <sys/mm.h> //@fixme RTC:49509 - remove if no longer needed.
#include "common/hsvc_attribute_structs.H"
//#include <arch/ppc.H> //for MAGIC_INSTRUCTION
@@ -60,7 +61,7 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", 4096);
_cur_header->offset = (_output_ptr - _beginning); \
memcpy( _output_ptr, &result_##__fid, sizeof(fapi::__fid##_Type) ); \
_output_ptr += sizeof(fapi::__fid##_Type); \
- (*_num_attr)++;
+ (*_num_attr)++;
/**
* @brief Read a Privileged FAPI attribute and stick it into mainstore
@@ -80,7 +81,7 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", 4096);
_cur_header->offset = (_output_ptr - _beginning); \
memcpy( _output_ptr, &result_##__fid, sizeof(fapi::__fid##_Type) ); \
_output_ptr += sizeof(fapi::__fid##_Type); \
- (*_num_attr)++;
+ (*_num_attr)++;
/**
* @brief Read the HUID attribute from targeting and stick it into mainstore
@@ -94,7 +95,7 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", 4096);
_cur_header->offset = (_output_ptr - _beginning); \
memcpy( _output_ptr, &_huid_temp, sizeof(uint32_t) ); \
_output_ptr += sizeof(uint32_t); \
- (*_num_attr)++;
+ (*_num_attr)++;
/**
* @brief Read the PHYS_PATH attribute from targeting and stick it into mainstore
@@ -117,7 +118,7 @@ TRAC_INIT(&g_trac_runtime, "RUNTIME", 4096);
_cur_header = &(_all_headers[(*_num_attr)]); \
_cur_header->id = hsvc_attr_header_t::NO_ATTRIBUTE; \
_cur_header->sizeBytes = 0; \
- _cur_header->offset = 0;
+ _cur_header->offset = 0;
namespace RUNTIME
@@ -134,7 +135,7 @@ struct system_data_t
// header data that HostServices uses
hsvc_system_data_t hsvc;
- // actual data content
+ // actual data content
hsvc_attr_header_t attrHeaders[MAX_ATTRIBUTES];
char attributes[MAX_ATTRIBUTES*sizeof(uint32_t)];
};
@@ -158,9 +159,9 @@ struct node_data_t
// header data that HostServices uses
hsvc_node_data_t hsvc;
- // actual data content
+ // actual data content
hsvc_proc_header_t procs[MAX_PROCS_RSV];
- hsvc_ex_header_t ex[MAX_PROCS_RSV*MAX_EX_PER_PROC];
+ hsvc_ex_header_t ex[MAX_PROCS_RSV*MAX_EX_PER_PROC];
hsvc_attr_header_t procAttrHeaders[MAX_PROCS_RSV][NUM_PROC_ATTRIBUTES];
hsvc_attr_header_t exAttrHeaders[MAX_PROCS_RSV*MAX_EX_PER_PROC][NUM_EX_ATTRIBUTES];
char attributes[MAX_ATTRIBUTES*sizeof(uint32_t)];
@@ -169,8 +170,8 @@ struct node_data_t
//@fixme RTC:49509
// Steal the unused fake pnor space until we have mainstore
-#define SYSTEM_DATA_POINTER (5*MEGABYTE)
-#define NODE_DATA_POINTER (5*MEGABYTE+512*KILOBYTE)
+#define SYSTEM_DATA_POINTER (64*MEGABYTE)
+#define NODE_DATA_POINTER (SYSTEM_DATA_POINTER+512*KILOBYTE)
/**
@@ -188,6 +189,8 @@ errlHndl_t populate_system_attributes( void )
TRACFCOMP( g_trac_runtime, "-SYSTEM-" );
// allocate memory and fill it with some junk data
+ // @fixme RTC:49509 - remove mm_linear_map and put in real HDAT.
+ mm_linear_map(reinterpret_cast<void*>(SYSTEM_DATA_POINTER), 4*MEGABYTE);
system_data_t* sys_data =
reinterpret_cast<system_data_t*>(SYSTEM_DATA_POINTER);
memset( sys_data, 'A', sizeof(system_data_t) );
@@ -310,7 +313,7 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum )
(const_cast<TARGETING::Target*>(all_procs[p])) );
// Compute the processor id to match what HDAT uses
- uint64_t node_id =
+ uint64_t node_id =
all_procs[p]->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>();
uint64_t chip_id =
all_procs[p]->getAttr<TARGETING::ATTR_FABRIC_CHIP_ID>();
@@ -328,19 +331,19 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum )
// Prepare the variables for the HSVC_LOAD_ATTR calls
_all_headers = &(node_data->procAttrHeaders[p][0]);
_num_attr = &(node_data->procs[p].numAttr);
- _target = &fapi_proc;
+ _target = &fapi_proc;
// Fill up the attributes
ADD_HUID( (all_procs[p]) ); // for debug
ADD_PHYS_PATH( (all_procs[p]) );
- HSVC_LOAD_ATTR_P( ATTR_EC );
+ HSVC_LOAD_ATTR_P( ATTR_EC );
// Use a generated file for the list of attributes to load
#include "common/hsvc_procdata.C"
// Add an empty attribute header to signal the end
EMPTY_ATTRIBUTE;
-
+
// Loop around all of the EX chiplets for this proc
TARGETING::TargetHandleList all_ex;
TARGETING::getChildChiplets( all_ex, all_procs[p],
@@ -372,7 +375,7 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum )
// Prepare the variables for the HSVC_LOAD_ATTR calls
_all_headers = &(node_data->exAttrHeaders[next_ex][0]);
_num_attr = &(node_data->ex[next_ex].numAttr);
- _target = &fapi_ex;
+ _target = &fapi_ex;
// Fill up the attributes
ADD_HUID( (all_ex[e]) ); // for debug
@@ -434,7 +437,7 @@ errlHndl_t populate_attributes( void )
do {
//@todo : Remove this before RTC:49137 is merged, fix with RTC:49509
- // Skip this in VPO
+ // Skip this in VPO
if( TARGETING::is_vpo() )
{
TRACFCOMP( g_trac_runtime, "Skipping RUNTIME::populate_attributes in VPO mode" );
OpenPOWER on IntegriCloud