summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/fapi2/test/fapi2GetChildrenTest.H19
-rw-r--r--src/usr/fapi2/test/fapi2TestUtils.H5
-rw-r--r--src/usr/targeting/common/utilFilter.C23
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml14
-rw-r--r--src/usr/targeting/common/xmltohb/simics_AXONE.system.xml64
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml3
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/xmltohb.pl59
7 files changed, 182 insertions, 5 deletions
diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H
index 6dbe88e86..04f3863ba 100644
--- a/src/usr/fapi2/test/fapi2GetChildrenTest.H
+++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H
@@ -233,6 +233,25 @@ void test_fapi2GetChildren()
}
}
+ if (isHwValid(l_proc, MY_OMIC)
+ && isHwValid(l_proc, MY_OMI))
+ {
+ l_childOMIs = fapi2_omicTarget.getChildren<fapi2::TARGET_TYPE_OMI>(TARGET_STATE_PRESENT);
+ l_targetHuid = TARGETING::get_huid(targeting_targets[MY_OMIC]);
+ l_actualSize = l_childOMIs.size();
+
+ //Set expected size to be the number of OMIs per proc
+ l_expectedSize = MAX_OMI_PER_OMIC;
+ numTests++;
+ if(l_actualSize != l_expectedSize)
+ {
+ FAPI_INF("fapi2TargetTest:: # OMIs foound for OMIC0 proc is %d and not %d",
+ l_actualSize, l_expectedSize);
+ numFails++;
+ break;
+ }
+ }
+
if (isHwValid(l_proc, MY_OMI)
&& isHwValid(l_proc, MY_OCMB))
{
diff --git a/src/usr/fapi2/test/fapi2TestUtils.H b/src/usr/fapi2/test/fapi2TestUtils.H
index 2d51330c2..cb88a1d6e 100644
--- a/src/usr/fapi2/test/fapi2TestUtils.H
+++ b/src/usr/fapi2/test/fapi2TestUtils.H
@@ -53,6 +53,11 @@
#define OCMB_PER_OMI 1
#define MEM_PORT_PER_OCMB 1
+// Note that OMIC can either have 2 or 3 child OMI
+// targets. There are 3 OMIC targets per MC, OMIC0
+// and OMIC1 have 3 children, OMIC2 has 2 children
+#define MAX_OMI_PER_OMIC 3
+
#define SIMULATED_GOOD_CORES 4
// non-core and non-cache chiplet ids
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index 3675dfb04..7f2c02074 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -400,6 +400,18 @@ void getPervasiveChildTargetsByState(
TargetService::PERVASIVE_CHILD);
}
+void getChildOmiTargetsByState(
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state )
+
+{
+ getAffinityTargets(o_vector, i_target, i_class, i_type, i_state,
+ TargetService::OMI_CHILD);
+}
+
void getParentAffinityTargetsByState(
TARGETING::TargetHandleList& o_vector,
const Target* i_target,
@@ -423,6 +435,17 @@ void getParentPervasiveTargetsByState(
TargetService::PARENT_PERVASIVE);
}
+void getParentOmicTargetsByState(
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state )
+{
+ getAffinityTargets(o_vector, i_target, i_class, i_type, i_state,
+ TargetService::OMIC_PARENT);
+}
+
const Target * getParentChip( const Target * i_pChiplet )
{
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index b42bf793e..18e7b7588 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -5071,6 +5071,20 @@
</attribute>
<attribute>
+ <description>
+ Physical entity path an OMI's associated OMIC parent target
+ </description>
+ <id>OMIC_PARENT</id>
+ <nativeType>
+ <name>EntityPath</name>
+ </nativeType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <virtual/>
+ <no_export/>
+ </attribute>
+
+ <attribute>
<description>Ordinal ID of a target</description>
<id>ORDINAL_ID</id>
<persistency>non-volatile</persistency>
diff --git a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
index 6fdd560e5..e90a616e7 100644
--- a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
+++ b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
@@ -7345,6 +7345,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0/omi-0</default>
</attribute>
@@ -7407,6 +7411,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0/omi-1</default>
</attribute>
@@ -7469,6 +7477,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-1/omi-0</default>
</attribute>
@@ -7531,6 +7543,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-1/omi-1</default>
</attribute>
@@ -7597,6 +7613,10 @@
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-0/omi-0</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-0</default>
+ </attribute>
+ <attribute>
<id>PRIMARY_CAPABILITIES</id>
<default>
<field><id>reserved</id><value>0</value></field>
@@ -7655,6 +7675,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-0/omi-1</default>
</attribute>
@@ -7717,6 +7741,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-1/omi-0</default>
</attribute>
@@ -7779,6 +7807,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-1/omi-1</default>
</attribute>
@@ -7841,6 +7873,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-0/omi-0</default>
</attribute>
@@ -7903,6 +7939,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-0/omi-1</default>
</attribute>
@@ -7965,6 +8005,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-1/omi-0</default>
</attribute>
@@ -8027,6 +8071,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-1/omi-11</default>
</attribute>
@@ -8089,6 +8137,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-0/omi-0</default>
</attribute>
@@ -8151,6 +8203,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-0/omi-1</default>
</attribute>
@@ -8213,6 +8269,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-1/omi-0</default>
</attribute>
@@ -8275,6 +8335,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-1/omi-1</default>
</attribute>
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index f1e95b9d4..9e8bc0bf8 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -2515,6 +2515,9 @@
<id>HWAS_STATE_CHANGED_SUBSCRIPTION_MASK</id>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ </attribute>
+ <attribute>
<id>PARENT_PERVASIVE</id>
</attribute>
<attribute>
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl
index a0be4e3e7..1d929a3a9 100755
--- a/src/usr/targeting/common/xmltohb/xmltohb.pl
+++ b/src/usr/targeting/common/xmltohb/xmltohb.pl
@@ -157,11 +157,14 @@ use constant PARENT_BY_AFFINITY => "ParentByAffinity";
use constant CHILD_BY_AFFINITY => "ChildByAffinity";
use constant PERVASIVE_CHILD => "PervasiveChild";
use constant PARENT_PERVASIVE => "ParentPervasive";
+use constant OMIC_PARENT => "OmicParent";
+use constant OMI_CHILD => "OmiChild";
my @associationTypes = ( PARENT_BY_CONTAINMENT,
CHILD_BY_CONTAINMENT, PARENT_BY_AFFINITY, CHILD_BY_AFFINITY,
- PERVASIVE_CHILD, PARENT_PERVASIVE );
+ PERVASIVE_CHILD, PARENT_PERVASIVE, OMIC_PARENT, OMI_CHILD );
# Constants for attribute names (minus ATTR_ prefix)
+use constant ATTR_OMIC_PARENT => "OMIC_PARENT";
use constant ATTR_PARENT_PERVASIVE => "PARENT_PERVASIVE";
use constant ATTR_PHYS_PATH => "PHYS_PATH";
use constant ATTR_AFFINITY_PATH => "AFFINITY_PATH";
@@ -6297,6 +6300,8 @@ sub generateTargetingImage {
my $ptrToChildByAffinityAssociations = INVALID_POINTER;
my $ptrToPervasiveChildAssociations = INVALID_POINTER;
my $ptrToParentPervasiveAssociations = INVALID_POINTER;
+ my $ptrToOmiChildAssociations = INVALID_POINTER;
+ my $ptrToOmicParentAssociations = INVALID_POINTER;
my $id = $targetInstance->{id};
$targetAddrHash{$id}{offsetToPtrToParentByContainmentAssociations} =
@@ -6323,12 +6328,22 @@ sub generateTargetingImage {
$offsetWithinTargets + length $data;
$data .= pack8byte($ptrToParentPervasiveAssociations);
+ $targetAddrHash{$id}{offsetToPtrToOmiChildAssociations} =
+ $offsetWithinTargets + length $data;
+ $data .= pack8byte($ptrToOmiChildAssociations);
+
+ $targetAddrHash{$id}{offsetToPtrToOmicParentAssociations} =
+ $offsetWithinTargets + length $data;
+ $data .= pack8byte($ptrToOmicParentAssociations);
+
$targetAddrHash{$id}{ParentByContainmentAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ChildByContainmentAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ParentByAffinityAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ChildByAffinityAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{PervasiveChildAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ParentPervasiveAssociations} = [@NullPtrArray];
+ $targetAddrHash{$id}{OmiChildAssociations} = [@NullPtrArray];
+ $targetAddrHash{$id}{OmicParentAssociations} = [@NullPtrArray];
if($id =~/^sys\d+$/)
{
@@ -6358,6 +6373,10 @@ sub generateTargetingImage {
. "$targetAddrHash{$id}{offsetToPtrToPervasiveChildAssociations}");
ASSOC_DBG("Offset within targets to ptr to parent pervasive list = "
. "$targetAddrHash{$id}{offsetToPtrToParentPervasiveAssociations}");
+ ASSOC_DBG("Offset within targets to ptr to omi child list = "
+ . "$targetAddrHash{$id}{offsetToPtrToOmiChildAssociations}");
+ ASSOC_DBG("Offset within targets to ptr to omic parent list = "
+ . "$targetAddrHash{$id}{offsetToPtrToOmicParentAssociations}");
$attrAddr += $attributeListTypeHoH{$targetInstance->{type}}{elements}
* (length pack8byte(0));
@@ -6498,7 +6517,8 @@ sub generateTargetingImage {
# path for association processing later on
if( ($attributeId eq ATTR_PHYS_PATH)
|| ($attributeId eq ATTR_AFFINITY_PATH)
- || ($attributeId eq ATTR_PARENT_PERVASIVE))
+ || ($attributeId eq ATTR_PARENT_PERVASIVE)
+ || ($attributeId eq ATTR_OMIC_PARENT))
{
$targetAddrHash{$targetInstance->{id}}{$attributeId} =
$attrhash{$attributeId}->{default};
@@ -6630,9 +6650,10 @@ sub generateTargetingImage {
# Each target is 4 bytes # attributes, 8 bytes pointer
# to attribute list, 8 bytes pointer to attribute pointer
- # list, 6 x 8 byte pointers to association lists, for total
- # of 20 + 48 = 68 bytes per target
- $index *= (20 + 48); # length(N + quad + quad + 6x quad)
+ # list, num associations x 8 byte pointers to association lists
+
+ # length(double + quad + quad + # associations x quad)
+ $index *= (20 + 8 * (scalar @associationTypes));
$attrhash{$attributeId}->{default} = $index + $firstTgtPtr;
}
@@ -6942,6 +6963,7 @@ sub generateTargetingImage {
my $phys_attr = ATTR_PHYS_PATH;
my $affn_attr = ATTR_AFFINITY_PATH;
my $parent_pervasive = ATTR_PARENT_PERVASIVE;
+ my $omic_parent = ATTR_OMIC_PARENT;
my $phys_path = $targetAddrHash{$id}{$phys_attr};
my $parent_phys_path = substr $phys_path, 0, (rindex $phys_path, "/");
@@ -6949,6 +6971,33 @@ sub generateTargetingImage {
my $affn_path = $targetAddrHash{$id}{$affn_attr};
my $parent_affn_path = substr $affn_path, 0, (rindex $affn_path, "/");
+ # If this target has an associated OMIC target, create a
+ # bidirectional relationship between this target and the specified
+ # OMIC target. This target will point to the OMIC target via
+ # a "OMIC_PARENT" association, and the pervasive target will
+ # point to this target via a "OMI_CHILD" association.
+ if(defined $targetAddrHash{$id}{$omic_parent})
+ {
+ my $parent_omic_path =
+ $targetAddrHash{$id}{$omic_parent};
+
+ if(defined $targetPhysicalPath{$parent_omic_path})
+ {
+ my $parent = $targetPhysicalPath{$parent_omic_path};
+ unshift
+ @ { $targetAddrHash{$id}
+ {OmicParentAssociations} },
+ $firstTgtPtr + $targetAddrHash{$parent}
+ {OffsetToTargetWithinTargetList};
+
+ unshift
+ @ { $targetAddrHash{$parent}
+ {OmiChildAssociations} },
+ $firstTgtPtr + $targetAddrHash{$id}
+ {OffsetToTargetWithinTargetList};
+ }
+ }
+
# If this target has an associated pervasive target, create a
# bidirectional relationship between this target and the specified
# pervasive target. This target will point to the pervasive target via
OpenPOWER on IntegriCloud