Add register cache support in HardwareRegister class

Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Ic671a099fdcd98d1f0158289ef321b968f1908ca
diff --git a/src/isolator/hei_isolator.cpp b/src/isolator/hei_isolator.cpp
index 1ff52a4..aea45df 100644
--- a/src/isolator/hei_isolator.cpp
+++ b/src/isolator/hei_isolator.cpp
@@ -20,6 +20,10 @@
 
 void Isolator::uninitialize()
 {
+    // Must flush the hardware register cache before deleting any
+    // HardwareRegister objects.
+    HardwareRegister::flushAll();
+
     // BEGIN temporary code
     HEI_INF( "Isolator::uninitialize()" );
     // END temporary code
@@ -33,6 +37,9 @@
     // Flush the isolation data to ensure a clean slate.
     o_isoData.clear();
 
+    // Flush the hardware register cache to avoid using stale data.
+    HardwareRegister::flushAll();
+
     // Analyze active error on each chip.
     for ( auto const & chip : i_chipList )
     {