Add root nodes from Chip Data File to IsolationChip
Change-Id: I3e49e784517ce2deca201955aa10d0a3d3fc0dfb
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/src/chip_data/hei_chip_data.cpp b/src/chip_data/hei_chip_data.cpp
index 32a24f4..8b73696 100644
--- a/src/chip_data/hei_chip_data.cpp
+++ b/src/chip_data/hei_chip_data.cpp
@@ -362,10 +362,14 @@
void __readRoot(ChipDataStream& io_stream, IsolationChip::Ptr& io_isoChip)
{
+ // Read the root node metadata.
AttentionType_t attnType;
NodeId_t id;
Instance_t inst;
io_stream >> attnType >> id >> inst;
+
+ // Add the root node.
+ io_isoChip->addRootNode(attnType, io_isoChip->getIsolationNode({id, inst}));
}
//------------------------------------------------------------------------------
diff --git a/src/isolator/hei_isolation_node.cpp b/src/isolator/hei_isolation_node.cpp
index c49b277..89b653b 100644
--- a/src/isolator/hei_isolation_node.cpp
+++ b/src/isolator/hei_isolation_node.cpp
@@ -136,19 +136,19 @@
//------------------------------------------------------------------------------
-std::vector<IsolationNode::ConstPtr> IsolationNode::cv_isolationStack{};
+std::vector<const IsolationNode*> IsolationNode::cv_isolationStack{};
//------------------------------------------------------------------------------
void IsolationNode::pushIsolationStack() const
{
// Ensure this node does not already exist in cv_isolationStack.
- auto itr = std::find(cv_isolationStack.begin(), cv_isolationStack.end(),
- ConstPtr(this));
+ auto itr =
+ std::find(cv_isolationStack.begin(), cv_isolationStack.end(), this);
HEI_ASSERT(cv_isolationStack.end() == itr);
// Push to node to the stack.
- cv_isolationStack.push_back(ConstPtr(this));
+ cv_isolationStack.push_back(this);
}
//------------------------------------------------------------------------------
diff --git a/src/isolator/hei_isolation_node.hpp b/src/isolator/hei_isolation_node.hpp
index 33df441..053cd1c 100644
--- a/src/isolator/hei_isolation_node.hpp
+++ b/src/isolator/hei_isolation_node.hpp
@@ -196,7 +196,7 @@
* this node can be popped off the top of the stack. Once all the recursive
* calls have returned back to the root node the stack should be empty.
*/
- static std::vector<ConstPtr> cv_isolationStack;
+ static std::vector<const IsolationNode*> cv_isolationStack;
/**
* @brief Pushes this node to the top of the stack. Will assert that this