Add new check for simultaneous chnl timeouts
Signed-off-by: Caleb Palmer <cnpalmer@us.ibm.com>
Change-Id: I03ede43980d5fd85501582097e0812f5332c9752
diff --git a/analyzer/plugins/p10-plugins.cpp b/analyzer/plugins/p10-plugins.cpp
index 0050991..5f226ab 100644
--- a/analyzer/plugins/p10-plugins.cpp
+++ b/analyzer/plugins/p10-plugins.cpp
@@ -160,6 +160,61 @@
}
}
+/**
+ * @brief Performs channel timeout callouts.
+ */
+void channel_timeout(unsigned int i_instance, const libhei::Chip& i_chip,
+ ServiceData& io_servData)
+{
+ // Get the OMI target for this instance
+ auto procTarget = util::pdbg::getTrgt(i_chip);
+ auto omiTarget =
+ util::pdbg::getChipUnit(procTarget, util::pdbg::TYPE_OMI, i_instance);
+
+ if (nullptr != omiTarget)
+ {
+ // Callout the bus and both endpoints, low priority
+ io_servData.calloutBus(omiTarget, callout::BusType::OMI_BUS,
+ callout::Priority::LOW, false);
+
+ auto sigs = io_servData.getIsolationData().getSignatureList();
+
+ // Check if multiple channel timeout bits (MC_DSTL_FIR[22,23]) are on.
+ const auto dstlfir = libhei::hash<libhei::NodeId_t>("MC_DSTL_FIR");
+
+ // Check for the first channel timeout
+ auto itr = std::find_if(sigs.begin(), sigs.end(), [&](const auto& t) {
+ return (i_chip == t.getChip() && dstlfir == t.getId() &&
+ (22 == t.getBit() || 23 == t.getBit()));
+ });
+ if (sigs.end() != itr)
+ {
+ // Check for a second channel timeout starting from after itr
+ itr = std::find_if(++itr, sigs.end(), [&](const auto& t) {
+ return (i_chip == t.getChip() && dstlfir == t.getId() &&
+ (22 == t.getBit() || 23 == t.getBit()));
+ });
+ }
+
+ // Multiple chnl timeouts found, callout the proc side high priority
+ if (sigs.end() != itr)
+ {
+ io_servData.calloutTarget(omiTarget, callout::Priority::HIGH, true);
+ }
+ // Only one chnl timeout, callout the OCMB side high priority
+ else
+ {
+ io_servData.calloutConnected(omiTarget, callout::BusType::OMI_BUS,
+ callout::Priority::HIGH, true);
+ }
+ }
+ else
+ {
+ trace::err("channel_timeout: Failed to get OMI target %d on %s",
+ i_instance, util::pdbg::getPath(procTarget));
+ }
+}
+
} // namespace P10
PLUGIN_DEFINE_NS(P10_10, P10, pll_unlock);
@@ -174,4 +229,7 @@
PLUGIN_DEFINE_NS(P10_10, P10, callout_attached_dimms);
PLUGIN_DEFINE_NS(P10_20, P10, callout_attached_dimms);
+PLUGIN_DEFINE_NS(P10_10, P10, channel_timeout);
+PLUGIN_DEFINE_NS(P10_20, P10, channel_timeout);
+
} // namespace analyzer
diff --git a/analyzer/ras-data/data/ras-data-p10-10.json b/analyzer/ras-data/data/ras-data-p10-10.json
index 4b652d8..6b42dd9 100644
--- a/analyzer/ras-data/data/ras-data-p10-10.json
+++ b/analyzer/ras-data/data/ras-data-p10-10.json
@@ -720,550 +720,182 @@
"type": "action"
}
],
- "channel_timeout_omi0": [
- {
- "guard": true,
- "name": "omi0",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi0",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi0_th_1": [
{
- "name": "channel_timeout_omi0",
- "type": "action"
+ "instance": 0,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi0_th_32perDay": [
- {
- "name": "channel_timeout_omi0",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi1": [
- {
- "guard": true,
- "name": "omi1",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi1",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
- "channel_timeout_omi10": [
- {
- "guard": true,
- "name": "omi10",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi10",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi10_th_1": [
{
- "name": "channel_timeout_omi10",
- "type": "action"
+ "instance": 10,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi10_th_32perDay": [
- {
- "name": "channel_timeout_omi10",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi11": [
- {
- "guard": true,
- "name": "omi11",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi11",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi11_th_1": [
{
- "name": "channel_timeout_omi11",
- "type": "action"
+ "instance": 11,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi11_th_32perDay": [
- {
- "name": "channel_timeout_omi11",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi12": [
- {
- "guard": true,
- "name": "omi12",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi12",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi12_th_1": [
{
- "name": "channel_timeout_omi12",
- "type": "action"
+ "instance": 12,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi12_th_32perDay": [
- {
- "name": "channel_timeout_omi12",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi13": [
- {
- "guard": true,
- "name": "omi13",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi13",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi13_th_1": [
{
- "name": "channel_timeout_omi13",
- "type": "action"
+ "instance": 13,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi13_th_32perDay": [
- {
- "name": "channel_timeout_omi13",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi14": [
- {
- "guard": true,
- "name": "omi14",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi14",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi14_th_1": [
{
- "name": "channel_timeout_omi14",
- "type": "action"
+ "instance": 14,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi14_th_32perDay": [
- {
- "name": "channel_timeout_omi14",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi15": [
- {
- "guard": true,
- "name": "omi15",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi15",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi15_th_1": [
{
- "name": "channel_timeout_omi15",
- "type": "action"
+ "instance": 15,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi15_th_32perDay": [
- {
- "name": "channel_timeout_omi15",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
"channel_timeout_omi1_th_1": [
{
- "name": "channel_timeout_omi1",
- "type": "action"
+ "instance": 1,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi1_th_32perDay": [
- {
- "name": "channel_timeout_omi1",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi2": [
- {
- "guard": true,
- "name": "omi2",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi2",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi2_th_1": [
{
- "name": "channel_timeout_omi2",
- "type": "action"
+ "instance": 2,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi2_th_32perDay": [
- {
- "name": "channel_timeout_omi2",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi3": [
- {
- "guard": true,
- "name": "omi3",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi3",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi3_th_1": [
{
- "name": "channel_timeout_omi3",
- "type": "action"
+ "instance": 3,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi3_th_32perDay": [
- {
- "name": "channel_timeout_omi3",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi4": [
- {
- "guard": true,
- "name": "omi4",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi4",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi4_th_1": [
{
- "name": "channel_timeout_omi4",
- "type": "action"
+ "instance": 4,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi4_th_32perDay": [
- {
- "name": "channel_timeout_omi4",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi5": [
- {
- "guard": true,
- "name": "omi5",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi5",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi5_th_1": [
{
- "name": "channel_timeout_omi5",
- "type": "action"
+ "instance": 5,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi5_th_32perDay": [
- {
- "name": "channel_timeout_omi5",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi6": [
- {
- "guard": true,
- "name": "omi6",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi6",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi6_th_1": [
{
- "name": "channel_timeout_omi6",
- "type": "action"
+ "instance": 6,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi6_th_32perDay": [
- {
- "name": "channel_timeout_omi6",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi7": [
- {
- "guard": true,
- "name": "omi7",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi7",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi7_th_1": [
{
- "name": "channel_timeout_omi7",
- "type": "action"
+ "instance": 7,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi7_th_32perDay": [
- {
- "name": "channel_timeout_omi7",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi8": [
- {
- "guard": true,
- "name": "omi8",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi8",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi8_th_1": [
{
- "name": "channel_timeout_omi8",
- "type": "action"
+ "instance": 8,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi8_th_32perDay": [
- {
- "name": "channel_timeout_omi8",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi9": [
- {
- "guard": true,
- "name": "omi9",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi9",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi9_th_1": [
{
- "name": "channel_timeout_omi9",
- "type": "action"
+ "instance": 9,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi9_th_32perDay": [
- {
- "name": "channel_timeout_omi9",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
"connected_ocmb0_M": [
{
"guard": true,
diff --git a/analyzer/ras-data/data/ras-data-p10-20.json b/analyzer/ras-data/data/ras-data-p10-20.json
index f95b0cb..425ceb4 100644
--- a/analyzer/ras-data/data/ras-data-p10-20.json
+++ b/analyzer/ras-data/data/ras-data-p10-20.json
@@ -720,550 +720,182 @@
"type": "action"
}
],
- "channel_timeout_omi0": [
- {
- "guard": true,
- "name": "omi0",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi0",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi0_th_1": [
{
- "name": "channel_timeout_omi0",
- "type": "action"
+ "instance": 0,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi0_th_32perDay": [
- {
- "name": "channel_timeout_omi0",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi1": [
- {
- "guard": true,
- "name": "omi1",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi1",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
- "channel_timeout_omi10": [
- {
- "guard": true,
- "name": "omi10",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi10",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi10_th_1": [
{
- "name": "channel_timeout_omi10",
- "type": "action"
+ "instance": 10,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi10_th_32perDay": [
- {
- "name": "channel_timeout_omi10",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi11": [
- {
- "guard": true,
- "name": "omi11",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi11",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi11_th_1": [
{
- "name": "channel_timeout_omi11",
- "type": "action"
+ "instance": 11,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi11_th_32perDay": [
- {
- "name": "channel_timeout_omi11",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi12": [
- {
- "guard": true,
- "name": "omi12",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi12",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi12_th_1": [
{
- "name": "channel_timeout_omi12",
- "type": "action"
+ "instance": 12,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi12_th_32perDay": [
- {
- "name": "channel_timeout_omi12",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi13": [
- {
- "guard": true,
- "name": "omi13",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi13",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi13_th_1": [
{
- "name": "channel_timeout_omi13",
- "type": "action"
+ "instance": 13,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi13_th_32perDay": [
- {
- "name": "channel_timeout_omi13",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi14": [
- {
- "guard": true,
- "name": "omi14",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi14",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi14_th_1": [
{
- "name": "channel_timeout_omi14",
- "type": "action"
+ "instance": 14,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi14_th_32perDay": [
- {
- "name": "channel_timeout_omi14",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi15": [
- {
- "guard": true,
- "name": "omi15",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi15",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi15_th_1": [
{
- "name": "channel_timeout_omi15",
- "type": "action"
+ "instance": 15,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi15_th_32perDay": [
- {
- "name": "channel_timeout_omi15",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
"channel_timeout_omi1_th_1": [
{
- "name": "channel_timeout_omi1",
- "type": "action"
+ "instance": 1,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi1_th_32perDay": [
- {
- "name": "channel_timeout_omi1",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi2": [
- {
- "guard": true,
- "name": "omi2",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi2",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi2_th_1": [
{
- "name": "channel_timeout_omi2",
- "type": "action"
+ "instance": 2,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi2_th_32perDay": [
- {
- "name": "channel_timeout_omi2",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi3": [
- {
- "guard": true,
- "name": "omi3",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi3",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi3_th_1": [
{
- "name": "channel_timeout_omi3",
- "type": "action"
+ "instance": 3,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi3_th_32perDay": [
- {
- "name": "channel_timeout_omi3",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi4": [
- {
- "guard": true,
- "name": "omi4",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi4",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi4_th_1": [
{
- "name": "channel_timeout_omi4",
- "type": "action"
+ "instance": 4,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi4_th_32perDay": [
- {
- "name": "channel_timeout_omi4",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi5": [
- {
- "guard": true,
- "name": "omi5",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi5",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi5_th_1": [
{
- "name": "channel_timeout_omi5",
- "type": "action"
+ "instance": 5,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi5_th_32perDay": [
- {
- "name": "channel_timeout_omi5",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi6": [
- {
- "guard": true,
- "name": "omi6",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi6",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi6_th_1": [
{
- "name": "channel_timeout_omi6",
- "type": "action"
+ "instance": 6,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi6_th_32perDay": [
- {
- "name": "channel_timeout_omi6",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi7": [
- {
- "guard": true,
- "name": "omi7",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi7",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi7_th_1": [
{
- "name": "channel_timeout_omi7",
- "type": "action"
+ "instance": 7,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi7_th_32perDay": [
- {
- "name": "channel_timeout_omi7",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi8": [
- {
- "guard": true,
- "name": "omi8",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi8",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi8_th_1": [
{
- "name": "channel_timeout_omi8",
- "type": "action"
+ "instance": 8,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi8_th_32perDay": [
- {
- "name": "channel_timeout_omi8",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
- "channel_timeout_omi9": [
- {
- "guard": true,
- "name": "omi9",
- "priority": "HIGH",
- "type": "callout_connected"
- },
- {
- "guard": false,
- "name": "omi9",
- "priority": "LOW",
- "type": "callout_bus"
- }
- ],
"channel_timeout_omi9_th_1": [
{
- "name": "channel_timeout_omi9",
- "type": "action"
+ "instance": 9,
+ "name": "channel_timeout",
+ "type": "plugin"
},
{
"name": "th_1",
"type": "action"
}
],
- "channel_timeout_omi9_th_32perDay": [
- {
- "name": "channel_timeout_omi9",
- "type": "action"
- },
- {
- "name": "th_32perDay",
- "type": "action"
- }
- ],
"connected_ocmb0_M": [
{
"guard": true,
diff --git a/test/meson.build b/test/meson.build
index a3c5498..d5d4239 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -74,10 +74,11 @@
'test-root-cause-filter',
'test-tod-step-check-fault',
'test-cli',
+ 'test-chnl-timeout',
]
# allow more time for long running tests
-longtests = {'test-pll-unlock': 2}
+longtests = {'test-pll-unlock': 2, 'test-chnl-timeout': 2}
foreach tc : testcases
diff --git a/test/test-chnl-timeout.cpp b/test/test-chnl-timeout.cpp
new file mode 100644
index 0000000..711d193
--- /dev/null
+++ b/test/test-chnl-timeout.cpp
@@ -0,0 +1,281 @@
+#include <stdio.h>
+
+#include <analyzer/plugins/plugin.hpp>
+#include <analyzer/ras-data/ras-data-parser.hpp>
+#include <hei_util.hpp>
+#include <util/pdbg.hpp>
+#include <util/trace.hpp>
+
+#include "gtest/gtest.h"
+
+using namespace analyzer;
+
+static const auto dstlfirId = static_cast<libhei::NodeId_t>(
+ libhei::hash<libhei::NodeId_t>("MC_DSTL_FIR"));
+
+// Test multiple channel timeouts on at the same time
+TEST(ChnlTimeout, MultipleTimeouts)
+{
+ pdbg_targets_init(nullptr);
+
+ libhei::Chip proc0{util::pdbg::getTrgt("/proc0"), P10_20};
+
+ libhei::Signature sig1{proc0, dstlfirId, 0, 22, libhei::ATTN_TYPE_UNIT_CS};
+ libhei::Signature sig2{proc0, dstlfirId, 0, 23, libhei::ATTN_TYPE_UNIT_CS};
+
+ libhei::IsolationData isoData{};
+ isoData.addSignature(sig1);
+ isoData.addSignature(sig2);
+ ServiceData sd{sig1, AnalysisType::SYSTEM_CHECKSTOP, isoData};
+
+ RasDataParser rasData{};
+ rasData.getResolution(sig1)->resolve(sd);
+
+ nlohmann::json j{};
+ std::string s{};
+
+ // Callout list
+ j = sd.getCalloutList();
+ s = R"([
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "Priority": "H"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0",
+ "Priority": "L"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "P0",
+ "Priority": "L"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+
+ // Callout FFDC
+ j = sd.getCalloutFFDC();
+ s = R"([
+ {
+ "Bus Type": "OMI_BUS",
+ "Callout Type": "Bus Callout",
+ "Guard": false,
+ "Priority": "low",
+ "RX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "TX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0"
+ },
+ {
+ "Callout Type": "Hardware Callout",
+ "Guard": true,
+ "Priority": "high",
+ "Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+}
+
+// Test multiple channel timeouts on different MC_DSTL_FIR instances
+TEST(ChnlTimeout, DifferentInst)
+{
+ pdbg_targets_init(nullptr);
+
+ libhei::Chip proc0{util::pdbg::getTrgt("/proc0"), P10_20};
+
+ libhei::Signature sig1{proc0, dstlfirId, 0, 22, libhei::ATTN_TYPE_UNIT_CS};
+ libhei::Signature sig2{proc0, dstlfirId, 1, 22, libhei::ATTN_TYPE_UNIT_CS};
+
+ libhei::IsolationData isoData{};
+ isoData.addSignature(sig1);
+ isoData.addSignature(sig2);
+ ServiceData sd{sig1, AnalysisType::SYSTEM_CHECKSTOP, isoData};
+
+ RasDataParser rasData{};
+ rasData.getResolution(sig1)->resolve(sd);
+
+ nlohmann::json j{};
+ std::string s{};
+
+ // Callout list
+ j = sd.getCalloutList();
+ s = R"([
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "Priority": "H"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0",
+ "Priority": "L"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "P0",
+ "Priority": "L"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+
+ // Callout FFDC
+ j = sd.getCalloutFFDC();
+ s = R"([
+ {
+ "Bus Type": "OMI_BUS",
+ "Callout Type": "Bus Callout",
+ "Guard": false,
+ "Priority": "low",
+ "RX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "TX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0"
+ },
+ {
+ "Callout Type": "Hardware Callout",
+ "Guard": true,
+ "Priority": "high",
+ "Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+}
+
+// Test multiple channel timeouts on different processors
+TEST(ChnlTimeout, DifferentProc)
+{
+ pdbg_targets_init(nullptr);
+
+ libhei::Chip proc0{util::pdbg::getTrgt("/proc0"), P10_20};
+ libhei::Chip proc1{util::pdbg::getTrgt("/proc1"), P10_20};
+
+ libhei::Signature sig1{proc0, dstlfirId, 0, 22, libhei::ATTN_TYPE_UNIT_CS};
+ libhei::Signature sig2{proc1, dstlfirId, 0, 22, libhei::ATTN_TYPE_UNIT_CS};
+
+ libhei::IsolationData isoData{};
+ isoData.addSignature(sig1);
+ isoData.addSignature(sig2);
+ ServiceData sd{sig1, AnalysisType::SYSTEM_CHECKSTOP, isoData};
+
+ RasDataParser rasData{};
+ rasData.getResolution(sig1)->resolve(sd);
+
+ nlohmann::json j{};
+ std::string s{};
+
+ // Callout list
+ j = sd.getCalloutList();
+ s = R"([
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "Priority": "L"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0",
+ "Priority": "H"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "P0",
+ "Priority": "L"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+
+ // Callout FFDC
+ j = sd.getCalloutFFDC();
+ s = R"([
+ {
+ "Bus Type": "OMI_BUS",
+ "Callout Type": "Bus Callout",
+ "Guard": false,
+ "Priority": "low",
+ "RX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "TX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0"
+ },
+ {
+ "Bus Type": "OMI_BUS",
+ "Callout Type": "Connected Callout",
+ "Guard": true,
+ "Priority": "high",
+ "RX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "TX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+}
+
+// Test a single channel timeout
+TEST(ChnlTimeout, SingleTimeout)
+{
+ pdbg_targets_init(nullptr);
+
+ libhei::Chip proc0{util::pdbg::getTrgt("/proc0"), P10_20};
+
+ libhei::Signature sig1{proc0, dstlfirId, 0, 22, libhei::ATTN_TYPE_UNIT_CS};
+
+ libhei::IsolationData isoData{};
+ isoData.addSignature(sig1);
+ ServiceData sd{sig1, AnalysisType::SYSTEM_CHECKSTOP, isoData};
+
+ RasDataParser rasData{};
+ rasData.getResolution(sig1)->resolve(sd);
+
+ nlohmann::json j{};
+ std::string s{};
+
+ // Callout list
+ j = sd.getCalloutList();
+ s = R"([
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "Priority": "L"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0",
+ "Priority": "H"
+ },
+ {
+ "Deconfigured": false,
+ "Guarded": false,
+ "LocationCode": "P0",
+ "Priority": "L"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+
+ // Callout FFDC
+ j = sd.getCalloutFFDC();
+ s = R"([
+ {
+ "Bus Type": "OMI_BUS",
+ "Callout Type": "Bus Callout",
+ "Guard": false,
+ "Priority": "low",
+ "RX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "TX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0"
+ },
+ {
+ "Bus Type": "OMI_BUS",
+ "Callout Type": "Connected Callout",
+ "Guard": true,
+ "Priority": "high",
+ "RX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0",
+ "TX Target": "/proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0"
+ }
+])";
+ EXPECT_EQ(s, j.dump(4));
+}