Skip to content

Commit

Permalink
Memory bandwidth sensor fixes
Browse files Browse the repository at this point in the history
CQ:SW445286
Change-Id: Iaf86444442a391e218256a22883d6b248c410e9a
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66149
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Tested-by: William A. Bryan <wilbryan@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
  • Loading branch information
wilbryan committed Sep 20, 2018
1 parent 8344884 commit 1de1be8
Show file tree
Hide file tree
Showing 6 changed files with 205 additions and 85 deletions.
28 changes: 25 additions & 3 deletions src/occ_405/amec/amec_amester.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -276,7 +276,18 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt
break;
}

*((uint32_t *)o_resp) = l_sensorInfo.sensor.scalefactor;
if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) &&
( ((i_sensor >= MRDM0) &&
(i_sensor <= MRDM7)) ||
((i_sensor >= MWRM0) &&
(i_sensor <= MWRM7)) ) )
{
*((uint32_t *)o_resp) = AMEFP(64, -5);
}
else
{
*((uint32_t *)o_resp) = l_sensorInfo.sensor.scalefactor;
}
*io_resp_length = l_length;
break;
}
Expand Down Expand Up @@ -308,7 +319,18 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt
*((uint32_t *)dest) = l_sensorInfo.sensor.freq;
dest+= 4;

*((uint32_t *)dest) = l_sensorInfo.sensor.scalefactor;
if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) &&
( ((i_sensor >= MRDM0) &&
(i_sensor <= MRDM7)) ||
((i_sensor >= MWRM0) &&
(i_sensor <= MWRM7)) ) )
{
*((uint32_t *)dest) = AMEFP(64, -5);
}
else
{
*((uint32_t *)dest) = l_sensorInfo.sensor.scalefactor;
}
dest+= 4;

*io_resp_length = (uint8_t) ((uint32_t)dest - (uint32_t)o_resp);
Expand Down

0 comments on commit 1de1be8

Please sign in to comment.