summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2014-07-18 10:01:22 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2014-07-18 13:02:31 -0500
commit0c0038211094918fa97413a633bfdd265ea72b97 (patch)
treedeaf239324f6c3f6023fc53ae1261ad2553b5f66 /src/usr/hwpf
parentec21c8af25e54974e4af24c5e5acb1cedc1ae5d4 (diff)
downloadblackbird-hostboot-0c0038211094918fa97413a633bfdd265ea72b97.tar.gz
blackbird-hostboot-0c0038211094918fa97413a633bfdd265ea72b97.zip
SW269741: INITPROC: Host Boot - get latest mvpdRingFuncs
Change-Id: I0380216b3018b51e36d95187f8c097e154329a1d CQ:SW269741 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12268 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12297 Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/hwpf')
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C22
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.H11
2 files changed, 23 insertions, 10 deletions
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C b/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C
index 20f5e98b7..e54b0f602 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mvpdRingFuncs.C,v 1.11 2014/04/08 20:52:49 whs Exp $
+// $Id: mvpdRingFuncs.C,v 1.12 2014/07/16 19:06:49 cswenson Exp $
/**
* @file mvpdRingFuncs.C
*
@@ -109,6 +111,8 @@ fapi::ReturnCode mvpdValidateRecordKeyword( fapi::MvpdRecord i_record,
};
+
+#ifndef FAPI_NO_MBVPD
fapi::ReturnCode mbvpdValidateRecordKeyword(fapi::MBvpdRecord i_record,
fapi::MBvpdKeyword i_keyword)
{
@@ -142,6 +146,8 @@ fapi::ReturnCode mbvpdValidateRecordKeyword(fapi::MBvpdRecord i_record,
return l_fapirc;
};
+#endif
+
//******************************************************************************
// mvpdRingFunc: the getMvpdRing and setMvpdRing wrappers call this function
@@ -228,7 +234,7 @@ fapi::ReturnCode mvpdRingFunc( const mvpdRingFuncOp i_mvpdRingFuncOp,
l_recordLen );
// allocate buffer for the record. Always works
- l_recordBuf = new uint8_t[l_recordLen];
+ l_recordBuf = static_cast<uint8_t*>(fapiMalloc((size_t)l_recordLen));
// load ring from MVPD for this target
l_fapirc = fapiGetMvpdField( i_record,
@@ -323,7 +329,7 @@ fapi::ReturnCode mvpdRingFunc( const mvpdRingFuncOp i_mvpdRingFuncOp,
} while ( 0 );
// unload the repair ring
- delete[] l_recordBuf;
+ fapiFree((void*)l_recordBuf);
l_recordBuf = NULL;
FAPI_DBG( "mvpdRingFunc: exit bufsize= 0x%x rc= 0x%x",
@@ -332,6 +338,8 @@ fapi::ReturnCode mvpdRingFunc( const mvpdRingFuncOp i_mvpdRingFuncOp,
return l_fapirc;
}
+
+#ifndef FAPI_NO_MBVPD
//******************************************************************************
// mbvpdRingFunc: getMBvpdRing calls this function to get repair ring
// note: io_rRingBufsize is only 'output' for get.
@@ -385,7 +393,7 @@ fapi::ReturnCode mbvpdRingFunc( const mbvpdRingFuncOp i_mbvpdRingFuncOp,
l_recordLen );
// allocate buffer for the record. Always works
- l_recordBuf = new uint8_t[l_recordLen];
+ l_recordBuf = static_cast<uint8_t*>(fapiMalloc((size_t)l_recordLen));
// load ring from MBVPD for this target
l_fapirc = fapiGetMBvpdField( i_record,
@@ -453,7 +461,7 @@ fapi::ReturnCode mbvpdRingFunc( const mbvpdRingFuncOp i_mbvpdRingFuncOp,
} while ( 0 );
// unload the repair ring
- delete[] l_recordBuf;
+ fapiFree((void*)l_recordBuf);
l_recordBuf = NULL;
FAPI_DBG( "mbvpdRingFunc: exit bufsize= 0x%x rc= 0x%x",
@@ -461,7 +469,7 @@ fapi::ReturnCode mbvpdRingFunc( const mbvpdRingFuncOp i_mbvpdRingFuncOp,
static_cast<uint32_t>(l_fapirc) );
return l_fapirc;
}
-
+#endif
//******************************************************************************
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.H b/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.H
index a165ff591..8c3d6bc1e 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.H
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mvpdRingFuncs.H,v 1.3 2013/10/09 20:54:13 mjjones Exp $
+// $Id: mvpdRingFuncs.H,v 1.4 2014/07/16 19:07:08 cswenson Exp $
/**
* @file mvpdRingFuncs.H
*
@@ -39,11 +41,13 @@ enum mvpdRingFuncOp
MVPD_RING_SET,
};
+#ifndef FAPI_NO_MBVPD
// Only get operation for mbvpd Rings
enum mbvpdRingFuncOp
{
MBVPD_RING_GET,
};
+#endif
extern "C"
{
@@ -76,6 +80,7 @@ fapi::ReturnCode mvpdRingFunc( mvpdRingFuncOp i_mvpdRingFuncOp,
uint8_t *i_pRingBuf,
uint32_t &io_rRingBufsize);
+#ifndef FAPI_NO_MBVPD
/**
* @brief get the requested ring for the record and keyword
* for the specified target CPU.
@@ -103,7 +108,7 @@ fapi::ReturnCode mbvpdRingFunc( mbvpdRingFuncOp i_mbvpdRingFuncOp,
const uint8_t i_ringId,
uint8_t *i_pRingBuf,
uint32_t &io_rRingBufsize);
-
+#endif
} // extern "C"
OpenPOWER on IntegriCloud