blob: 9744e1dffc5cece1c91fd22c81cc168068ce4aae [file] [log] [blame]
Artem Senichev67355a82018-03-16 12:35:51 +03001From 9eea226dc3be928ae297ff2d7284a43f8e43efac Mon Sep 17 00:00:00 2001
2From: Artem Senichev <a.senichev@yadro.com>
3Date: Tue, 13 Mar 2018 15:32:45 +0300
4Subject: [PATCH] Force print MCS grouping info to console
5
6Used to dump interleave mode state.
7
8Signed-off-by: Artem Senichev <a.senichev@yadro.com>
9---
10 .../mc_config/mss_eff_config/mss_eff_grouping.C | 25 +++++++++++++---------
11 1 file changed, 15 insertions(+), 10 deletions(-)
12
13diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
14index 98f76cd0a..fa4c78f72 100644
15--- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
16+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
17@@ -85,6 +85,12 @@
18 #include <mss_eff_grouping.H>
19 #include <cen_scom_addresses.H>
20 #include <mss_error_support.H>
21+#include <console/consoleif.H>
22+
23+#define GRP_TRACE(_fmt_, _args_...) { \
24+ CONSOLE::displayf(NULL, "GROUP-INFO| " _fmt_, ##_args_); \
25+ CONSOLE::flush(); \
26+}
27
28 extern "C"
29 {
30@@ -900,10 +906,10 @@ void grouping_group4McsPerGroup(const EffGroupingMemInfo & i_memInfo,
31 {
32 if (config4_gp[i] && config4_gp[i + 1])
33 {
34- FAPI_INF("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
35+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
36 CFG_4MCS[i][0], CFG_4MCS[i][1],
37 CFG_4MCS[i][2], CFG_4MCS[i][3]);
38- FAPI_INF("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
39+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
40 CFG_4MCS[i + 1][0], CFG_4MCS[i + 1][1],
41 CFG_4MCS[i + 1][2], CFG_4MCS[1 + 1][3]);
42 gp1 = i;
43@@ -919,7 +925,7 @@ void grouping_group4McsPerGroup(const EffGroupingMemInfo & i_memInfo,
44 {
45 if (config4_gp[i])
46 {
47- FAPI_INF("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
48+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
49 CFG_4MCS[i][0], CFG_4MCS[i][1],
50 CFG_4MCS[i][2], CFG_4MCS[i][3]);
51 gp1 = i;
52@@ -1024,7 +1030,7 @@ void grouping_group2McsPerGroup(const EffGroupingMemInfo & i_memInfo,
53 {
54 // These 2 MCSs are not already grouped and have the same amount of
55 // memory
56- FAPI_INF("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
57+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
58 o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
59 o_groupData.iv_data[g][MCS_IN_GROUP] = 2;
60 o_groupData.iv_data[g][GROUP_SIZE] = 2 * i_memInfo.iv_mcsSize[pos];
61@@ -1084,7 +1090,7 @@ void grouping_group2McsPerGroup_oddpair(const EffGroupingMemInfo & i_memInfo,
62 {
63 // These 2 MCSs are not already grouped and have the same amount of
64 // memory
65- FAPI_INF("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
66+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
67 o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
68 o_groupData.iv_data[g][MCS_IN_GROUP] = 2;
69 o_groupData.iv_data[g][GROUP_SIZE] = 2 * i_memInfo.iv_mcsSize[pos];
70@@ -1145,7 +1151,7 @@ void grouping_group2McsPerGroup_usecase(const EffGroupingMemInfo & i_memInfo,
71 {
72 // These 2 MCSs are not already grouped and have the same amount of
73 // memory
74- FAPI_INF("mss_eff_grouping: Grouped MCSs %u and %u", pos, var);
75+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u and %u", pos, var);
76 o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
77 o_groupData.iv_data[g][MCS_IN_GROUP] = 2;
78 o_groupData.iv_data[g][GROUP_SIZE] = 2 * i_memInfo.iv_mcsSize[pos];
79@@ -1199,7 +1205,7 @@ void grouping_group1McsPerGroup(const EffGroupingMemInfo & i_memInfo,
80 (i_memInfo.iv_mcsSize[pos] != 0))
81 {
82 // This MCS is not already grouped and has memory
83- FAPI_INF("mss_eff_grouping: MCS %u grouped", pos);
84+ GRP_TRACE("mss_eff_grouping: MCS %u grouped", pos);
85 o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
86 o_groupData.iv_data[g][MCS_IN_GROUP] = 1;
87 o_groupData.iv_data[g][GROUP_SIZE] = i_memInfo.iv_mcsSize[pos];
88@@ -1564,12 +1570,11 @@ void grouping_traceData(const EffGroupingSysAttrs & i_sysAttrs,
89 {
90 for (uint8_t i = 0; i < i_groupData.iv_numGroups; i++)
91 {
92- FAPI_INF("mss_eff_grouping: Group %u, MCS Size %u GB, "
93+ GRP_TRACE("mss_eff_grouping: Group %u, MCS Size %u GB, "
94 "Num MCSs %u, GroupSize %u GB", i,
95 i_groupData.iv_data[i][MCS_SIZE],
96 i_groupData.iv_data[i][MCS_IN_GROUP],
97 i_groupData.iv_data[i][GROUP_SIZE]);
98-
99 FAPI_INF("mss_eff_grouping: Group %u, Base Add 0x%08x", i,
100 i_groupData.iv_data[i][BASE_ADDR]);
101
102@@ -2248,7 +2253,7 @@ fapi::ReturnCode mss_eff_grouping(const fapi::Target & i_target,
103 std::vector<fapi::Target> &i_associated_centaurs)
104 {
105 fapi::ReturnCode rc;
106- FAPI_INF("mss_eff_grouping: Start, chip %s", i_target.toEcmdString());
107+ GRP_TRACE("mss_eff_grouping: Start, chip %s", i_target.toEcmdString());
108
109 do
110 {
111--
1122.14.1
113