summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorCamVan Nguyen <ctnguyen@us.ibm.com>2011-11-21 14:34:09 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-11-29 14:26:26 -0600
commitbbf8689af866146b80dcc932c72e1fd021056dcf (patch)
treeabebeafa8d74e9931c9154f6c26a05f53ac9de6e /src/include/usr
parentcb7b72b8c3ac212bbafe93fed0bd5c0e7f1e3571 (diff)
downloadtalos-hostboot-bbf8689af866146b80dcc932c72e1fd021056dcf.tar.gz
talos-hostboot-bbf8689af866146b80dcc932c72e1fd021056dcf.zip
Support for system and target attributes.
Support for endianness and 32bit platforms. Miscellaneous changes requested by cronus. Change-Id: I696ea556a9f35ec88defff217ece0a6c4e6802f3 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/511 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/hwpf/fapi/fapiUtil.H43
-rw-r--r--src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H8
-rw-r--r--src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H8
3 files changed, 38 insertions, 21 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiUtil.H b/src/include/usr/hwpf/fapi/fapiUtil.H
index e3033dc9a..51a8a6dcc 100644
--- a/src/include/usr/hwpf/fapi/fapiUtil.H
+++ b/src/include/usr/hwpf/fapi/fapiUtil.H
@@ -40,6 +40,9 @@
* mjjones 10/13/2011 Added extern "C" to functions
* camvanng 10/14/2011 Added fapiLoadInitFile &
* fapiUnloadInitFile
+ * camvanng 11/15/2011 Pass target to fapiLoadInitFile
+ * and doxygen changes;
+ * needed by cronus
*/
#ifndef FAPIUTIL_H_
@@ -98,20 +101,20 @@ fapi::ReturnCode fapiDelay(uint64_t i_nanoSeconds, uint64_t i_simCycles);
*
* @note Implemented by platform code
*
- * @param[io] Reference to ReturnCode (Any references to data and error
+ * @param[in,out] io_rc Reference to ReturnCode (Any references to data and error
* target are removed and rc value is set to success after
* function ends.)
*
- * Example usage:
- * fapi::ReturnCode l_rc;
- * FAPI_EXEC_HWP(l_rc, function1, i_target);
- * if (!l_rc)
- * {
- * fapiLogError(l_rc);
- * }
+ * Example usage: <br>
+ * fapi::ReturnCode l_rc; <br>
+ * FAPI_EXEC_HWP(l_rc, function1, i_target); <br>
+ * if (!l_rc) <br>
+ * { <br>
+ * fapiLogError(l_rc); <br>
+ * } <br>
*
- * FAPI_EXEC_HWP(l_rc, function2, i_target)
- * return rc;
+ * FAPI_EXEC_HWP(l_rc, function2, i_target) <br>
+ * return rc; <br>
*/
void fapiLogError(fapi::ReturnCode & io_rc);
@@ -125,7 +128,7 @@ bool platIsScanTraceEnabled();
/** @brief Alter the state of scand tracing.
* The implementation of this function is specific to the platform.
*
- * @param[in] True to enable or false to disable scan trace.
+ * @param[in] i_enable True to enable or false to disable scan trace.
* @return void
*/
void platSetScanTrace(bool i_enable);
@@ -138,15 +141,15 @@ void platSetScanTrace(bool i_enable);
* responsible for allocating any memory needed to load
* the initfile.
*
- * @param[in] the .if filename: <initfile>.if
- * @param[out] address in memory where initfile is loaded
- * @param[out] size of memory allocated for initfile
+ * @param[in] i_Target reference to the target
+ * @param[in] i_file the .if filename: \<initfile\>.if
+ * @param[out] o_addr address in memory where initfile is loaded
+ * @param[out] o_size size of memory allocated for initfile
*
* @return ReturnCode. Zero on success, else platform specified error.
*/
-
-fapi::ReturnCode fapiLoadInitFile(const char * i_file, const char *& o_addr,
- size_t & o_size);
+fapi::ReturnCode fapiLoadInitFile(const fapi::Target & i_Target,
+ const char * i_file, const char *& o_addr, size_t & o_size);
/** @brief Unload the initfile
*
@@ -155,10 +158,10 @@ fapi::ReturnCode fapiLoadInitFile(const char * i_file, const char *& o_addr,
* @note Implemented by platform code. Platform code is
* responsible for deleting any allocated memory.
*
- * @param[in] the .if filename: <initfile>.if
- * @param[in,out] address in memory where initfile is loaded
+ * @param[in] i_file the .if filename: \<initfile\>.if
+ * @param[in,out] io_addr address in memory where initfile is loaded
* set to NULL on exit
- * @param[in,out] size of memory allocated for initfile
+ * @param[in,out] io_size size of memory allocated for initfile
* set to 0 on exit
*
* @return ReturnCode. Zero on success, else platform specified error.
diff --git a/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H b/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H
index 7018e6280..63b1dc218 100644
--- a/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H
+++ b/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H
@@ -32,6 +32,7 @@
* ------ -------------- ---------- ----------- ----------------------------
* camvanng 09/29/2011 Created.
* andrewg 11/16/2011 Refactor includes with initfile compiler
+ * camvanng 11/16/2011 Define function pointer to HWP
*
*/
@@ -46,6 +47,10 @@
extern "C"
{
+//Provided for platforms that need to cast a generic function pointer into a
+//function pointer of the correct type to call the HWP.
+typedef fapi::ReturnCode (*fapiHwpExecInitFile_FP_t)(const fapi::Target & i_Target,
+ const char * i_file);
/**
* @brief HWP to execute an initfile.
*
@@ -54,7 +59,8 @@ extern "C"
*
* @return ReturnCode
*/
-fapi::ReturnCode hwpExecInitFile(const fapi::Target & i_chip, const char * i_file);
+fapi::ReturnCode fapiHwpExecInitFile(const fapi::Target & i_Target,
+ const char * i_file);
} // extern "C"
diff --git a/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H b/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H
index 38d763152..50f2bd222 100644
--- a/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H
+++ b/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H
@@ -31,6 +31,8 @@
* Flag Defect/Feature User Date Description
* ------ -------------- ---------- ----------- ----------------------------
* andrewg 11/09/2011 Created.
+ * camvanng 11/16/2011 Support for system & target
+ * attributes
*
*/
@@ -76,6 +78,12 @@ enum IfTypeMask
IF_TYPE_MASK = 0xC000,
};
+// System or Target attribute
+const uint16_t IF_SYS_ATTR_MASK = 0x2000;
+
+// Attribute Id mask
+const uint16_t IF_ATTR_ID_MASK = 0x1FFF;
+
// Only support up to 4 dimensions for an array
const uint8_t MAX_ATTRIBUTE_ARRAY_DIMENSION = 4;
OpenPOWER on IntegriCloud