Skip to content

Commit

Permalink
RTC#139064: Targeting updates for Cumulus Centaur memory sub system
Browse files Browse the repository at this point in the history
Change-Id: I6bfff05eeeb78d1c20e5677d198a53b4a8309186
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41733
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: VENKATESH SAINATH <venkatesh.sainath@in.ibm.com>
Reviewed-by: Sakethan R. Kotta <sakkotta@in.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
bhmadhur authored and dcrowell77 committed Jun 27, 2017
1 parent 2374128 commit 81acff6
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 179 deletions.
361 changes: 221 additions & 140 deletions src/usr/targeting/common/Targets.pm

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/usr/targeting/common/entitypath.C
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ const char* EntityPath::pathElementTypeAsString(
return "MCA";
case TYPE_MCBIST:
return "MCBIST";
case TYPE_MC:
return "MC";
case TYPE_MI:
return "MI";
case TYPE_DMI:
Expand Down
21 changes: 17 additions & 4 deletions src/usr/targeting/common/processMrw.pl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
{
processApss($targetObj, $target);
}
elsif ($type eq "MEMBUF")
{
processMembuf($targetObj, $target);
}

processIpmiSensors($targetObj,$target);
}
Expand Down Expand Up @@ -563,6 +567,7 @@ sub processProcessor
$targetObj->setAttribute($child, "VDDR_ID", $socket_pos);
}
}

elsif ($child_type eq "OCC")
{
processOcc($targetObj, $child, $target);
Expand Down Expand Up @@ -652,10 +657,12 @@ sub processI2cSpeeds
}

my $i2cs=$targetObj->findConnections($target,"I2C","");

if ($i2cs ne "") {
foreach my $i2c (@{$i2cs->{CONN}}) {
my $dest_type = $targetObj->getTargetType($i2c->{DEST_PARENT});
my $parent_target =$targetObj->getTargetParent($i2c->{DEST_PARENT});

if ($dest_type eq "chip-spd-device") {
setEepromAttributes($targetObj,
"EEPROM_VPD_PRIMARY_INFO",$parent_target,
Expand Down Expand Up @@ -889,6 +896,7 @@ sub processObus
#No connections mean, we need to set the OBUS_SLOT_INDEX to -1
#to mark that they are not connected
$targetObj->log($target,"no bus connection found");

foreach my $obrick (@{ $targetObj->getTargetChildren($target) })
{
$targetObj->setAttribute($obrick, "OBUS_SLOT_INDEX", -1);
Expand Down Expand Up @@ -923,6 +931,7 @@ sub processObus
if ($match eq 0)
{
$targetObj->setAttribute($obrick, "OBUS_SLOT_INDEX", -1);

}
}
}
Expand Down Expand Up @@ -1363,6 +1372,7 @@ sub processMembufVpdAssociation
{
my $targetObj = shift;
my $target = shift;

my $vpds=$targetObj->findConnections($target,"I2C","VPD");
if ($vpds ne "" ) {
my $vpd = $vpds->{CONN}->[0];
Expand Down Expand Up @@ -1423,7 +1433,8 @@ sub processMembuf
if ($targetObj->getType($child) eq "MBA")
{
my $mba_num = $targetObj->getAttribute($child,"MBA_NUM");
my $dimms=$targetObj->findConnections($child,"DDR3","");
my $dimms=$targetObj->findConnections($child,"DDR4","");

if ($dimms ne "")
{
foreach my $dimm (@{$dimms->{CONN}})
Expand All @@ -1450,8 +1461,10 @@ sub processMembuf
setEepromAttributes($targetObj,
"EEPROM_VPD_PRIMARY_INFO",$dimm_target,
$dimm);

my $field=getI2cMapField($targetObj,$dimm_target,$dimm);
my $map = $dimm_portmap{$dimm_target};

if ($map eq "") {
print "ERROR: $dimm_target doesn't map to a dimm/port\n";
$targetObj->myExit(3);
Expand All @@ -1463,12 +1476,12 @@ sub processMembuf
"MRW_MEM_SENSOR_CACHE_ADDR_MAP","0x".join("",@addr_map));

## Update bus speeds
#@TODO RTC:163874 -- centaur support
#processI2cSpeeds($targetObj,$target);
processI2cSpeeds($targetObj,$target);

## Do MBA port mapping
my %mba_port_map;
my $ddrs=$targetObj->findConnections($target,"DDR3","DIMM");
#@TODO RTC:175881 -- Support DDR3 DIMMs on Fleetwood systems
my $ddrs=$targetObj->findConnections($target,"DDR4","DIMM");
if ($ddrs ne "") {
my %portmap;
foreach my $ddr (@{$ddrs->{CONN}}) {
Expand Down
43 changes: 41 additions & 2 deletions src/usr/targeting/common/xmltohb/attribute_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,18 @@
<name>NPU</name>
<value>67</value>
</enumerator>
<enumerator>
<name>MC</name>
<value>68</value>
</enumerator>
<!-- add any new types here, and increment TEST_FAIL and LAST_IN_RANGE -->
<enumerator>
<name>TEST_FAIL</name>
<value>68</value>
<value>69</value>
</enumerator>
<enumerator>
<name>LAST_IN_RANGE</name>
<value>69</value>
<value>70</value>
</enumerator>
<default>NA</default>
</enumerationType>
Expand Down Expand Up @@ -1231,6 +1235,26 @@
<writeable/>
</attribute>

<attribute>
<id>ISDIMM_MBVPD_INDEX</id>
<description>
Multiple centaurs can sometimes have their VPD located in one
physical SEEPROM. This is the index into the memory buffer VPD
for this centaur.
</description>
<simpleType>
<uint8_t>
<default>0</default>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
<hwpfToHbAttrMap>
<id>ATTR_ISDIMM_MBVPD_INDEX</id>
<macro>DIRECT</macro>
</hwpfToHbAttrMap>
</attribute>

<attribute>
<id>FSI_MASTER_CHIP</id>
<description>Chip which contains the FSI master logic that drives this slave when booting from the default master processor</description>
Expand Down Expand Up @@ -12625,6 +12649,21 @@ Measured in GB</description>
<readable/>
</attribute>

<attribute>
<id>MAX_DMI_PER_PROC</id>
<description>
System attribute.
The max DMI units per proc available in the system.
</description>
<simpleType>
<uint8_t>
<default>8</default>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
</attribute>

<attribute>
<id>TEST_NEGATIVE_FCN</id>
<description>Attribute to test signed attribute
Expand Down
20 changes: 0 additions & 20 deletions src/usr/targeting/common/xmltohb/attribute_types_openpower.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,26 +284,6 @@
<writeable/>
</attribute>

<attribute>
<id>ISDIMM_MBVPD_INDEX</id>
<description>
Multiple centaurs can sometimes have their VPD located in one
physical SEEPROM. This is the index into the memory buffer VPD
for this centaur.
</description>
<simpleType>
<uint8_t>
<default>0</default>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
<hwpfToHbAttrMap>
<id>ATTR_ISDIMM_MBVPD_INDEX</id>
<macro>DIRECT</macro>
</hwpfToHbAttrMap>
</attribute>

<attribute>
<id>IPMI_INSTANCE</id>
<description>Holds the IPMI instance number for this entity.</description>
Expand Down
35 changes: 28 additions & 7 deletions src/usr/targeting/common/xmltohb/target_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
<attribute><id>HWAS_STATE_CHANGED_SUBSCRIPTION_MASK</id>
<default>0x00000001</default> <!-- GARD -->
</attribute>

<attribute><id>VPD_REC_NUM</id></attribute>
<!-- New attributes for mss/proc_setup_bars -->
<!-- proc_setup_bars_memory_attributes.xml -->
Expand Down Expand Up @@ -403,12 +404,13 @@
<field><id>reserved</id><value>0</value></field>
</default>
</attribute>
<attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute>
<attribute>
<id>ISDIMM_MBVPD_INDEX</id>
</attribute>
<attribute>
<id>I2C_BUS_SPEED_ARRAY</id>
<default>0,0,0,0,0,400,0,400,400,0,0,0,0,0,0,0</default>
</attribute>

<attribute><id>MSS_FREQ</id></attribute>
<attribute><id>MSS_LAB_OVERRIDE_FOR_MEM_PLL</id></attribute>
<attribute><id>ECID</id></attribute>
Expand Down Expand Up @@ -462,7 +464,7 @@
</attribute>
<attribute><id>CDM_DOMAIN</id><default>MEM</default></attribute>
<attribute><id>FRU_ID</id></attribute>
<attribute><id>MSS_VREF_CAL_CNTL</id></attribute>
<attribute><id>MSS_VREF_CAL_CNTL</id></attribute>
</targetType>

<!--Dummy card to use as a DIMM for initial I2C/EEPROM testing -->
Expand Down Expand Up @@ -500,10 +502,7 @@
<attribute><id>HWAS_STATE_CHANGED_SUBSCRIPTION_MASK</id>
<default>0x00000003</default> <!--GARD | MEMDIAG -->
</attribute>

<attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute>
<attribute><id>TEMP_SENSOR_I2C_CONFIG</id></attribute>

<attribute><id>VPD_REC_NUM</id></attribute>
<attribute><id>MSS_EFF_VPD_VERSION</id></attribute>
<attribute><id>CDM_DOMAIN</id><default>DIMM</default></attribute>
Expand Down Expand Up @@ -615,6 +614,7 @@
<default>43</default>
</attribute>
<attribute><id>MAX_MCS_PER_SYSTEM</id></attribute>
<attribute><id>MAX_DMI_PER_PROC</id></attribute>
<attribute><id>TEST_NEGATIVE_FCN</id></attribute>
<!-- End max/min config attributes -->
<attribute><id>RECONFIGURE_LOOP</id></attribute>
Expand Down Expand Up @@ -719,7 +719,6 @@
<attribute><id>MAX_MBA_PORTS_PER_MBA</id></attribute>
<attribute><id>MAX_DIMMS_PER_MBA_PORT</id></attribute>
<attribute><id>MAX_CHIPLETS_PER_PROC</id></attribute>
<attribute><id>MAX_MCS_PER_SYSTEM</id></attribute>
<attribute><id>FABRIC_TO_PHYSICAL_NODE_MAP</id></attribute>
<attribute><id>RUN_MAX_MEM_PATTERNS</id></attribute>
<attribute><id>HIDDEN_ERRLOGS_ENABLE</id></attribute>
Expand Down Expand Up @@ -2020,6 +2019,28 @@
</attribute>
</targetType>

<!-- MC
Nimbus : None
Cumulus: 2 per chip -->
<targetType>
<id>unit-mc-power9</id>
<parent>unit</parent>
<attribute>
<id>TYPE</id>
<default>MC</default>
</attribute>
<attribute><id>DECONFIG_GARDABLE</id><default>1</default></attribute>
<attribute><id>PARENT_PERVASIVE</id></attribute>
</targetType>
<targetType>
<id>unit-mc-cumulus</id>
<parent>unit-mc-power9</parent>
<attribute>
<id>MODEL</id>
<default>CUMULUS</default>
</attribute>
</targetType>

<!-- MI
Nimbus : None
Cumulus: total of 4 per chip -->
Expand Down
6 changes: 0 additions & 6 deletions src/usr/targeting/common/xmltohb/target_types_hb.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,7 @@
<id>I2C_PAGE_MUTEX_1</id>
<default>0</default>
</attribute>
<attribute>
<id>GPIO_INFO</id>
</attribute>
<attribute><id>VPD_SWITCHES</id></attribute>
<attribute>
<id>ISDIMM_MBVPD_INDEX</id>
</attribute>
<attribute><id>PART_NUMBER</id></attribute>
<attribute><id>SERIAL_NUMBER</id></attribute>
<attribute>
Expand Down
5 changes: 5 additions & 0 deletions src/usr/targeting/common/xmltohb/target_types_openpower.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,16 @@
<targetTypeExtension>
<id>chip-membuf-centaur</id>
<attribute><id>IPMI_SENSORS</id></attribute>
<attribute>
<id>GPIO_INFO</id>
</attribute>
<attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute>
</targetTypeExtension>

<targetTypeExtension>
<id>lcard-dimm</id>
<attribute><id>IPMI_SENSORS</id></attribute>
<attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute>
</targetTypeExtension>

<targetTypeExtension>
Expand Down
8 changes: 8 additions & 0 deletions src/usr/targeting/common/xmltohb/xmltohb.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5451,6 +5451,14 @@ sub generateTargetingImage {
# Use all attributes including virtual for association processing
getTargetAttributes($targetInstance->{type}, $allAttributes,\%attrhash);

#Check for Targets with ZERO attributes before writing to PNOR.
my $tempNumAttributes = keys %attrhash;
if($tempNumAttributes == 0)
{
#skip the present target
next;
}

# Update hash with any per-instance overrides, but only if that
# attribute has already been defined
foreach my $attr (@{$targetInstance->{attribute}})
Expand Down

0 comments on commit 81acff6

Please sign in to comment.