summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmi/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/ipmi/runtime')
-rw-r--r--src/usr/ipmi/runtime/makefile6
-rw-r--r--src/usr/ipmi/runtime/rt_ipmirp.C24
2 files changed, 22 insertions, 8 deletions
diff --git a/src/usr/ipmi/runtime/makefile b/src/usr/ipmi/runtime/makefile
index 6fa93cc6d..6f49d9ef1 100644
--- a/src/usr/ipmi/runtime/makefile
+++ b/src/usr/ipmi/runtime/makefile
@@ -26,9 +26,9 @@ HOSTBOOT_RUNTIME = 1
ROOTPATH = ../../../..
MODULE = ipmi_rt
-OBJS += ipmidcmi.o
-OBJS += ipmisel.o
-OBJS += ipmisensor.o
+#include common ojects between hostboot and runtime hostboot
+include ../ipmi.mk
+
OBJS += rt_ipmirp.o
SUBDIRS += test.d
diff --git a/src/usr/ipmi/runtime/rt_ipmirp.C b/src/usr/ipmi/runtime/rt_ipmirp.C
index 7184c85f7..f99723adf 100644
--- a/src/usr/ipmi/runtime/rt_ipmirp.C
+++ b/src/usr/ipmi/runtime/rt_ipmirp.C
@@ -54,11 +54,25 @@ trace_desc_t * g_trac_ipmi;
namespace IPMI
{
- // TODO RTC: 124099 move to a _hb attribute
- // ATTR_IPMI_MAX_BUFFER_SEND_SIZE
- static const size_t g_max_buffer = 61;
+ static size_t g_max_buffer = 0;
size_t max_buffer(void)
{
+ if (g_max_buffer == 0)
+ {
+ TARGETING::Target * sys = NULL;
+ TARGETING::targetService().getTopLevelTarget( sys );
+ if (sys)
+ {
+ g_max_buffer = sys->getAttr
+ <TARGETING::ATTR_IPMI_MAX_BUFFER_SIZE>();
+ IPMI_TRAC( INFO_MRK"getAttr(IPMI_MAX_BUFFER_SIZE) = %d",
+ g_max_buffer);
+ }
+ else
+ {
+ IPMI_TRAC( ERR_MRK"IPMI_MAX_BUFFER_SIZE not available" );
+ }
+ }
return g_max_buffer;
}
@@ -73,14 +87,14 @@ namespace IPMI
int rc = 0;
// if the buffer is too large this is a programming error.
- assert(io_len <= g_max_buffer);
+ assert(io_len <= max_buffer());
IPMI_TRAC("calling sync %x:%x len=%d",
i_cmd.first, i_cmd.second, io_len);
if(g_hostInterfaces && g_hostInterfaces->ipmi_msg)
{
- size_t l_len = g_max_buffer; // max size the BMC can return
+ size_t l_len = max_buffer(); // max size the BMC can return
uint8_t *l_data = new uint8_t[l_len];
rc = g_hostInterfaces->ipmi_msg(
OpenPOWER on IntegriCloud