summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2015-06-29 10:21:09 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-07-02 13:44:33 -0500
commit8ffdfc861b944e1d8768c2b81377bd7e8b5a92a5 (patch)
tree443747e0b6560cec4f34539e1b6b363e0f623fe8 /src
parentb9c8faeb1fab463e3e085b3ec6b6d6c33866191e (diff)
downloadtalos-hostboot-8ffdfc861b944e1d8768c2b81377bd7e8b5a92a5.tar.gz
talos-hostboot-8ffdfc861b944e1d8768c2b81377bd7e8b5a92a5.zip
Rediscover location of HDAT data to handle IO CM operations
PHYP modifies the location of the HDAT memory during a IO CM operation. During a mpipl, during dump collection, HB will cache the location of the SPIRA. This cache will be pointing to the B side. Later in the boot the FSP repopulates the SPIRA using the A side. HB needs to use the A side pointers instead. Change-Id: I991fc731eb6292869e7280d29727ef270a6975a5 CQ: SW311349 Backport: release-fips830 Backport: release-fips820 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18836 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Elizabeth Liner <eliner@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-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