summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/runtime/runtime.H10
-rw-r--r--src/usr/runtime/hdatservice.C35
-rw-r--r--src/usr/runtime/hdatservice.H10
-rw-r--r--src/usr/runtime/populate_attributes.C6
4 files changed, 51 insertions, 10 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H
index 433f82169..73633cb00 100644
--- a/src/include/usr/runtime/runtime.H
+++ b/src/include/usr/runtime/runtime.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2015 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -135,6 +137,12 @@ void add_host_data_ffdc( SectionId i_section,
*/
void setPayloadBaseAddress(uint64_t i_payloadAddress);
+/*
+ * @brief Clear out any cached data and rediscover the location
+ * of the HDAT memory
+ */
+void rediscover_hdat( void );
+
}
#endif
diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C
index fd79e222f..0084a54fe 100644
--- a/src/usr/runtime/hdatservice.C
+++ b/src/usr/runtime/hdatservice.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -337,13 +337,7 @@ hdatService::hdatService(void)
hdatService::~hdatService(void)
{
- for(memRegionItr region = iv_mem_regions.begin();
- (region != iv_mem_regions.end()); ++region)
- {
- mm_block_unmap((*region).virt_addr);
- }
-
- iv_mem_regions.clear();
+ rediscoverHDAT();
}
errlHndl_t hdatService::mapRegion(uint64_t i_addr, size_t i_bytes,
@@ -1442,6 +1436,26 @@ void hdatService::addFFDC( SectionId i_section,
}
}
+/*
+ * @brief Clear out any cached data and rediscover the location
+ * of the HDAT memory
+ */
+void hdatService::rediscoverHDAT( void )
+{
+ // Clear out the pointers we cached
+ iv_spiraS = NULL;
+ iv_spiraL = NULL;
+ iv_spiraH = NULL;
+
+ // Clear out our cache of memory regions
+ for(memRegionItr region = iv_mem_regions.begin();
+ (region != iv_mem_regions.end()); ++region)
+ {
+ mm_block_unmap((*region).virt_addr);
+ }
+ iv_mem_regions.clear();
+}
+
/********************
Public Methods
********************/
@@ -1489,6 +1503,11 @@ void add_host_data_ffdc( SectionId i_section,
return Singleton<hdatService>::instance().addFFDC(i_section,io_errlog);
}
+void rediscover_hdat( void )
+{
+ Singleton<hdatService>::instance().rediscoverHDAT();
+}
+
};
/********************
diff --git a/src/usr/runtime/hdatservice.H b/src/usr/runtime/hdatservice.H
index a3e26c24d..a8de9402d 100644
--- a/src/usr/runtime/hdatservice.H
+++ b/src/usr/runtime/hdatservice.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -119,6 +121,12 @@ namespace RUNTIME
void addFFDC( SectionId i_section,
errlHndl_t& io_errlog );
+ /*
+ * @brief Clear out any cached data and rediscover the location
+ * of the HDAT memory
+ */
+ void rediscoverHDAT( void );
+
protected:
/**
* @brief Constructor
diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C
index 6a6024219..820dfc62a 100644
--- a/src/usr/runtime/populate_attributes.C
+++ b/src/usr/runtime/populate_attributes.C
@@ -245,6 +245,9 @@ errlHndl_t populate_system_attributes( uint64_t i_nodes )
do {
TRACDCOMP( g_trac_runtime, "-SYSTEM-" );
+ // Wipe out our cache of the NACA/SPIRA pointers
+ RUNTIME::rediscover_hdat();
+
// find our memory range and fill it with some junk data
uint64_t sys_data_addr = 0;
uint64_t sys_data_size = 0;
@@ -415,6 +418,9 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum )
TRACDCOMP( g_trac_runtime, "-NODE-" );
TRACFCOMP( g_trac_runtime, "populate_node_attributes(node=%d)", i_nodeNum );
+ // Wipe out our cache of the NACA/SPIRA pointers
+ RUNTIME::rediscover_hdat();
+
// allocate memory and fill it with some junk data
uint64_t node_data_addr = 0;
size_t node_data_size = 0;
OpenPOWER on IntegriCloud