summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Knight <rjknight@us.ibm.com>2013-02-08 17:04:15 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-29 09:36:48 -0500
commit624b6e0db45d1dea5bc5055374e0f574150b706e (patch)
tree824f0563e23937fc0ef7072053adc4d45ef18e9e
parent4779125193ca3265ed79f94d8d2ae5604aa26a53 (diff)
downloadtalos-hostboot-624b6e0db45d1dea5bc5055374e0f574150b706e.tar.gz
talos-hostboot-624b6e0db45d1dea5bc5055374e0f574150b706e.zip
Implement fapiGetSpyImage and fapiPutSpyImage functions
Change-Id: Ib09d018ab2f4f2a953e0496512e5d8307d27e43c RTC:61362 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3438 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/hwpf/fapi/fapiHwAccess.H100
-rw-r--r--src/include/usr/hwpf/fapi/fapiPlatHwAccess.H114
-rw-r--r--src/usr/hwpf/fapi/fapiHwAccess.C188
-rw-r--r--src/usr/hwpf/plat/fapiPlatHwAccess.C3
4 files changed, 353 insertions, 52 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiHwAccess.H b/src/include/usr/hwpf/fapi/fapiHwAccess.H
index f0a26a2b3..c4613b3ec 100644
--- a/src/include/usr/hwpf/fapi/fapiHwAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiHwAccess.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -43,11 +43,16 @@
* mjjones 07/12/2012 Add mode options to Ring funcs
* rjknight 09/20/2012 Update fapiSpy interfaces to
* allow string inputs for cronus
+ * jknight 04/02/2013 Add fapi get/setSpyImage
*/
#ifndef FAPIHWACCESS_H_
#define FAPIHWACCESS_H_
+#ifdef FAPI_SUPPORT_SPY_AS_ENUM
+#include <fapiSpyIds.H>
+#endif
+
#include <stdint.h>
#include <ecmdDataBufferBase.H>
#include <fapiReturnCode.H>
@@ -222,11 +227,11 @@ fapi::ReturnCode fapiModifyRing(const fapi::Target& i_target,
* @note: The string version is only supported for cronus.
*
* The fapi design to support both FSP and cronus use of get and
- * put spy funcions is dependant on the SPY names being expanded
+ * put spy functions is dependant on the SPY names being expanded
* to resemble a valid C identifier. This design places some
* restrictions on the SPY names which can be used.
*
- * 1. if the spy name contains a # procedure writers should replade it
+ * 1. if the spy name contains a # procedure writers should replace it
* with an __P__ for example -
*
* ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS
@@ -234,7 +239,7 @@ fapi::ReturnCode fapiModifyRing(const fapi::Target& i_target,
* ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS
*
* 2. if the spy name has a number following a "." it must have an
- * uinderscore prepended to the number.
+ * underscore prepended to the number.
*
* EH.TPCHIP.2KX100_ARY_CLK_EDGES_DLY
* becomes
@@ -281,11 +286,11 @@ fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target,
* @note: The string version is only supported for cronus.
*
* The fapi design to support both FSP and cronus use of get and
- * put spy funcions is dependant on the SPY names being expanded
+ * put spy functions is dependent on the SPY names being expanded
* to resemble a valid C identifier. This design places some
* restrictions on the SPY names which can be used.
*
- * 1. if the spy name contains a # procedure writers should replade it
+ * 1. if the spy name contains a # procedure writers should replace it
* with an __P__ for example -
*
* ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS
@@ -293,7 +298,7 @@ fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target,
* ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS
*
* 2. if the spy name has a number following a "." it must have an
- * uinderscore prepended to the number.
+ * underscore prepended to the number.
*
* EH.TPCHIP.2KX100_ARY_CLK_EDGES_DLY
* becomes
@@ -322,8 +327,89 @@ fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target,
fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target,
const char* const i_spyId,
ecmdDataBufferBase & i_data);
+
+#endif
+
+#ifdef FAPI_SUPPORT_SPY_AS_ENUM
+/**
+ * @brief Writes data into a ring image
+ * @param[in] i_target Target to operate on
+ * @param[in] i_spyId The spy's id
+ * @param[in] i_data ecmdDataBufferBase object that holds data to
+ * be written
+ * @param[out] o_imageData ecmdDataBufferBase object that holds data to
+ * write into
+ * @return ReturnCode. Zero on success, else platform specified error
+ *
+ * @note: The string version is only supported for cronus.
+ *
+ * The fapi design to support both FSP and cronus use of get and
+ * put spy functions is dependent on the SPY names being expanded
+ * to resemble a valid C identifier. This design places some
+ * restrictions on the SPY names which can be used.
+ *
+ * See fapiPutSpy for details on spy id specifics.
+ */
+#define fapiPutSpyImage(TARGET, ID, DATA1, DATA2) _fapiPutSpyImage(TARGET, \
+ FAPI_SPY_NAMES::ID.value, \
+ DATA1, DATA2)
+fapi::ReturnCode _fapiPutSpyImage(const fapi::Target& i_target,
+ const uint32_t i_spyId,
+ const ecmdDataBufferBase & i_data,
+ ecmdDataBufferBase & o_imageData);
+#endif
+
+#ifdef FAPI_SUPPORT_SPY_AS_STRING
+// fapiPutSpyImage function Cronus version
+#define fapiPutSpyImage(TARGET, ID, DATA1, DATA2) _fapiPutSpyImage(TARGET, #ID,\
+ DATA1,DATA2)
+fapi::ReturnCode _fapiPutSpyImage(const fapi::Target& i_target,
+ const char* const i_spyId,
+ const ecmdDataBufferBase & i_data,
+ ecmdDataBufferBase & o_imageData);
#endif
+#ifdef FAPI_SUPPORT_SPY_AS_ENUM
+/**
+ * @brief Reads data from a ring image
+ * @param[in] i_target Target to operate on
+ * @param[in] i_spyId The spy's id
+ * @param[out] o_data ecmdDataBufferBase object where data is
+ * returned
+ * @param[in] i_imageData ecmdDataBufferBase object that holds ring image
+ * to read data from
+ * @return ReturnCode. Zero on success, else platform specified error
+ *
+ * @note: The string version is only supported for cronus.
+ *
+ * The fapi design to support both FSP and cronus use of get and
+ * put spy functions is dependent on the SPY names being expanded
+ * to resemble a valid C identifier. This design places some
+ * restrictions on the SPY names which can be used.
+ *
+ * See fapiPutSpy for details on spy id specifics.
+ */
+#define fapiGetSpyImage(TARGET, ID, DATA1, DATA2) _fapiGetSpyImage(TARGET, \
+ FAPI_SPY_NAMES::ID.value, \
+ DATA1, DATA2)
+fapi::ReturnCode _fapiGetSpyImage(const fapi::Target& i_target,
+ const uint32_t i_spyId,
+ ecmdDataBufferBase & o_data,
+ const ecmdDataBufferBase & i_imageData);
+#endif
+
+#ifdef FAPI_SUPPORT_SPY_AS_STRING
+// fapiGetSpyImage function Cronus version
+#define fapiGetSpyImage(TARGET, ID, DATA1, DATA2) _fapiGetSpyImage(TARGET,\
+ #ID, DATA1,DATA2)
+
+fapi::ReturnCode _fapiGetSpyImage(const fapi::Target& i_target,
+ const char* const i_spyId,
+ ecmdDataBufferBase & o_data,
+ const ecmdDataBufferBase & i_imageData);
+#endif
+
+
} // extern "C"
#endif // FAPIHWACCESS_H_
diff --git a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H b/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H
index adcb3c877..2b217b798 100644
--- a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -23,22 +23,22 @@
/**
* @file fapiPlatHwAccess.H
*
- * @brief Defines hardware-access functions for the platform layer.
- * Hardware procedure writers will not call these functions.
- *
+ * @brief Defines hardware-access functions for the platform layer.
+ * Hardware procedure writers will not call these functions.
+ *
* Implementors of platform code will provide worker routines
* for these functions in file hwpf/plat/fapiPlatHwAccess.C.
* fapi.H will not include this file, so platform implementors
- * will have to include this file explicitly.
- *
- * These platform entry points are called by fapi functions from
- * hwpf/fapi/fapiHwAccess.C which are wrapper functions that
- * output scand traces common to all platforms.
- *
+ * will have to include this file explicitly.
+ *
+ * These platform entry points are called by fapi functions from
+ * hwpf/fapi/fapiHwAccess.C which are wrapper functions that
+ * output scand traces common to all platforms.
+ *
* These functions have the same argument signatures as the
- * fapi-level functions, but the function names her start with
+ * fapi-level functions, but the function names her start with
* "plat."
- *
+ *
*/
/*
@@ -48,7 +48,9 @@
* monte 8sep2011 new
* mjjones 11/10/2011 Use ecmdDataBufferBase
* 836579 thi May 22,2012 Spy/Ring supports
- * mjjones 07/12/2012 Add Pulse mode option to Ring funcs
+ * mjjones 07/12/2012 Add Pulse mode option to
+ * Ring funcs
+ * jknight 04/02/2013 Add fapi get/setSpyImage
*/
#ifndef FAPIPLATHWACCESS_H_
@@ -71,8 +73,8 @@ extern "C"
/**
* @brief Platform-level implementation called by GetScom()
* Hardware procedures writers will not call this function.
- *
- *
+ *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address Scom address to read from
* @param[out] o_data ecmdDataBufferBase object that holds data read from
@@ -87,7 +89,7 @@ fapi::ReturnCode platGetScom(const fapi::Target& i_target,
/**
* @brief Platform-level implementation called by PutScom().
* Hardware procedures writers will not call this function.
- *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address Scom address to write to
* @param[in] i_data ecmdDataBufferBase object that holds data to write into
@@ -102,7 +104,7 @@ fapi::ReturnCode platPutScom(const fapi::Target& i_target,
/**
* @brief Platform-level implementation called by PutScomUnderMask()
* Hardware procedures writers will not call this function.
- *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address Scom address to write to
* @param[in] i_data ecmdDataBufferBase object that holds the data
@@ -119,7 +121,7 @@ fapi::ReturnCode platPutScomUnderMask(const fapi::Target& i_target,
/**
* @brief Platorm-level implementation called by GetCfamRegister()
* Hardware procedures writers will not call this function.
- *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address CFAM address to read from
* @param[out] o_data ecmdDataBufferBase object that holds data read from
@@ -134,7 +136,7 @@ fapi::ReturnCode platGetCfamRegister(const fapi::Target& i_target,
/**
* @brief Platform-level implementation called by PutCfamRegister()
* Hardware procedures writers will not call this function.
- *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address CFAM address to write to
* @param[in] i_data ecmdDataBufferBase object that holds data to write into
@@ -149,7 +151,7 @@ fapi::ReturnCode platPutCfamRegister(const fapi::Target& i_target,
/**
* @brief Platform-level implementation of ModifyCfamRegister()
* Hardware procedures writers will not call this function.
- *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address CFAM address to write to
* @param[in] i_data ecmdDataBufferBase object that holds the modifying data
@@ -165,7 +167,7 @@ fapi::ReturnCode platModifyCfamRegister(const fapi::Target& i_target,
/**
* @brief Platform-level implementation called by fapiGetRing()
* Hardware procedures writers will not call this function.
- *
+ *
* @param[in] i_target Target to operate on
* @param[in] i_address Ring address to read from
* @param[out] o_data ecmdDataBufferBase object that holds data read from
@@ -244,7 +246,7 @@ fapi::ReturnCode platGetSpy(const fapi::Target& i_target,
* @return ReturnCode. Zero on success, else platform specified error
*
* @note: This is only supported in the cronus environment
- * it will not compile in FSP code
+ * it will not compile in FSP code
*/
fapi::ReturnCode platGetSpy(const fapi::Target& i_target,
const char * const i_spyId,
@@ -273,7 +275,75 @@ fapi::ReturnCode platPutSpy(const fapi::Target& i_target,
const char * const i_spyId,
ecmdDataBufferBase & i_data);
#endif
+#ifdef FAPI_SUPPORT_SPY_AS_ENUM
+/**
+ * @brief Platform-level implementation called by fapiGetSpyImage()
+ * Hardware procedures writers will not call this function.
+ *
+ * @param[in] i_target Target to read spy from
+ * @param[in] i_spyId The spy's id
+ * @param[out] o_data Storage for output data
+ * @param[in] i_imageData Input ring data
+ *
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode platGetSpyImage(const fapi::Target& i_target,
+ const uint32_t i_spyId,
+ ecmdDataBufferBase & o_data,
+ const ecmdDataBufferBase & i_imageData);
+#endif
+#ifdef FAPI_SUPPORT_SPY_AS_STRING
+/**
+ * @brief Platform-level implementation called by fapiGetSpyImage()
+ * Hardware procedures writers will not call this function.
+ *
+ * @param[in] i_target Target to read spy from
+ * @param[in] i_spyId The spy's id
+ * @param[out] o_data Storage for output data
+ * @param[in] i_imageData Input ring data
+ *
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode platGetSpyImage(const fapi::Target& i_target,
+ const char * const i_spyId,
+ ecmdDataBufferBase & o_data,
+ const ecmdDataBufferBase & i_imageData);
+#endif
+#ifdef FAPI_SUPPORT_SPY_AS_ENUM
+/**
+ * @brief Platform-level implementation called by fapiPutSpyImage()
+ * Hardware procedures writers will not call this function.
+ *
+ * @param[in] i_target Target to read spy from
+ * @param[in] i_spyId The spy's id
+ * @param[in] i_data Data to be written into the image
+ * @param[out] io_imageData Holds ring image to write data into
+ *
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode platPutSpyImage(const fapi::Target& i_target,
+ const uint32_t i_spyId,
+ const ecmdDataBufferBase & i_data,
+ ecmdDataBufferBase & io_imageData);
+#endif
+#ifdef FAPI_SUPPORT_SPY_AS_STRING
+/**
+ * @brief Platform-level implementation called by fapiPutSpyImage()
+ * Hardware procedures writers will not call this function.
+ *
+ * @param[in] i_target Target to read spy from
+ * @param[in] i_spyId The spy's id
+ * @param[in] i_data Data to be written into the image
+ * @param[out] io_imageData Holds ring image to write data into
+ *
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode platPutSpyImage(const fapi::Target& i_target,
+ const char* const i_spyId,
+ const ecmdDataBufferBase & i_data,
+ ecmdDataBufferBase & io_imageData);
+#endif
} // extern "C"
#endif // FAPIPLATHWACCESS_H_
diff --git a/src/usr/hwpf/fapi/fapiHwAccess.C b/src/usr/hwpf/fapi/fapiHwAccess.C
index 4174cd8f5..98fa0802a 100644
--- a/src/usr/hwpf/fapi/fapiHwAccess.C
+++ b/src/usr/hwpf/fapi/fapiHwAccess.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -41,9 +41,12 @@
* mjjones 02/21/2012 Use high performance Target
* toEcmdString
* 836579 thi May 18,2012 Spy/ring supports
- * mjjones 07/12/2012 Add Pulse mode option to Ring funcs
+ * mjjones 07/12/2012 Add Pulse mode option to
+ * Ring funcs
* rjknight 09/20/2012 Update fapiGetSpy to take
* a string as input
+ * jknight 04/02/2013 Add fapi put/getSpyImage
+ * support
*/
#include <fapi.H>
#include <fapiPlatHwAccess.H>
@@ -66,12 +69,13 @@ fapi::ReturnCode fapiGetScom(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiGetScom failed - Target %s, Addr %.16llX", i_target.toEcmdString(), i_address);
+ FAPI_ERR("fapiGetScom failed - Target %s, Addr %.16llX",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
{
- FAPI_SCAN( "TRACE : GETSCOM : %s : %.16llX %.16llX",
+ FAPI_SCAN( "TRACE : GETSCOM : %s : %.16llX %.16llX",
i_target.toEcmdString(),
i_address,
o_data.getDoubleWord( 0 ) );
@@ -96,7 +100,8 @@ fapi::ReturnCode fapiPutScom(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiPutScom failed - Target %s, Addr %.16llX", i_target.toEcmdString(), i_address);
+ FAPI_ERR("fapiPutScom failed - Target %s, Addr %.16llX",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -126,7 +131,8 @@ fapi::ReturnCode fapiPutScomUnderMask(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiPutScomUnderMask failed - Target %s, Addr %.16llX", i_target.toEcmdString(), i_address);
+ FAPI_ERR("fapiPutScomUnderMask failed - Target %s, Addr %.16llX",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -156,7 +162,8 @@ fapi::ReturnCode fapiGetCfamRegister(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiGetCfamRegister failed - Target %s, Addr %.8X", i_target.toEcmdString(), i_address);
+ FAPI_ERR("fapiGetCfamRegister failed - Target %s, Addr %.8X",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -185,7 +192,8 @@ fapi::ReturnCode fapiPutCfamRegister(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("platPutCfamRegister failed - Target %s, Addr %.8X", i_target.toEcmdString(), i_address);
+ FAPI_ERR("platPutCfamRegister failed - Target %s, Addr %.8X",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -203,9 +211,9 @@ fapi::ReturnCode fapiPutCfamRegister(const fapi::Target& i_target,
// fapiModifyCfamRegister function
//******************************************************************************
fapi::ReturnCode fapiModifyCfamRegister(const fapi::Target& i_target,
- const uint32_t i_address,
- ecmdDataBufferBase & i_data,
- const fapi::ChipOpModifyMode i_modifyMode)
+ const uint32_t i_address,
+ ecmdDataBufferBase & i_data,
+ const fapi::ChipOpModifyMode i_modifyMode)
{
fapi::ReturnCode l_rc;
bool l_traceit = platIsScanTraceEnabled();
@@ -215,7 +223,8 @@ fapi::ReturnCode fapiModifyCfamRegister(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("platModifyCfamRegister failed - Target %s, Addr %.8X", i_target.toEcmdString(), i_address);
+ FAPI_ERR("platModifyCfamRegister failed - Target %s, Addr %.8X",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -265,7 +274,8 @@ fapi::ReturnCode fapiGetRing(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiGetRing failed - Target %s, Addr 0x%.8X", i_target.toEcmdString(), i_address);
+ FAPI_ERR("fapiGetRing failed - Target %s, Addr 0x%.8X",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -294,7 +304,8 @@ fapi::ReturnCode fapiPutRing(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiPutRing failed - Target %s, Addr 0x%.8X", i_target.toEcmdString(), i_address);
+ FAPI_ERR("fapiPutRing failed - Target %s, Addr 0x%.8X",
+ i_target.toEcmdString(), i_address);
}
if( l_traceit )
@@ -324,8 +335,9 @@ fapi::ReturnCode fapiModifyRing(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("platModifyRing failed - Target %s, Addr 0x%.8X, ModifyMode 0x%.8X",
- i_target.toEcmdString(), i_address, i_modifyMode);
+ FAPI_ERR("platModifyRing failed - Target %s, Addr 0x%.8X,"
+ "ModifyMode 0x%.8X", i_target.toEcmdString(),
+ i_address, i_modifyMode);
}
if( l_traceit )
@@ -372,6 +384,7 @@ fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target,
const uint32_t i_spyId,
ecmdDataBufferBase & o_data)
{
+
fapi::ReturnCode l_rc;
bool l_traceit = platIsScanTraceEnabled();
@@ -380,12 +393,13 @@ fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiGetSpy failed - Target %s, SpyId 0x%.8X", i_target.toEcmdString(), i_spyId);
+ FAPI_ERR("fapiGetSpy failed - Target %s, SpyId 0x%.8X",
+ i_target.toEcmdString(), i_spyId);
}
if( l_traceit )
{
- FAPI_SCAN( "TRACE : GETSPY : %s : %.8X %.16llX",
+ FAPI_SCAN( "TRACE : GETSPY : %s : %.8X %.16llX",
i_target.toEcmdString(),
i_spyId,
o_data.getDoubleWord(0));
@@ -408,12 +422,13 @@ fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiGetSpy failed - Target %s, SpyId %s", i_target.toEcmdString(), i_spyId);
+ FAPI_ERR("fapiGetSpy failed - Target %s, SpyId %s",
+ i_target.toEcmdString(), i_spyId);
}
if( l_traceit )
{
- FAPI_SCAN( "TRACE : GETSPY : %s : %s %.16llX",
+ FAPI_SCAN( "TRACE : GETSPY : %s : %s %.16llX",
i_target.toEcmdString(),
i_spyId,
o_data.getDoubleWord(0));
@@ -438,7 +453,8 @@ fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiPutSpy failed - Target %s, SpyId 0x%.8X", i_target.toEcmdString(), i_spyId);
+ FAPI_ERR("fapiPutSpy failed - Target %s, SpyId 0x%.8X",
+ i_target.toEcmdString(), i_spyId);
}
if( l_traceit )
@@ -468,7 +484,8 @@ fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target,
if (l_rc)
{
- FAPI_ERR("fapiPutSpy failed - Target %s, SpyId %s.8X", i_target.toEcmdString(), i_spyId);
+ FAPI_ERR("fapiPutSpy failed - Target %s, SpyId %s.8X",
+ i_target.toEcmdString(), i_spyId);
}
if( l_traceit )
@@ -483,5 +500,132 @@ fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target,
}
#endif
+#ifdef FAPI_SUPPORT_SPY_AS_STRING
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+fapi::ReturnCode _fapiGetSpyImage(const fapi::Target& i_target,
+ const char * const i_spyId,
+ ecmdDataBufferBase & o_data,
+ const ecmdDataBufferBase & i_imageData)
+{
+ fapi::ReturnCode l_rc;
+ bool l_traceit = platIsScanTraceEnabled();
+
+ // call the platform implementation
+ l_rc = platGetSpyImage( i_target, i_spyId, o_data, i_imageData );
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiGetSpyImage failed - Target %s, SpyId %s",
+ i_target.toEcmdString(), i_spyId);
+ }
+
+ if( l_traceit )
+ {
+ FAPI_SCAN( "TRACE : GETSPYIMAGE : %s : %s %.16llX",
+ i_target.toEcmdString(),
+ i_spyId,
+ o_data.getDoubleWord(0));
+
+ }
+
+ return l_rc;
+}
+
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+fapi::ReturnCode _fapiPutSpyImage(const fapi::Target& i_target,
+ const char * const i_spyId,
+ const ecmdDataBufferBase & i_data,
+ ecmdDataBufferBase & io_imageData)
+{
+ fapi::ReturnCode l_rc;
+ bool l_traceit = platIsScanTraceEnabled();
+
+ // call the platform implementation
+ l_rc = platPutSpyImage( i_target, i_spyId, i_data, io_imageData );
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiPutSpyImage failed - Target %s, SpyId %s",
+ i_target.toEcmdString(), i_spyId);
+ }
+ if( l_traceit )
+ {
+ FAPI_SCAN("TRACE : PUTSPYIMG : %s : %s %.16llX",
+ i_target.toEcmdString(),
+ i_spyId,
+ i_data.getDoubleWord(0));
+
+ }
+
+ return l_rc;
+}
+#endif
+#ifdef FAPI_SUPPORT_SPY_AS_ENUM
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+fapi::ReturnCode _fapiGetSpyImage(const fapi::Target& i_target,
+ const uint32_t i_spyId,
+ ecmdDataBufferBase & o_data,
+ const ecmdDataBufferBase & i_imageData)
+{
+
+ fapi::ReturnCode l_rc;
+ bool l_traceit = platIsScanTraceEnabled();
+
+ // call the platform implementation
+ l_rc = platGetSpyImage( i_target, i_spyId, o_data, i_imageData );
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiGetSpyImage failed - Target %s, SpyId 0x%.8X",
+ i_target.toEcmdString(), i_spyId);
+ }
+
+ if( l_traceit )
+ {
+ FAPI_SCAN( "TRACE : GETSPYIMG : %s : %.8X %.16llX",
+ i_target.toEcmdString(),
+ i_spyId,
+ o_data.getDoubleWord(0));
+
+ }
+
+ return l_rc;
+}
+
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+fapi::ReturnCode _fapiPutSpyImage(const fapi::Target& i_target,
+ const uint32_t i_spyId,
+ const ecmdDataBufferBase & i_data,
+ ecmdDataBufferBase & io_imageData)
+{
+ fapi::ReturnCode l_rc;
+ bool l_traceit = platIsScanTraceEnabled();
+
+ // call the platform implementation
+ l_rc = platPutSpyImage( i_target, i_spyId, i_data, io_imageData );
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiPutSpyImage failed - Target %s, SpyId 0x%.8X",
+ i_target.toEcmdString(), i_spyId);
+ }
+
+ if( l_traceit )
+ {
+ FAPI_SCAN( "TRACE : PUTSPYIMG : %s : %.8X %.16llX",
+ i_target.toEcmdString(),
+ i_spyId,
+ i_data.getDoubleWord(0));
+
+ }
+
+ return l_rc;
+}
+#endif
} // extern "C"
+
diff --git a/src/usr/hwpf/plat/fapiPlatHwAccess.C b/src/usr/hwpf/plat/fapiPlatHwAccess.C
index 8f8a4f2b2..5d372b48e 100644
--- a/src/usr/hwpf/plat/fapiPlatHwAccess.C
+++ b/src/usr/hwpf/plat/fapiPlatHwAccess.C
@@ -372,7 +372,8 @@ fapi::ReturnCode platGetCfamRegister(const fapi::Target& i_target,
}
if (l_ecmdRc)
{
- FAPI_ERR("platGetCfamRegister: ecmdDataBufferBase setBitLength() or setWord() returns error, ecmdRc 0x%.8X",
+ FAPI_ERR("platGetCfamRegister: ecmdDataBufferBase setBitLength()"
+ " or setWord() returns error, ecmdRc 0x%.8X",
l_ecmdRc);
l_rc.setEcmdError(l_ecmdRc);
}
OpenPOWER on IntegriCloud