summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C')
-rw-r--r--src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C281
1 files changed, 134 insertions, 147 deletions
diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
index 0017cac92..37fcc87cb 100644
--- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_eff_grouping.C,v 1.24 2013/04/09 20:34:54 bellows Exp $
+// $Id: mss_eff_grouping.C,v 1.25 2013/05/23 11:18:45 gpaulraj Exp $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
// *! All Rights Reserved -- Property of IBM
@@ -312,14 +312,14 @@ extern "C" {
for(pos=0;pos<8;pos++)
{
- eff_grouping_data.groupID[gp_pos][0] = eff_grouping_data.MCS_size[pos];
- eff_grouping_data.groupID[gp_pos][1] = 1;
- eff_grouping_data.groupID[gp_pos][4]= pos;
+ eff_grouping_data.groupID[gp_pos][MCS_SIZE] = eff_grouping_data.MCS_size[pos];
+ eff_grouping_data.groupID[gp_pos][MCS_IN_GROUP] = 1;
+ eff_grouping_data.groupID[gp_pos][MEMBERS_START_ID]= pos;
if(eff_grouping_data.MBA_size[pos][0]>eff_grouping_data.MBA_size[pos][1])
- eff_grouping_data.groupID[gp_pos][15]= eff_grouping_data.MBA_size[pos][0];
+ eff_grouping_data.groupID[gp_pos][LARGEST_MBA_SIZE]= eff_grouping_data.MBA_size[pos][0];
else
- eff_grouping_data.groupID[gp_pos][15]= eff_grouping_data.MBA_size[pos][1];
+ eff_grouping_data.groupID[gp_pos][LARGEST_MBA_SIZE]= eff_grouping_data.MBA_size[pos][1];
gp_pos++;
}
@@ -332,7 +332,7 @@ extern "C" {
count =0;
for(pos=0;pos< gp_pos;pos++)
{
- if(eff_grouping_data.groupID[0][0] == eff_grouping_data.groupID[pos][0] && eff_grouping_data.groupID[pos][0] !=0)
+ if(eff_grouping_data.groupID[0][MCS_SIZE] == eff_grouping_data.groupID[pos][MCS_SIZE] && eff_grouping_data.groupID[pos][MCS_SIZE] !=0)
{
count++;
}
@@ -341,15 +341,15 @@ extern "C" {
if(count == 8)
{
done=1;
- eff_grouping_data.groupID[0][1] = 8;
- eff_grouping_data.groupID[0][4] = 0;
- eff_grouping_data.groupID[0][5] = 4;
- eff_grouping_data.groupID[0][6] = 1;
- eff_grouping_data.groupID[0][7] = 5;
- eff_grouping_data.groupID[0][8] = 2;
- eff_grouping_data.groupID[0][9] = 6;
- eff_grouping_data.groupID[0][10] = 3;
- eff_grouping_data.groupID[0][11] = 7;
+ eff_grouping_data.groupID[0][MCS_IN_GROUP] = 8;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+0] = 0;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+1] = 4;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+2] = 1;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+3] = 5;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+4] = 2;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+5] = 6;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+6] = 3;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+7] = 7;
for(uint8_t i=1;i<16;i++)
for(uint8_t j=0;j<16;j++)
eff_grouping_data.groupID[i][j]=0;
@@ -401,21 +401,21 @@ extern "C" {
{
done =1;
//define the group_data
- eff_grouping_data.groupID[0][0] =eff_grouping_data.groupID[config_4MCS[pos1][0]][0];
- eff_grouping_data.groupID[0][1] = 4;
- eff_grouping_data.groupID[0][4] = config_4MCS[pos1][0];
- eff_grouping_data.groupID[0][5] = config_4MCS[pos1][2];
- eff_grouping_data.groupID[0][6] = config_4MCS[pos1][1];
- eff_grouping_data.groupID[0][7] = config_4MCS[pos1][3];
- eff_grouping_data.groupID[0][15] =eff_grouping_data.groupID[config_4MCS[pos1][0]][15];
-
- eff_grouping_data.groupID[1][0] =eff_grouping_data.groupID[config_4MCS[pos2][0]][0];
- eff_grouping_data.groupID[1][1] = 4;
- eff_grouping_data.groupID[1][4] = config_4MCS[pos2][0];
- eff_grouping_data.groupID[1][5] = config_4MCS[pos2][2];
- eff_grouping_data.groupID[1][6] = config_4MCS[pos2][1];
- eff_grouping_data.groupID[1][7] = config_4MCS[pos2][3];
- eff_grouping_data.groupID[1][15] =eff_grouping_data.groupID[config_4MCS[pos2][0]][15];
+ eff_grouping_data.groupID[0][MCS_SIZE] =eff_grouping_data.groupID[config_4MCS[pos1][0]][0];
+ eff_grouping_data.groupID[0][MCS_IN_GROUP] = 4;
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+0] = config_4MCS[pos1][0];
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+1] = config_4MCS[pos1][2];
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+2] = config_4MCS[pos1][1];
+ eff_grouping_data.groupID[0][MEMBERS_START_ID+3] = config_4MCS[pos1][3];
+ eff_grouping_data.groupID[0][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[config_4MCS[pos1][0]][15];
+
+ eff_grouping_data.groupID[1][MCS_SIZE] =eff_grouping_data.groupID[config_4MCS[pos2][0]][0];
+ eff_grouping_data.groupID[1][MCS_IN_GROUP] = 4;
+ eff_grouping_data.groupID[1][MEMBERS_START_ID+0] = config_4MCS[pos2][0];
+ eff_grouping_data.groupID[1][MEMBERS_START_ID+1] = config_4MCS[pos2][2];
+ eff_grouping_data.groupID[1][MEMBERS_START_ID+2] = config_4MCS[pos2][1];
+ eff_grouping_data.groupID[1][MEMBERS_START_ID+3] = config_4MCS[pos2][3];
+ eff_grouping_data.groupID[1][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[config_4MCS[pos2][0]][15];
for(uint8_t i=2;i<16;i++)
for(uint8_t j=0;j<16;j++)
@@ -435,13 +435,13 @@ extern "C" {
if(allowed)
{
//define the group_data
- tempgpID.groupID[0][0] = eff_grouping_data.groupID[config_4MCS[pos1][0]][0];
- tempgpID.groupID[0][1] = 4;
- tempgpID.groupID[0][4] = config_4MCS[pos1][0];
- tempgpID.groupID[0][5] = config_4MCS[pos1][2];
- tempgpID.groupID[0][6] = config_4MCS[pos1][1];
- tempgpID.groupID[0][7] = config_4MCS[pos1][3];
- tempgpID.groupID[0][15] = eff_grouping_data.groupID[config_4MCS[pos1][0]][15];
+ tempgpID.groupID[0][MCS_SIZE] = eff_grouping_data.groupID[config_4MCS[pos1][0]][0];
+ tempgpID.groupID[0][MCS_IN_GROUP] = 4;
+ tempgpID.groupID[0][MEMBERS_START_ID+0] = config_4MCS[pos1][0];
+ tempgpID.groupID[0][MEMBERS_START_ID+1] = config_4MCS[pos1][2];
+ tempgpID.groupID[0][MEMBERS_START_ID+2] = config_4MCS[pos1][1];
+ tempgpID.groupID[0][MEMBERS_START_ID+3] = config_4MCS[pos1][3];
+ tempgpID.groupID[0][LARGEST_MBA_SIZE] = eff_grouping_data.groupID[config_4MCS[pos1][0]][15];
gp++;
for(int i=0; i<4;i++)
{
@@ -455,18 +455,18 @@ extern "C" {
{
for(pos=0;pos< gp_pos;pos=pos+2)
{
- if(eff_grouping_data.groupID[pos][0] == eff_grouping_data.groupID[pos+1][0] && eff_grouping_data.groupID[pos][0] !=0 )
+ if(eff_grouping_data.groupID[pos][MCS_SIZE] == eff_grouping_data.groupID[pos+1][MCS_SIZE] && eff_grouping_data.groupID[pos][MCS_SIZE] !=0 )
{
//group
- tempgpID.groupID[gp][0] =eff_grouping_data.groupID[pos][0] ;
- tempgpID.groupID[gp][1] = 2;
- tempgpID.groupID[gp][4] = pos;
- tempgpID.groupID[gp][5] = pos+1;
- tempgpID.groupID[gp][15] =eff_grouping_data.groupID[pos][15] ;
+ tempgpID.groupID[gp][MCS_SIZE] =eff_grouping_data.groupID[pos][MCS_SIZE] ;
+ tempgpID.groupID[gp][MCS_IN_GROUP] = 2;
+ tempgpID.groupID[gp][MEMBERS_START_ID+0] = pos;
+ tempgpID.groupID[gp][MEMBERS_START_ID+1] = pos+1;
+ tempgpID.groupID[gp][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE] ;
grouped[pos]=1;
grouped[pos+1]=1;
- eff_grouping_data.groupID[pos][0]=0;
- eff_grouping_data.groupID[pos+1][0]=0;
+ eff_grouping_data.groupID[pos][MCS_SIZE]=0;
+ eff_grouping_data.groupID[pos+1][MCS_SIZE]=0;
gp++;
}
}
@@ -475,15 +475,15 @@ extern "C" {
{
for(pos=0;pos< gp_pos;pos++)
{
- if(eff_grouping_data.groupID[pos][0] !=0 )
+ if(eff_grouping_data.groupID[pos][MCS_SIZE] !=0 )
{
//group
- tempgpID.groupID[gp][0] =eff_grouping_data.groupID[pos][0] ;
- tempgpID.groupID[gp][1] = 1;
- tempgpID.groupID[gp][4] = pos;
- tempgpID.groupID[gp][15] =eff_grouping_data.groupID[pos][15] ;
+ tempgpID.groupID[gp][MCS_SIZE] =eff_grouping_data.groupID[pos][MCS_SIZE] ;
+ tempgpID.groupID[gp][MCS_IN_GROUP] = 1;
+ tempgpID.groupID[gp][MEMBERS_START_ID+0] = pos;
+ tempgpID.groupID[gp][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE] ;
grouped[pos]=1;
- eff_grouping_data.groupID[pos][0]=0;
+ eff_grouping_data.groupID[pos][MCS_SIZE]=0;
gp++;
}
}
@@ -496,9 +496,9 @@ extern "C" {
for(uint8_t i=0;i<8;i++)
{
- if(grouped[i] !=1 && eff_grouping_data.groupID[i][0] != 0 )
+ if(grouped[i] !=1 && eff_grouping_data.groupID[i][MCS_SIZE] != 0 )
{
- FAPI_ERR ("UNABLE TO GROUP MCS%d size is %d", i,eff_grouping_data.groupID[i][0]);
+ FAPI_ERR ("UNABLE TO GROUP MCS%d size is %d", i,eff_grouping_data.groupID[i][MCS_SIZE]);
ungroup++;
if(ungroup == 1) { // First time, call out the Main error
FAPI_SET_HWP_ERROR(ungroup_rc, RC_MSS_UNABLE_TO_GROUP_SUMMARY);
@@ -529,13 +529,13 @@ extern "C" {
{
for(uint8_t i=0;i<16;i++)
{
- if( eff_grouping_data.groupID[i][0] !=0)
+ if( eff_grouping_data.groupID[i][MCS_SIZE] !=0)
{
gp_pos++;
- FAPI_INF(" group no= %d , num of MCS = %d , size of MCS = %d \n ", i,eff_grouping_data.groupID[i][1],eff_grouping_data.groupID[i][0]);
+ FAPI_INF(" group no= %d , num of MCS = %d , size of MCS = %d \n ", i,eff_grouping_data.groupID[i][MCS_IN_GROUP],eff_grouping_data.groupID[i][MCS_SIZE]);
for(uint8_t k=0 ; k< eff_grouping_data.groupID[i][1];k++)
{
- FAPI_INF("MCSID%d = %d \n ", k, eff_grouping_data.groupID[i][4+k]);
+ FAPI_INF("MCSID%d = %d \n ", k, eff_grouping_data.groupID[i][MEMBERS_START_ID+k]);
}
}
}
@@ -548,26 +548,26 @@ extern "C" {
uint64_t total_size_non_mirr =0;
for(pos=0;pos<=gp_pos;pos++)
{
- eff_grouping_data.groupID[pos][2] = eff_grouping_data.groupID[pos][0]*eff_grouping_data.groupID[pos][1];
+ eff_grouping_data.groupID[pos][GROUP_SIZE] = eff_grouping_data.groupID[pos][MCS_SIZE]*eff_grouping_data.groupID[pos][MCS_IN_GROUP];
//eff_grouping_data.groupID[pos+8][2]= eff_grouping_data.groupID[pos][2]/2; // group size when mirrored
- count = mss_eff_grouping_recursion(eff_grouping_data.groupID[pos][2]);
+ count = mss_eff_grouping_recursion(eff_grouping_data.groupID[pos][GROUP_SIZE]);
if(count>1)
{
- FAPI_INF("MCS pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][3]);
+ FAPI_INF("MCS pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][GROUP_SIZE]);
- eff_grouping_data.groupID[pos][2] = eff_grouping_data.groupID[pos][15]*2*eff_grouping_data.groupID[pos][1];
- eff_grouping_data.groupID[pos][13] = eff_grouping_data.groupID[pos][1]*(eff_grouping_data.groupID[pos][0]-eff_grouping_data.groupID[pos][15]);
+ eff_grouping_data.groupID[pos][GROUP_SIZE] = eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE]*2*eff_grouping_data.groupID[pos][MCS_IN_GROUP];
+ eff_grouping_data.groupID[pos][ALT_SIZE] = eff_grouping_data.groupID[pos][MCS_IN_GROUP]*(eff_grouping_data.groupID[pos][MCS_SIZE]-eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE]);
//mirrored group
- //eff_grouping_data.groupID[pos+8][2] = eff_grouping_data.groupID[pos][2]/2; //group size with alternate bars
- //eff_grouping_data.groupID[pos+8][13] = eff_grouping_data.groupID[pos][13]/2;
- eff_grouping_data.groupID[pos][12] =1;
+ //eff_grouping_data.groupID[pos+8][GROUP_SIZE] = eff_grouping_data.groupID[pos][GROUP_SIZE]/2; //group size with alternate bars
+ //eff_grouping_data.groupID[pos+8][ALT_SIZE] = eff_grouping_data.groupID[pos][ALT_SIZE]/2;
+ eff_grouping_data.groupID[pos][ALT_VALID] =1;
}
- total_size_non_mirr += eff_grouping_data.groupID[pos][2];
+ total_size_non_mirr += eff_grouping_data.groupID[pos][GROUP_SIZE];
}
for(i=0;i<gp_pos;i++)
{
@@ -581,7 +581,7 @@ extern "C" {
{
for(i=pos;i< gp_pos;i++)
{
- if ( eff_grouping_data.groupID[i][2] > eff_grouping_data.groupID[pos][2])
+ if ( eff_grouping_data.groupID[i][GROUP_SIZE] > eff_grouping_data.groupID[pos][GROUP_SIZE])
{
for(j=0;j<16;j++) temp[j] = eff_grouping_data.groupID[pos][j];
for(j=0;j<16;j++) eff_grouping_data.groupID[pos][j] = eff_grouping_data.groupID[i][j];
@@ -595,17 +595,17 @@ extern "C" {
// calcutate mirrored group size
for(pos=0;pos<gp_pos;pos++)
{
- if(eff_grouping_data.groupID[pos][0]!=0 && eff_grouping_data.groupID[pos][1]>1 )
+ if(eff_grouping_data.groupID[pos][MCS_SIZE]!=0 && eff_grouping_data.groupID[pos][MCS_IN_GROUP]>1 )
{
- eff_grouping_data.groupID[pos+8][2]= eff_grouping_data.groupID[pos][2]/2; // group size when mirrored
+ eff_grouping_data.groupID[pos+8][GROUP_SIZE]= eff_grouping_data.groupID[pos][GROUP_SIZE]/2; // group size when mirrored
- if(eff_grouping_data.groupID[pos][12])
+ if(eff_grouping_data.groupID[pos][ALT_VALID])
{
- FAPI_INF("Mirrored group pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][3]);
+ FAPI_INF("Mirrored group pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][GROUP_SIZE]);
//mirrored group
- eff_grouping_data.groupID[pos+8][2] = eff_grouping_data.groupID[pos][2]/2; //group size with alternate bars
- eff_grouping_data.groupID[pos+8][13] = eff_grouping_data.groupID[pos][13]/2;
+ eff_grouping_data.groupID[pos+8][GROUP_SIZE] = eff_grouping_data.groupID[pos][GROUP_SIZE]/2; //group size with alternate bars
+ eff_grouping_data.groupID[pos+8][ALT_SIZE] = eff_grouping_data.groupID[pos][ALT_SIZE]/2;
}
}
@@ -630,34 +630,34 @@ extern "C" {
if(pos==0)
{
- eff_grouping_data.groupID[pos][3] =mss_base_address;
+ eff_grouping_data.groupID[pos][BASE_ADDR] =mss_base_address;
- if(eff_grouping_data.groupID[pos][12])
+ if(eff_grouping_data.groupID[pos][ALT_VALID])
{
- eff_grouping_data.groupID[pos][14] = eff_grouping_data.groupID[pos][3]+ eff_grouping_data.groupID[pos][2]/2;
+ eff_grouping_data.groupID[pos][ALT_BASE_ADDR] = eff_grouping_data.groupID[pos][BASE_ADDR]+ eff_grouping_data.groupID[pos][GROUP_SIZE]/2;
}
}
else
{
- eff_grouping_data.groupID[pos][3] = eff_grouping_data.groupID[pos-1][3]+eff_grouping_data.groupID[pos-1][2];
+ eff_grouping_data.groupID[pos][BASE_ADDR] = eff_grouping_data.groupID[pos-1][BASE_ADDR]+eff_grouping_data.groupID[pos-1][GROUP_SIZE];
- if(eff_grouping_data.groupID[pos][12])
+ if(eff_grouping_data.groupID[pos][ALT_VALID])
{
- eff_grouping_data.groupID[pos][14] = eff_grouping_data.groupID[pos][3]+ eff_grouping_data.groupID[pos][2]/2;
+ eff_grouping_data.groupID[pos][ALT_BASE_ADDR] = eff_grouping_data.groupID[pos][BASE_ADDR]+ eff_grouping_data.groupID[pos][GROUP_SIZE]/2;
}
}
- if(eff_grouping_data.groupID[pos][1]>1 )
+ if(eff_grouping_data.groupID[pos][MCS_IN_GROUP]>1 )
{
- eff_grouping_data.groupID[pos+8][3]=mirror_base;
- mirror_base= mirror_base + eff_grouping_data.groupID[pos+8][2];
- if(eff_grouping_data.groupID[pos][12])
+ eff_grouping_data.groupID[pos+8][BASE_ADDR]=mirror_base;
+ mirror_base= mirror_base + eff_grouping_data.groupID[pos+8][GROUP_SIZE];
+ if(eff_grouping_data.groupID[pos][ALT_VALID])
{
- eff_grouping_data.groupID[pos+8][14] = eff_grouping_data.groupID[pos+8][3]+ eff_grouping_data.groupID[pos+8][2]/2; //mirrored base address with alternate bars
+ eff_grouping_data.groupID[pos+8][ALT_BASE_ADDR] = eff_grouping_data.groupID[pos+8][BASE_ADDR]+ eff_grouping_data.groupID[pos+8][GROUP_SIZE]/2; //mirrored base address with alternate bars
}
}
@@ -682,11 +682,11 @@ extern "C" {
{
count=0;
MC_IN_GP.flushTo0();
- if(eff_grouping_data.groupID[i][0]!=0)
+ if(eff_grouping_data.groupID[i][MCS_SIZE]!=0)
{
- count = eff_grouping_data.groupID[i][1];
+ count = eff_grouping_data.groupID[i][MCS_IN_GROUP];
for(uint8_t j=0;j<count;j++)
- MC_IN_GP.setBit(eff_grouping_data.groupID[i][4+j]);
+ MC_IN_GP.setBit(eff_grouping_data.groupID[i][MEMBERS_START_ID+j]);
mcs_in_group[i]= MC_IN_GP.getByte(0);
}
}
@@ -700,7 +700,12 @@ extern "C" {
FAPI_DBG(" ATTR_MSS_MEM_MC_IN_GROUP[7]: 0x%x", mcs_in_group[7]);
rc= FAPI_ATTR_SET(ATTR_MSS_MEM_MC_IN_GROUP, &i_target, mcs_in_group);
- if (!rc.ok())FAPI_ERR("Error writing ATTR_MSS_MEM_MC_IN_GROUP");
+ if (!rc.ok())
+ {
+ FAPI_ERR("Error writing ATTR_MSS_MEM_MC_IN_GROUP");
+ break;
+ }
+
uint64_t mem_bases[8];
uint64_t l_memory_sizes[8];
@@ -710,23 +715,23 @@ extern "C" {
//uint32_t temp[8];
for(uint8_t i=0;i<8;i++)
{
- if(eff_grouping_data.groupID[i][0]>0)
+ if(eff_grouping_data.groupID[i][MCS_SIZE]>0)
{
- FAPI_INF (" Group %d MCS Size %4dGB",i,eff_grouping_data.groupID[i][0]);
- FAPI_INF (" No of MCS %4d ",eff_grouping_data.groupID[i][1]);
- FAPI_INF (" Group Size %4dGB",eff_grouping_data.groupID[i][2]);
- FAPI_INF (" Base Add. %4dGB ",eff_grouping_data.groupID[i][3]);
- FAPI_INF (" Mirrored Group SIze %4dGB", eff_grouping_data.groupID[i+8][2]);
- FAPI_INF (" Mirror Base Add %4dGB" , eff_grouping_data.groupID[i+8][3]);
- for(uint8_t j=4;j<4+eff_grouping_data.groupID[i][1];j++)
+ FAPI_INF (" Group %d MCS Size %4dGB",i,eff_grouping_data.groupID[i][MCS_SIZE]);
+ FAPI_INF (" No of MCS %4d ",eff_grouping_data.groupID[i][MCS_IN_GROUP]);
+ FAPI_INF (" Group Size %4dGB",eff_grouping_data.groupID[i][GROUP_SIZE]);
+ FAPI_INF (" Base Add. %4dGB ",eff_grouping_data.groupID[i][BASE_ADDR]);
+ FAPI_INF (" Mirrored Group SIze %4dGB", eff_grouping_data.groupID[i+8][GROUP_SIZE]);
+ FAPI_INF (" Mirror Base Add %4dGB" , eff_grouping_data.groupID[i+8][BASE_ADDR]);
+ for(uint8_t j=4;j<4+eff_grouping_data.groupID[i][MCS_IN_GROUP];j++)
{
FAPI_INF (" MCSID%d- Pos %4d",(j-4),eff_grouping_data.groupID[i][j]);
}
- FAPI_INF (" Alter-bar %4d",eff_grouping_data.groupID[i][12]);
- FAPI_INF("Alter-bar base add = %4dGB ",eff_grouping_data.groupID[i][14]);
- FAPI_INF("Alter-bar size = %4dGB",eff_grouping_data.groupID[i][13]);
- FAPI_INF("Alter-bar Mirrored Base add = %4dGB ", eff_grouping_data.groupID[i+8][14]);
- FAPI_INF("Alter-bar Mirrored size = %4dGB", eff_grouping_data.groupID[i+8][13]);
+ FAPI_INF (" Alter-bar %4d",eff_grouping_data.groupID[i][ALT_VALID]);
+ FAPI_INF("Alter-bar base add = %4dGB ",eff_grouping_data.groupID[i][ALT_BASE_ADDR]);
+ FAPI_INF("Alter-bar size = %4dGB",eff_grouping_data.groupID[i][ALT_SIZE]);
+ FAPI_INF("Alter-bar Mirrored Base add = %4dGB ", eff_grouping_data.groupID[i+8][ALT_BASE_ADDR]);
+ FAPI_INF("Alter-bar Mirrored size = %4dGB", eff_grouping_data.groupID[i+8][ALT_SIZE]);
}
else
{
@@ -742,28 +747,23 @@ extern "C" {
eff_grouping_data.groupID[i][9] = 0;
}
}
-// rc = FAPI_ATTR_GET(ATTR_MSS_MCS_GROUP_32, &target, eff_grouping_data.groupID);
-// if (!rc.ok())
-// {
-// FAPI_ERR("Error reading ATTR_MSS_MCS_GROUP");
-// // break;
-// }
- // base addresses for distinct non-mirrored ranges
- mem_bases[0]=eff_grouping_data.groupID[0][3];
+
+ // base addresses for distinct non-mirrored ranges
+ mem_bases[0]=eff_grouping_data.groupID[0][BASE_ADDR];
mem_bases[0] = mem_bases[0] <<30;
- mem_bases[1]=eff_grouping_data.groupID[1][3];
+ mem_bases[1]=eff_grouping_data.groupID[1][BASE_ADDR];
mem_bases[1] = mem_bases[1] <<30;
- mem_bases[2]=eff_grouping_data.groupID[2][3];
+ mem_bases[2]=eff_grouping_data.groupID[2][BASE_ADDR];
mem_bases[2] = mem_bases[2] <<30;
- mem_bases[3]=eff_grouping_data.groupID[3][3];
+ mem_bases[3]=eff_grouping_data.groupID[3][BASE_ADDR];
mem_bases[3] = mem_bases[3] <<30;
- mem_bases[4]=eff_grouping_data.groupID[4][3];
+ mem_bases[4]=eff_grouping_data.groupID[4][BASE_ADDR];
mem_bases[4] = mem_bases[4] <<30;
- mem_bases[5]=eff_grouping_data.groupID[5][3];
+ mem_bases[5]=eff_grouping_data.groupID[5][BASE_ADDR];
mem_bases[5] = mem_bases[5] <<30;
- mem_bases[6]=eff_grouping_data.groupID[6][3];
+ mem_bases[6]=eff_grouping_data.groupID[6][BASE_ADDR];
mem_bases[6] = mem_bases[6] <<30;
- mem_bases[7]=eff_grouping_data.groupID[7][3];
+ mem_bases[7]=eff_grouping_data.groupID[7][BASE_ADDR];
mem_bases[7] = mem_bases[7] <<30;
FAPI_DBG(" ATTR_PROC_MEM_BASES[0]: %016llx", mem_bases[0]);
@@ -779,25 +779,25 @@ extern "C" {
if (!rc.ok())
{
FAPI_ERR("Error writing ATTR_PROC_MEM_BASES");
- //break;
+ break;
}
// sizes for distinct non-mirrored ranges
- l_memory_sizes[0]=eff_grouping_data.groupID[0][2];
+ l_memory_sizes[0]=eff_grouping_data.groupID[0][GROUP_SIZE];
l_memory_sizes[0] = l_memory_sizes[0] <<30;
- l_memory_sizes[1]=eff_grouping_data.groupID[1][2];
+ l_memory_sizes[1]=eff_grouping_data.groupID[1][GROUP_SIZE];
l_memory_sizes[1] = l_memory_sizes[1] <<30;
- l_memory_sizes[2]=eff_grouping_data.groupID[2][2];
+ l_memory_sizes[2]=eff_grouping_data.groupID[2][GROUP_SIZE];
l_memory_sizes[2] = l_memory_sizes[2] <<30;
- l_memory_sizes[3]=eff_grouping_data.groupID[3][2];
+ l_memory_sizes[3]=eff_grouping_data.groupID[3][GROUP_SIZE];
l_memory_sizes[3] = l_memory_sizes[3] <<30;
- l_memory_sizes[4]=eff_grouping_data.groupID[4][2];
+ l_memory_sizes[4]=eff_grouping_data.groupID[4][GROUP_SIZE];
l_memory_sizes[4] = l_memory_sizes[4] <<30;
- l_memory_sizes[5]=eff_grouping_data.groupID[5][2];
+ l_memory_sizes[5]=eff_grouping_data.groupID[5][GROUP_SIZE];
l_memory_sizes[5] = l_memory_sizes[5] <<30;
- l_memory_sizes[6]=eff_grouping_data.groupID[6][2];
+ l_memory_sizes[6]=eff_grouping_data.groupID[6][GROUP_SIZE];
l_memory_sizes[6] = l_memory_sizes[6] <<30;
- l_memory_sizes[7]=eff_grouping_data.groupID[7][2];
+ l_memory_sizes[7]=eff_grouping_data.groupID[7][GROUP_SIZE];
l_memory_sizes[7] = l_memory_sizes[7] <<30;
FAPI_DBG(" ATTR_PROC_MEM_SIZES[0]: %016llx", l_memory_sizes[0]);
@@ -815,13 +815,7 @@ extern "C" {
FAPI_ERR("Error writing ATTR_PROC_MEM_SIZES");
break;
}
- rc = FAPI_ATTR_GET(ATTR_PROC_MEM_SIZES, &i_target, l_memory_sizes);
- if (!rc.ok())
- {
- FAPI_ERR("Error writing ATTR_PROC_MEM_SIZES");
- break;
- }
- FAPI_DBG(" ATTR_PROC_MEM_SIZES[0]: %016llx", l_memory_sizes[0]);
+ FAPI_DBG(" ATTR_PROC_MEM_SIZES[0]: %016llx", l_memory_sizes[0]);
FAPI_DBG(" ATTR_PROC_MEM_SIZES[1]: %016llx", l_memory_sizes[1]);
FAPI_DBG(" ATTR_PROC_MEM_SIZES[2]: %016llx", l_memory_sizes[2]);
FAPI_DBG(" ATTR_PROC_MEM_SIZES[3]: %016llx", l_memory_sizes[3]);
@@ -839,19 +833,12 @@ extern "C" {
// process mirrored ranges
//
- // read chip base address attribute
-/// rc = FAPI_ATTR_GET(ATTR_PROC_MIRROR_BASE, &i_chip_target, mirror_base);
-// if (!rc.ok())
-// {
-// FAPI_ERR("Error reading ATTR_PROC_MIRROR_BASE");
-// break;
-// }
// base addresses for distinct mirrored ranges
- mirror_bases[0] = eff_grouping_data.groupID[8][3];
- mirror_bases[1] = eff_grouping_data.groupID[9][3];
- mirror_bases[2] = eff_grouping_data.groupID[10][3];
- mirror_bases[3] = eff_grouping_data.groupID[11][3];
+ mirror_bases[0] = eff_grouping_data.groupID[8][BASE_ADDR];
+ mirror_bases[1] = eff_grouping_data.groupID[9][BASE_ADDR];
+ mirror_bases[2] = eff_grouping_data.groupID[10][BASE_ADDR];
+ mirror_bases[3] = eff_grouping_data.groupID[11][BASE_ADDR];
mirror_bases[0] = mirror_bases[0]<<30;
mirror_bases[1] = mirror_bases[1]<<30;
@@ -870,10 +857,10 @@ extern "C" {
}
// sizes for distinct mirrored ranges
- l_mirror_sizes[0]=eff_grouping_data.groupID[8][2];
- l_mirror_sizes[1]=eff_grouping_data.groupID[9][2];
- l_mirror_sizes[2]=eff_grouping_data.groupID[10][2];
- l_mirror_sizes[3]=eff_grouping_data.groupID[11][2];
+ l_mirror_sizes[0]=eff_grouping_data.groupID[8][GROUP_SIZE];
+ l_mirror_sizes[1]=eff_grouping_data.groupID[9][GROUP_SIZE];
+ l_mirror_sizes[2]=eff_grouping_data.groupID[10][GROUP_SIZE];
+ l_mirror_sizes[3]=eff_grouping_data.groupID[11][GROUP_SIZE];
l_mirror_sizes[0] = l_mirror_sizes[0]<<30;
l_mirror_sizes[1] = l_mirror_sizes[1]<<30;
OpenPOWER on IntegriCloud