Lines Matching +full:sub +full:- +full:modules

14 #Chips that are modeled as modules (card-chip together)
22 sub getInventory
45 sub findItems
49 for my $target (sort keys %{$targetObj->getAllTargets()}) {
53 if (!$targetObj->isBadAttribute($target, "TYPE")) {
54 $type = $targetObj->getAttribute($target, "TYPE");
57 if (!$targetObj->isBadAttribute($target, "RU_TYPE")) {
58 $ruType = $targetObj->getAttribute($target, "RU_TYPE");
73 #is a card-chip instance that plugs into a connector on the
78 #For example, we'll already have .../module-0/proc-0 so we don't
79 #need a separate .../module-0 entry.
80 sub pruneModuleCards
88 if (exists $MODULE_TYPES{$targetObj->getType($item->{TARGET})}) {
89 my $card = $targetObj->getTargetParent($item->{TARGET});
96 for my $i (0 .. (scalar @$inventory) - 1) {
97 if ($c eq $inventory->[$i]{TARGET}) {
110 sub makeOBMCNames
120 #Don't need card segments for non-FRUs
134 renameSegmentWithTargetType("card-motherboard", "motherboard",
140 #We want card1, not card-1
147 #Removes non-FRU cards in the middle of a hierarchy from OBMC_NAME.
148 #For example, .../motherboard/fanriser-0/fan-0 ->
149 # .../motherboard/fan-0 when fanriser-0 isn't a FRU.
150 sub removeNonFRUCardSegments
159 my @segments = split('/', $item->{TARGET});
166 my $class = $targetObj->getAttribute($target, "CLASS");
169 my $ruType = $targetObj->getAttribute($target, "RU_TYPE");
174 my $segment = $targetObj->getInstanceName($target);
175 $item->{OBMC_NAME} =~ s/\b$segment-\d+\b\///;
186 # /motherboard/card-conn-5/card-0 ->
187 # /motherobard/card-5
188 sub removeConnectors
197 my @segments = split('/', $item->{TARGET});
203 my $class = $targetObj->getAttribute($target, "CLASS");
206 my ($segment) = $target =~ /\b(\w+-\d+)$/;
207 my $pos = $targetObj->getAttribute($target, "POSITION");
209 #change /connector-11/card-2/ to /card-11/
210 $item->{OBMC_NAME} =~ s/\b$segment\/(\w+)-\d+/$1-$pos/;
219 #units. For example, cpu0/someunit1/someunit2/core3 ->
221 sub removeIntermediateUnits
227 my $class = $targetObj->getAttribute($item->{TARGET}, "CLASS");
230 my $parent = $targetObj->getTargetParent($item->{TARGET});
234 while ($targetObj->getAttribute($parent, "CLASS") eq "UNIT") {
236 my $name = $targetObj->getInstanceName($parent);
237 $item->{OBMC_NAME} =~ s/$name(-)*(\d+)*\///;
239 $parent = $targetObj->getTargetParent($parent);
250 # motherboard-0/myp9proc-5/core-3
251 # Where target motherboard-0/myp9proc-5 has a type
253 # motherboard-0/cpu-5/core-3
254 sub renameSegmentWithType
263 my @segments = split('/', $item->{TARGET});
270 my $curType = $targetObj->getType($target);
273 my $oldSegment = $targetObj->getInstanceName($target);
274 $item->{OBMC_NAME} =~ s/$oldSegment/$newSegment/;
281 #For example, .../motherboard-0/module-1/proc-0 ->
282 #.../motherboard-0/proc-1.
283 #This needs to be revisited if multi-processor modules
285 sub removeModuleFromPath
290 #Find the names of the chips on the modules
292 if (exists $MODULE_TYPES{$targetObj->getType($item->{TARGET})}) {
293 $chipNames{$targetObj->getInstanceName($item->{TARGET})} = 1;
297 #Now convert module-A/name-B to name-A
298 #Note that the -B isn't always present
302 $item->{OBMC_NAME} =~ s/\w+-(\d+)\/$name(-\d+)*/$name-$1/;
311 sub renameSegmentWithTargetType
317 my @segments = split('/', $item->{TARGET});
324 my $curType = $targetObj->getTargetType($target);
327 my $oldSegment = $targetObj->getInstanceName($target);
328 $item->{OBMC_NAME} =~ s/$oldSegment/$newSegment/;
336 #for multi-chassis systems if they ever show up.
337 sub pointChassisAtMotherboard
343 my $type = $targetObj->getTargetType($item->{TARGET});
344 if ($type eq "card-motherboard") {
345 $newName = $item->{OBMC_NAME};
351 if ($targetObj->getType($item->{TARGET}) eq "NODE") {
353 $item->{OBMC_NAME} = $newName;
364 sub removeInstNumIfOneInstPresent
372 my @segments = split('/', $item->{OBMC_NAME});
374 my ($s, $inst) = $segment =~ /(\w+)-(\d+)/;
392 $item->{OBMC_NAME} =~ s/$segment-\d+/$segment/;
399 #Removes the '-' from between the segment name and instance.
400 sub removeHyphensFromInstanceNum
405 $item->{OBMC_NAME} =~ s/-(\d+)\b/$1/g;
442 card->chip package that would plug into a connector on the motherboard
468 supply that plugs into a motherboard (maybe via a non-fru riser
475 For example, if fan-riser isn't a FRU, it would be
477 /system/chassis/motherboard/fan-riser/fan3.
501 /sys-0/node-0/motherboard-0/proc_socket-0/module-0/p9_proc_m