diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2015-03-01 12:32:24 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-03-03 02:56:02 -0600 |
commit | fd4a8733684acbc94d3398dca362e7c5dc3b7e71 (patch) | |
tree | 54060f37d585c188800b6afe961aad42c43a0f66 /src/usr/ipmi | |
parent | 5c2d7b99ce220c8e03ccb49095b1dcbcb7c567e4 (diff) | |
download | talos-hostboot-fd4a8733684acbc94d3398dca362e7c5dc3b7e71.tar.gz talos-hostboot-fd4a8733684acbc94d3398dca362e7c5dc3b7e71.zip |
Runtime fixes for IPMI
-initialize trace buffer in IPMI runtime code
-fix buffer mixup
-fix netfn format for opal call
Change-Id: I612431f81d40f1698b585353da9c245adf1447e1
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16082
Tested-by: Jenkins Server
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi')
-rw-r--r-- | src/usr/ipmi/runtime/rt_ipmirp.C | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/usr/ipmi/runtime/rt_ipmirp.C b/src/usr/ipmi/runtime/rt_ipmirp.C index f99723adf..846e0683c 100644 --- a/src/usr/ipmi/runtime/rt_ipmirp.C +++ b/src/usr/ipmi/runtime/rt_ipmirp.C @@ -49,6 +49,8 @@ #include <runtime/interface.h> trace_desc_t * g_trac_ipmi; +TRAC_INIT(&g_trac_ipmi, IPMI_COMP_NAME, 6*KILOBYTE, TRACE::BUFFER_SLOW); + #define IPMI_TRAC(printf_string,args...) \ TRACFCOMP(g_trac_ipmi,"rt: "printf_string,##args) @@ -89,8 +91,9 @@ namespace IPMI // if the buffer is too large this is a programming error. assert(io_len <= max_buffer()); + uint8_t netfn = i_cmd.first >> 2; //remove embedded LUN IPMI_TRAC("calling sync %x:%x len=%d", - i_cmd.first, i_cmd.second, io_len); + netfn, i_cmd.second, io_len); if(g_hostInterfaces && g_hostInterfaces->ipmi_msg) { @@ -98,7 +101,7 @@ namespace IPMI uint8_t *l_data = new uint8_t[l_len]; rc = g_hostInterfaces->ipmi_msg( - i_cmd.first, i_cmd.second, + netfn, i_cmd.second, io_data, io_len, l_data, &l_len); @@ -124,7 +127,7 @@ namespace IPMI IPMI::MOD_IPMIRT, IPMI::RC_INVALID_SENDRECV, TWO_UINT32_TO_UINT64(rc, - TWO_UINT16_TO_UINT32(i_cmd.first, i_cmd.second)), + TWO_UINT16_TO_UINT32(netfn, i_cmd.second)), io_len, true); err->collectTrace(IPMI_COMP_NAME); @@ -135,7 +138,8 @@ namespace IPMI else { // clean up the memory for the caller - o_completion_code = static_cast<IPMI::completion_code>(io_data[0]); + o_completion_code = + static_cast<IPMI::completion_code>(l_data[0]); // now need to create the buffer to return io_len = l_len - 1; // get rid of the completion_code |