Skip to content

Commit

Permalink
Merging of Serverwiz and hostboot repo Targets.pm
Browse files Browse the repository at this point in the history
file, so to have a common version at start. This
common version is pulled to hostboot repo for use.

Change-Id: I2024fb0a344375ac1d4705a9b9a7b77f2dc774ab
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82062
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@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: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
GiridhariKrishna authored and dcrowell77 committed Sep 25, 2019
1 parent 75aa7d0 commit d507b6f
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion src/usr/targeting/common/Targets.pm
Expand Up @@ -22,6 +22,7 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG

package Targets;

use strict;
Expand Down Expand Up @@ -100,6 +101,7 @@ sub new
targeting => undef,
enumerations => undef,
MAX_MCS => 0,
master_proc => undef,
UNIT_COUNTS => undef,
huid_idx => undef,
mru_idx => undef,
Expand Down Expand Up @@ -559,6 +561,13 @@ sub buildHierarchy
},
$b
);
push(
@{
$self->{data}->{TARGETS}->{$source_target}->{CONNECTION}
->{BUS_PARENT}
},
$key
);
my %bus_entry;
$bus_entry{SOURCE_TARGET} = $source_target;
$bus_entry{DEST_TARGET} = $dest_target;
Expand Down Expand Up @@ -2392,6 +2401,15 @@ sub getConnectionBus
return $target_ptr->{CONNECTION}->{BUS}->[$i];
}

sub getConnectionBusParent
{
my $self = shift;
my $target = shift;
my $i = shift;
my $target_ptr = $self->getTarget($target);
return $target_ptr->{CONNECTION}->{BUS_PARENT}->[$i];
}

sub findFirstEndpoint
{
my $self = shift;
Expand Down Expand Up @@ -3176,6 +3194,19 @@ 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;
Expand Down Expand Up @@ -3408,11 +3439,16 @@ C<TARGET_STRING>. The bus data structure is also a target with attributes.
Returns the target string of the C<INDEX> target found connected to
C<TARGET_STRING>.
=item getConnectionBus(C<TARGET_STRING>)
=item getConnectionBus(C<TARGET_STRING>,C<INDEX>)
Returns the data structure of the C<INDEX> bus target found connected to
C<TARGET_STRING>.
=item getConnectionBusParent(C<TARGET_STRING>,C<INDEX>)
Returns C<PARENT_TARGET_STRING> of the parent target for the bus target found
connected to C<TARGET_STRING>
=item findEndpoint(C<TARGET_STRING>,C<BUS_TYPE>,C<ENDPOINT_MRW_TYPE>)
Searches through all connections to C<TARGET_STRING>
Expand Down

0 comments on commit d507b6f

Please sign in to comment.