summaryrefslogtreecommitdiffstats
path: root/openpower/patches
diff options
context:
space:
mode:
authorArtem Senichev <a.senichev@yadro.com>2018-03-29 13:40:54 +0300
committerArtem Senichev <a.senichev@yadro.com>2018-03-29 13:40:54 +0300
commit1bf5175273f3be31afb282d6acaf1071aa5f1111 (patch)
tree9e12d92a51fdbf5d788b70da5e87936b6f030bd5 /openpower/patches
parent67355a80287dc40fe9ad96c396196ca451d6b11e (diff)
downloadblackbird-op-build-1bf5175273f3be31afb282d6acaf1071aa5f1111.tar.gz
blackbird-op-build-1bf5175273f3be31afb282d6acaf1071aa5f1111.zip
Replace magic number with literal constant
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
Diffstat (limited to 'openpower/patches')
-rw-r--r--openpower/patches/vesnin-patches/hostboot/hostboot-0003-Add-present-bits-info-based-on-pos.patch40
1 files changed, 19 insertions, 21 deletions
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
index 02decc4a..02f6c291 100644
--- 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
@@ -1,20 +1,20 @@
-From e89b453239c0b087e5f61aefa59d29a1ae636e08 Mon Sep 17 00:00:00 2001
+From 4310ba2a3b6e6439b0938e10435e435cef1d5738 Mon Sep 17 00:00:00 2001
From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 15:14:49 +0300
+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 | 52 ++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 52 insertions(+)
+ 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..2dc73f383 100644
+index af3770295..1330a7e65 100644
--- a/src/usr/hwas/hostbootIstep.C
+++ b/src/usr/hwas/hostbootIstep.C
-@@ -188,6 +188,12 @@ void* host_discover_targets( void *io_pArgs )
+@@ -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;
@@ -22,12 +22,11 @@ index af3770295..2dc73f383 100644
+ 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 )
+@@ -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;
@@ -37,53 +36,52 @@ index af3770295..2dc73f383 100644
{
l_presData[l_type] |= (0x8000000000000000 >> l_pos);
+
-+ if (l_type == 0x03 ) //if the type is DIMM
++ if (l_type == TARGETING::TYPE_DIMM)
+ {
-+ l_type_dimm = l_type;
-+ if (l_pos < 64 )
++ 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);
++ 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);
++ 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);
++ 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(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", "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 +255,13 @@ void* host_discover_targets( void *io_pArgs )
+@@ -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 == 0x03)
++ if (l_type == TARGETING::TYPE_DIMM)
+ {
+ //to skip DIMM type
+ continue;
OpenPOWER on IntegriCloud