summaryrefslogtreecommitdiffstats
path: root/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch
diff options
context:
space:
mode:
Diffstat (limited to 'openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch')
-rw-r--r--openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch
new file mode 100644
index 00000000..02f6c291
--- /dev/null
+++ b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch
@@ -0,0 +1,95 @@
+From 4310ba2a3b6e6439b0938e10435e435cef1d5738 Mon Sep 17 00:00:00 2001
+From: Artem Senichev <a.senichev@yadro.com>
+Date: Thu, 29 Mar 2018 11:19:14 +0300
+Subject: [PATCH] Add present bits info based on pos
+
+Originally created by MSI (S188)
+
+Signed-off-by: Artem Senichev <a.senichev@yadro.com>
+---
+ src/usr/hwas/hostbootIstep.C | 50 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
+
+diff --git a/src/usr/hwas/hostbootIstep.C b/src/usr/hwas/hostbootIstep.C
+index af3770295..1330a7e65 100644
+--- a/src/usr/hwas/hostbootIstep.C
++++ b/src/usr/hwas/hostbootIstep.C
+@@ -188,6 +188,11 @@ void* host_discover_targets( void *io_pArgs )
+
+ // Put out some helpful messages that show which targets we actually found
+ std::map<TARGETING::TYPE,uint64_t> l_presData;
++ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P0; //for dimms on CPU P0
++ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P1; //for dimms on CPU P1
++ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P2; //for dimms on CPU P2
++ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P3; //for dimms on CPU P3
++
+ for (TargetIterator target = targetService().begin();
+ target != targetService().end();
+ ++target)
+@@ -198,11 +203,49 @@ void* host_discover_targets( void *io_pArgs )
+ }
+ TARGETING::TYPE l_type = target->getAttr<TARGETING::ATTR_TYPE>();
+ TARGETING::ATTR_POSITION_type l_pos = 0;
++ TARGETING::ATTR_HUID_type l_huid = target->getAttr<TARGETING::ATTR_HUID>(); //for showing HUID
++
+ if( target->tryGetAttr<TARGETING::ATTR_POSITION>(l_pos) )
+ {
+ l_presData[l_type] |= (0x8000000000000000 >> l_pos);
++
++ if (l_type == TARGETING::TYPE_DIMM)
++ {
++ if (l_pos < 64)
++ {
++ //for dimms on CPU P0
++ Present_Dimm_P0[l_type] |= (0x8000000000000000 >> l_pos);
++ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P0[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P0[l_type] >> 32, Present_Dimm_P0[l_type] & 0xFFFFFFFF);
++ }
++ else if ((l_pos >= 64) && (l_pos < 128))
++ {
++ //for dimms on CPU P1
++ Present_Dimm_P1[l_type] |= (0x8000000000000000 >> (l_pos - 64));
++ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P1[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P1[l_type] >> 32, Present_Dimm_P1[l_type] & 0xFFFFFFFF);
++ }
++ else if ((l_pos >= 128) && (l_pos < 192))
++ {
++ //for dimms on CPU P2
++ Present_Dimm_P2[l_type] |= (0x8000000000000000 >> (l_pos - 128));
++ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P2[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P2[l_type] >> 32, Present_Dimm_P2[l_type] & 0xFFFFFFFF);
++ }
++ else if (l_pos >= 192)
++ {
++ //for dimms on CPU P3
++ Present_Dimm_P3[l_type] |= (0x8000000000000000 >> (l_pos - 192));
++ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P3[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P3[l_type] >> 32, Present_Dimm_P3[l_type] & 0xFFFFFFFF);
++ }
++ }
+ }
+ }
++
++ CONSOLE::displayf("HWAS", "=========================================");
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P0=%.8X%.8X", Present_Dimm_P0[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P0[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P1=%.8X%.8X", Present_Dimm_P1[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P1[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P2=%.8X%.8X", Present_Dimm_P2[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P2[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P3=%.8X%.8X", Present_Dimm_P3[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P3[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "=========================================");
++
+ TARGETING::EntityPath l_epath; //use EntityPath's translation functions
+ for( std::map<TARGETING::TYPE,uint64_t>::iterator itr = l_presData.begin();
+ itr != l_presData.end();
+@@ -210,6 +253,13 @@ void* host_discover_targets( void *io_pArgs )
+ {
+ uint8_t l_type = itr->first;
+ uint64_t l_val = itr->second;
++
++ if (l_type == TARGETING::TYPE_DIMM)
++ {
++ //to skip DIMM type
++ continue;
++ }
++
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"PRESENT> %s[%.2X]=%.8X%.8X",
+ l_epath.pathElementTypeAsString(itr->first), l_type, l_val>>32, l_val&0xFFFFFFFF);
+ #if (!defined(CONFIG_CONSOLE_OUTPUT_TRACE) && defined(CONFIG_CONSOLE))
+--
+2.14.1
+
OpenPOWER on IntegriCloud