summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2019-05-30 13:15:52 -0500
committerChristopher J. Cain <cjcain@us.ibm.com>2019-06-10 13:55:02 -0500
commit6ce9a5d0fefe6e2ca50f33cbdf32c7a7301b2e7a (patch)
treed407d9f12842e7a3c44f29726099e901dd19d776
parentaa38078b2e09f13532f129951457adfb5e803eb3 (diff)
downloadtalos-occ-6ce9a5d0fefe6e2ca50f33cbdf32c7a7301b2e7a.tar.gz
talos-occ-6ce9a5d0fefe6e2ca50f33cbdf32c7a7301b2e7a.zip
Allow maximum number of sensors to be returned in debug command
Change-Id: Id389f6ab4815cc96b0a528b64cb219b6215d65bc RTC: 209325 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78081 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_dbug_cmd.c5
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_dbug_cmd.h6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/occ_405/cmdh/cmdh_dbug_cmd.c b/src/occ_405/cmdh/cmdh_dbug_cmd.c
index d613c18..fffd9a1 100755
--- a/src/occ_405/cmdh/cmdh_dbug_cmd.c
+++ b/src/occ_405/cmdh/cmdh_dbug_cmd.c
@@ -249,9 +249,8 @@ void cmdh_dbug_get_ame_sensor (const cmdh_fsp_cmd_t * i_cmd_ptr,
}while(0);
- // Populate the response data header
- l_resp_data_length = sizeof(cmdh_dbug_get_sensor_resp_t) -
- CMDH_DBUG_FSP_RESP_LEN;
+ // Populate the response data header (with actual number of sensors collected)
+ l_resp_data_length = sizeof(l_num_of_sensors) + (l_num_of_sensors * sizeof(cmdh_dbug_sensor_list_t));
G_rsp_status = l_rc;
o_rsp_ptr->data_length[0] = ((uint8_t *)&l_resp_data_length)[0];
o_rsp_ptr->data_length[1] = ((uint8_t *)&l_resp_data_length)[1];
diff --git a/src/occ_405/cmdh/cmdh_dbug_cmd.h b/src/occ_405/cmdh/cmdh_dbug_cmd.h
index 16ab04b..281e6a3 100755
--- a/src/occ_405/cmdh/cmdh_dbug_cmd.h
+++ b/src/occ_405/cmdh/cmdh_dbug_cmd.h
@@ -128,9 +128,9 @@ typedef struct __attribute__ ((packed))
uint16_t location;
}cmdh_dbug_get_sensor_query_t;
-// Max number of sensors that can be returned with cmdh_dbug_get_ame_sensor command
+// Max number of sensors that can be returned with cmdh_dbug_get_ame_sensor command (subtract 2 bytes for num_sensors)
+#define CMDH_DBUG_MAX_NUM_SENSORS ((CMDH_FSP_RSP_DATA_SIZE-2) / sizeof(cmdh_dbug_sensor_list_t))
-#define CMDH_DBUG_MAX_NUM_SENSORS 50
// Size of standard response header (5 bytes) plus checksum (2 bytes)
#define CMDH_DBUG_FSP_RESP_LEN 7
@@ -140,8 +140,6 @@ typedef struct __attribute__ ((packed))
struct cmdh_fsp_rsp_header;
uint16_t num_sensors;
cmdh_dbug_sensor_list_t sensor[CMDH_DBUG_MAX_NUM_SENSORS];
- uint8_t filler;
- uint16_t checksum;
}cmdh_dbug_get_sensor_resp_t;
/**
OpenPOWER on IntegriCloud