summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2013-02-01 12:41:10 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-02-28 11:06:32 -0600
commitbf485f857adec16e7ecb2a3dcc77c416c79b7a29 (patch)
tree78d6451b3f6f7cf9ccbf4dce56699eea39313f53 /src
parent8c32b57d354aad8156d7a06950b5f943db0efe16 (diff)
downloadtalos-hostboot-bf485f857adec16e7ecb2a3dcc77c416c79b7a29.tar.gz
talos-hostboot-bf485f857adec16e7ecb2a3dcc77c416c79b7a29.zip
Add system-wide constants to specify the maximum number of procs possible in the system
Change-Id: I6759b15c3f31f9e8ba219b0f9661a6c947eb94d6 RTC: 61361 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3082 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/sys/misc.h18
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C23
-rw-r--r--src/usr/runtime/populate_attributes.C15
3 files changed, 32 insertions, 24 deletions
diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h
index 8c119aca5..a4ae8d006 100644
--- a/src/include/sys/misc.h
+++ b/src/include/sys/misc.h
@@ -26,6 +26,24 @@
#include <stdint.h>
/**
+ * @enum p8SystemConsts
+ *
+ * system-wide constants:
+ * - please add as necessary
+ *
+ */
+
+enum p8SystemConsts
+{
+ /// max possible processors in a P8 system
+ P8_MAX_PROCS = 8,
+ /// max EX (cores available in a processor )
+ P8_MAX_EX_PER_PROC = 16,
+
+};
+
+
+/**
* @enum ShutdownStatus
*
* Shutdown values for shutdown command.
diff --git a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C
index bd63fe764..23dc77ad6 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C
+++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C
@@ -35,9 +35,9 @@
/******************************************************************************/
#include <stdint.h>
-#include <sys/misc.h> // cpu_thread_count()
-#include <vfs/vfs.H> // PORE image
-#include <sys/mm.h> // mm_linear_map
+#include <sys/misc.h> // cpu_thread_count(), P8_MAX_PROCS
+#include <vfs/vfs.H> // PORE image
+#include <sys/mm.h> // mm_linear_map
#include <trace/interface.H>
#include <initservice/taskargs.H>
@@ -96,9 +96,6 @@ using namespace DeviceFW;
*
* @return NULL if success, errorlog if failure
*
- * @todo $$ Add code to UNload this image/module when all the
- * HWP's are finished.
- *
*/
errlHndl_t loadPoreImage( const TARGETING::Target *i_CpuTarget,
const char *& o_rporeAddr,
@@ -259,7 +256,7 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget,
if( !(en_threads & (0x8000000000000000>>l_threadId)) )
{
continue;
- }
+ }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"applyPoreGenCpuRegs: core=0x%x,thread=0x%x: ",
@@ -324,7 +321,6 @@ void* call_host_build_winkle( void *io_pArgs )
size_t l_poreSize = 0;
void *l_pRealMemBase =
reinterpret_cast<void * const>( OUTPUT_PORE_IMG_ADDR ) ;
-
ISTEP_ERROR::IStepError l_StepError;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
@@ -333,15 +329,10 @@ void* call_host_build_winkle( void *io_pArgs )
// @@@@@ CUSTOM BLOCK: @@@@@
do {
- // @todo Issue 61361
- // Should be a system-wide constant stating the maximum number of procs
- // in the system. In the meantime:
- const uint64_t MAX_POSSIBLE_PROCS_IN_P8_SYSTEM = 8;
-
// Get a chunk of real memory big enough to store all the possible
// SLW images.
- const uint64_t l_RealMemSize = ( (MAX_OUTPUT_PORE_IMG_IN_MB*1*MEGABYTE) *
- MAX_POSSIBLE_PROCS_IN_P8_SYSTEM );
+ const uint64_t l_RealMemSize = ((MAX_OUTPUT_PORE_IMG_IN_MB*1*MEGABYTE) *
+ P8_MAX_PROCS );
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Got realmem to store all SLW images, size=0x%lx",
@@ -594,7 +585,7 @@ void* call_proc_set_pore_bar( void *io_pArgs )
// write the HUID of the core we are writing to
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "Set pore bar for "
+ "Set pore bar for "
"target HUID %.8X", TARGETING::get_huid(l_procChip));
// cast OUR type of target to a FAPI type of target.
diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C
index 05fc98ff6..30514ca6b 100644
--- a/src/usr/runtime/populate_attributes.C
+++ b/src/usr/runtime/populate_attributes.C
@@ -27,6 +27,7 @@
* @brief Populate attributes for runtime HostServices code
*/
+#include <sys/misc.h>
#include <trace/interface.H>
#include <errl/errlentry.H>
#include <fapi.H>
@@ -160,14 +161,12 @@ struct system_data_t
struct node_data_t
{
enum {
- MAX_PROCS = 8,
- MAX_PROCS_RSV = 16, //leave space for double
- MAX_EX_PER_PROC = 16,
- MAX_EX_RSV = MAX_PROCS_RSV*MAX_EX_PER_PROC,
+ MAX_PROCS_RSV = P8_MAX_PROCS*2, //leave space for double
+ MAX_EX_RSV = MAX_PROCS_RSV*P8_MAX_EX_PER_PROC,
NUM_PROC_ATTRIBUTES = 125,
NUM_EX_ATTRIBUTES = 10,
MAX_ATTRIBUTES = MAX_PROCS_RSV*NUM_PROC_ATTRIBUTES +
- MAX_PROCS_RSV*MAX_EX_PER_PROC*NUM_EX_ATTRIBUTES
+ MAX_EX_RSV*NUM_EX_ATTRIBUTES
};
// header data that HostServices uses
@@ -175,9 +174,9 @@ struct node_data_t
// 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_EX_RSV];
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];
+ hsvc_attr_header_t exAttrHeaders[MAX_EX_RSV][NUM_EX_ATTRIBUTES];
char attributes[MAX_ATTRIBUTES*sizeof(uint32_t)];
};
@@ -417,7 +416,7 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum )
EMPTY_ATTRIBUTE;
TRACFCOMP( g_trac_runtime, "populate_node_attributes> PROC:%d (%.8X) : numAttr=%d", procid, TARGETING::get_huid(all_procs[p]), node_data->procs[p].numAttr );
-
+
// Make sure we don't overrun our space
assert( *_num_attr < node_data_t::NUM_PROC_ATTRIBUTES );
OpenPOWER on IntegriCloud