Patch set to for VESNIN server support
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
diff --git a/openpower/patches/vesnin-patches/hostboot/hostboot-0003-Add-present-bits-info-based-on-pos.patch b/openpower/patches/vesnin-patches/hostboot/hostboot-0003-Add-present-bits-info-based-on-pos.patch
new file mode 100644
index 0000000..02decc4
--- /dev/null
+++ b/openpower/patches/vesnin-patches/hostboot/hostboot-0003-Add-present-bits-info-based-on-pos.patch
@@ -0,0 +1,97 @@
+From e89b453239c0b087e5f61aefa59d29a1ae636e08 Mon Sep 17 00:00:00 2001
+From: Artem Senichev <a.senichev@yadro.com>
+Date: Tue, 13 Mar 2018 15:14:49 +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 | 52 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 52 insertions(+)
+
+diff --git a/src/usr/hwas/hostbootIstep.C b/src/usr/hwas/hostbootIstep.C
+index af3770295..2dc73f383 100644
+--- a/src/usr/hwas/hostbootIstep.C
++++ b/src/usr/hwas/hostbootIstep.C
+@@ -188,6 +188,12 @@ 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
++ TARGETING::TYPE l_type_dimm;
++
+ for (TargetIterator target = targetService().begin();
+ target != targetService().end();
+ ++target)
+@@ -198,11 +204,50 @@ 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 == 0x03 ) //if the type is DIMM
++ {
++ l_type_dimm = l_type;
++ 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[03]=%.8X%.8X", Present_Dimm_P0[l_type_dimm] >> 32, Present_Dimm_P0[l_type_dimm] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P1[03]=%.8X%.8X", Present_Dimm_P1[l_type_dimm] >> 32, Present_Dimm_P1[l_type_dimm] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P2[03]=%.8X%.8X", Present_Dimm_P2[l_type_dimm] >> 32, Present_Dimm_P2[l_type_dimm] & 0xFFFFFFFF);
++ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P3[03]=%.8X%.8X", Present_Dimm_P3[l_type_dimm] >> 32, Present_Dimm_P3[l_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 +255,13 @@ void* host_discover_targets( void *io_pArgs )
+ {
+ uint8_t l_type = itr->first;
+ uint64_t l_val = itr->second;
++
++ if (l_type == 0x03)
++ {
++ //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
+