diff options
author | Venkatesh Sainath <vsainath@in.ibm.com> | 2017-09-24 00:19:00 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-11-02 11:58:48 -0400 |
commit | 5099a01fc800c06fedb85778848f461967796ec9 (patch) | |
tree | b87d0d1b6cbd85360164b10c3b5d776e17c1c719 | |
parent | 2c84b69258b222a68bf1a6c3d32225e42d686828 (diff) | |
download | talos-hostboot-5099a01fc800c06fedb85778848f461967796ec9.tar.gz talos-hostboot-5099a01fc800c06fedb85778848f461967796ec9.zip |
Enabling multi proc master systems
Change-Id: If99c9ce86969a115af21b285b68c96b8fa92a881
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46664
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
-rw-r--r-- | src/usr/targeting/common/Targets.pm | 36 | ||||
-rwxr-xr-x | src/usr/targeting/common/processMrw.pl | 36 |
2 files changed, 34 insertions, 38 deletions
diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm index 5561f3940..34c1eb0cc 100644 --- a/src/usr/targeting/common/Targets.pm +++ b/src/usr/targeting/common/Targets.pm @@ -92,7 +92,6 @@ sub new enumerations => undef, MAX_MCS => 0, UNIT_COUNTS => undef, - master_proc => undef, huid_idx => undef, mru_idx => undef, force => 0, @@ -761,6 +760,22 @@ sub buildAffinity NUM_PROCS_PER_GROUP + $self->getAttribute($socket,"FABRIC_CHIP_ID")); + # Both for FSP and BMC based systems, it's good enough + # to look for processor with active LPC bus connected + $self->log($target,"Finding master proc (looking for LPC Bus)"); + my $lpcs=$self->findConnections($target,"LPC",""); + if ($lpcs ne "") + { + $self->log ($target, "Setting $target as ACTING_MASTER"); + $self->setAttribute($target, "PROC_MASTER_TYPE", + "ACTING_MASTER"); + } + else + { + $self->setAttribute($target, "PROC_MASTER_TYPE", + "NOT_MASTER"); + } + $self->iterateOverChiplets($target, $sys_pos, $node, $proc); $self->processMc($target, $sys_pos, $node, $proc, $parent_affinity, @@ -1323,8 +1338,12 @@ sub processMc my $proc_path = $self->getAttribute($proc_key,"PHYS_PATH"); $self->setFsiAttributes($membuf,"FSICM",0,$proc_path,$fsi_port,0); $self->setAttribute($dmi, "DMI_REFCLOCK_SWIZZLE",$fsi_port); - my $dmi_swizzle = + my $dmi_swizzle = ""; + if( $self->isBusAttributeDefined($dmi,0,"DMI_REFCLOCK_SWIZZLE")) + { + $dmi_swizzle = $self->getBusAttribute($dmi,0,"DMI_REFCLOCK_SWIZZLE"); + } if ($dmi_swizzle ne "") { $self->setAttribute($dmi, "DMI_REFCLOCK_SWIZZLE",$dmi_swizzle); @@ -2227,19 +2246,6 @@ sub setMruid $self->{mru_idx}->{$node}->{$type}++; } -sub getMasterProc -{ - my $self = shift; - return $self->{master_proc}; -} - -sub setMasterProc -{ - my $self = shift; - my $target = shift; - $self->{master_proc}=$target; -} - sub getSystemName { my $self = shift; diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index af34703ed..24cba10e5 100755 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -328,12 +328,6 @@ foreach my $n (keys %{$targetObj->{TOPOLOGY}}) { } } ## check for errors -if ($targetObj->getMasterProc() eq "") -{ - print "ERROR: Master Processor not defined. Please instaitant a BMC - and connect LPC bus\n"; - $targetObj->myExit(3); -} foreach my $target (keys %{ $targetObj->getAllTargets() }) { errorCheck($targetObj, $target); @@ -741,15 +735,6 @@ sub processProcessor } } - # Both for FSP and BMC based systems, it's good enough - # to look for processor with active LPC bus connected - $targetObj->log($target,"Finding master proc (looking for LPC Bus)"); - my $lpcs=$targetObj->findConnections($target,"LPC",""); - if ($lpcs ne "") - { - $targetObj->log ($target, "Setting master proc to $target"); - $targetObj->setMasterProc($target); - } # I2C arrays my @engine = (); @@ -916,7 +901,9 @@ sub processProcessor ## initialize master processor FSI's $targetObj->setAttributeField($target, "FSI_OPTION_FLAGS", "flipPort", "0"); - if ($target eq $targetObj->getMasterProc()) + my $proc_type = $targetObj->getAttribute($target, "PROC_MASTER_TYPE"); + + if ($proc_type eq "ACTING_MASTER" ) { $targetObj->setAttributeField($target, "FSI_OPTION_FLAGS", "reserved", "0"); @@ -926,7 +913,6 @@ sub processProcessor $targetObj->setAttribute($target, "ALTFSI_MASTER_PORT", "0xFF"); $targetObj->setAttribute($target, "FSI_MASTER_TYPE", "NO_MASTER"); $targetObj->setAttribute($target, "FSI_SLAVE_CASCADE", "0"); - $targetObj->setAttribute($target, "PROC_MASTER_TYPE", "ACTING_MASTER"); $targetObj->setAttributeField($target, "SCOM_SWITCHES", "useSbeScom", "1"); $targetObj->setAttributeField($target, "SCOM_SWITCHES", "useFsiScom", @@ -934,8 +920,6 @@ sub processProcessor } else { - $targetObj->setAttribute($target, "PROC_MASTER_TYPE", - "NOT_MASTER"); $targetObj->setAttribute($target, "ALTFSI_MASTER_CHIP", "physical:sys-0"); $targetObj->setAttributeField($target, "SCOM_SWITCHES", "useSbeScom", "0"); @@ -1716,7 +1700,10 @@ sub processOcc my $target = shift; my $parentTarget = shift; my $master_capable=0; - if ($parentTarget eq $targetObj->getMasterProc()) + + my $proc_type = $targetObj->getAttribute($parentTarget, "PROC_MASTER_TYPE"); + + if ($proc_type eq "ACTING_MASTER" ) { $master_capable=1; } @@ -2326,13 +2313,16 @@ sub errorCheck ## this checks if at least 1 abus is connected my $found_abus = 0; my $abus_error = ""; + foreach my $child (@{ $targetObj->getTargetChildren($target) }) { my $child_type = $targetObj->getBusType($child); if ($child_type eq "ABUS" || $child_type eq "XBUS") { - if ($targetObj->getMasterProc() ne $target) - { + my $proc_type = $targetObj->getAttribute($target, "PROC_MASTER_TYPE"); + + if ($proc_type eq "NOT_MASTER" ) + { if (!$targetObj->isBadAttribute($child, "PEER_TARGET")) { $found_abus = 1; @@ -2342,7 +2332,7 @@ sub errorCheck $abus_error = sprintf( "proc not connected to proc via Abus or Xbus (Target=%s)",$child); } - } + } } } if ($found_abus) |