diff options
author | Thi Tran <thi@us.ibm.com> | 2012-07-06 14:33:13 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-07-10 16:42:27 -0500 |
commit | 2a37ac4be40500b6849444168181931202892a96 (patch) | |
tree | 5a8bd0aacdd641a30d9f96ed0aed245082a7e8f8 /src/include/usr/hwpf/fapi | |
parent | 3977676c49b9a438398d39d7d323f6bb49902044 (diff) | |
download | talos-hostboot-2a37ac4be40500b6849444168181931202892a96.tar.gz talos-hostboot-2a37ac4be40500b6849444168181931202892a96.zip |
FAPI ring access supports
Change-Id: I92a9cd3d772276888aae4188154da6bd91aecb2c
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1297
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/fapi')
-rw-r--r-- | src/include/usr/hwpf/fapi/fapiHwAccess.H | 141 | ||||
-rw-r--r-- | src/include/usr/hwpf/fapi/fapiPlatHwAccess.H | 155 |
2 files changed, 252 insertions, 44 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiHwAccess.H b/src/include/usr/hwpf/fapi/fapiHwAccess.H index bb8dcfbbb..28cdc4ecd 100644 --- a/src/include/usr/hwpf/fapi/fapiHwAccess.H +++ b/src/include/usr/hwpf/fapi/fapiHwAccess.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/hwpf/fapi/fapiHwAccess.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/hwpf/fapi/fapiHwAccess.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ /** * @file fapiHwAccess.H * @@ -39,6 +40,7 @@ * mjjones 06/30/2011 Updated comment * mjjones 09/14/2011 Prepended fapi to functions * mjjones 11/10/2011 Use ecmdDataBufferBase + * 836579 thi May 22,2012 Spy/Ring supports */ #ifndef FAPIHWACCESS_H_ @@ -145,6 +147,101 @@ fapi::ReturnCode fapiModifyCfamRegister(const fapi::Target& i_target, ecmdDataBufferBase & i_data, const fapi::ChipOpModifyMode i_modifyMode); +/** + * @brief Reads a ring from a target + * @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 + * address + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiGetRing(const fapi::Target& i_target, + const uint32_t i_address, + ecmdDataBufferBase & o_data); + +/** + * @brief Writes a ring register on a target + * @param[in] i_target Target to operate on + * @param[in] i_address Ring address to write to + * @param[in] i_data ecmdDataBufferBase object that holds data to write into + * address + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPutRing(const fapi::Target& i_target, + const uint32_t i_address, + ecmdDataBufferBase & i_data); + + +/** + * @brief Modifies a ring register on a target + * @param[in] i_target Target to operate on + * @param[in] i_address Ring address to modify + * @param[in] i_data ecmdDataBufferBase object that holds data to write into + * address + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiModifyRing(const fapi::Target& i_target, + const uint32_t i_address, + ecmdDataBufferBase & i_data, + const fapi::ChipOpModifyMode i_modifyMode); + +// -------------------------------------------------------------------------- +// NOTE: +// These spy access interfaces are only used in FSP. +// HB does not allow spy access + +#ifndef _NO_SPY_ACCESS + +/** + * @brief Reads a Spy from a target + * @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 + * + * @return ReturnCode. Zero on success, else platform specified error + + */ +fapi::ReturnCode fapiGetSpy(const fapi::Target& i_target, + const uint32_t i_spyId, + ecmdDataBufferBase & o_data); + +/** + * @brief Writes a spy on a target + * @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 write into + * address + * + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPutSpy(const fapi::Target& i_target, + const uint32_t i_spyId, + ecmdDataBufferBase & i_data); + +/** + * @brief Read spy Enum data from a target + * @param[in] i_target Target to read spy enum from + * @param[in] i_spyId The spy's id + * @param[out] o_enumVal Spy enum value + * + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiGetSpyEnum(const fapi::Target& i_target, + const uint32_t i_spyId, + uint32_t& o_enumVal); + +/** + * @brief Write spy enum data to a target + * @param[in] i_target The chip or logical unit target + * @param[in] i_spyId The spy's id + * @param[in] i_enumVal Spy enum value to write + */ +fapi::ReturnCode fapiPutSpyEnum(const fapi::Target& i_target, + const uint32_t i_spyId, + const uint32_t i_enumVal); + +#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 95ebe08e8..f07cdc574 100644 --- a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H +++ b/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/hwpf/fapi/fapiHwAccess.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/hwpf/fapi/fapiPlatHwAccess.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ /** * @file fapiPlatHwAccess.H * @@ -47,6 +48,7 @@ * ------ -------------- ---------- ----------- ---------------------------- * monte 8sep2011 new * mjjones 11/10/2011 Use ecmdDataBufferBase + * 836579 thi May 22,2012 Spy/Ring supports */ #ifndef FAPIPLATHWACCESS_H_ @@ -159,6 +161,115 @@ fapi::ReturnCode platModifyCfamRegister(const fapi::Target& i_target, ecmdDataBufferBase & i_data, const fapi::ChipOpModifyMode i_modifyMode); + +/** + * @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 + * address + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode platGetRing(const fapi::Target& i_target, + const uint32_t i_address, + ecmdDataBufferBase & o_data); + + +/** + * @brief Platform-level implementation called by fapiPutRing() + * Hardware procedures writers will not call this function. + * + * @param[in] i_target Target to operate on + * @param[in] i_address Ring address to write to + * @param[in] i_data ecmdDataBufferBase object that holds data to write into + * address + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode platPutRing(const fapi::Target& i_target, + const uint32_t i_address, + ecmdDataBufferBase & i_data); + + +/** + * @brief Platform-level implementation called by fapiModifyRing() + * Hardware procedures writers will not call this function. + * + * @param[in] i_target Target to operate on + * @param[in] i_address Ring address to modify + * @param[in] i_data ecmdDataBufferBase object that holds data to write into + * address + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode platModifyRing(const fapi::Target& i_target, + const uint32_t i_address, + ecmdDataBufferBase & i_data, + const fapi::ChipOpModifyMode i_modifyMode); + +// -------------------------------------------------------------------------- +// NOTE: +// These spy access interfaces are only used in FSP. +// HB does not allow spy access + +#ifndef _NO_SPY_ACCESS +/** + * @brief Platform-level implementation called by fapiGetSpy() + * 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 + * + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode platGetSpy(const fapi::Target& i_target, + const uint32_t i_spyId, + ecmdDataBufferBase & o_data); + +/** + * @brief Platform-level implementation called by fapiPutSpy() + * Hardware procedures writers will not call this function. + * + * @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 write into + * address + * + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode platPutSpy(const fapi::Target& i_target, + const uint32_t i_spyId, + ecmdDataBufferBase & i_data); + +/** + * @brief Platform-level implementation called by fapiGetSpyEnum() + * Hardware procedures writers will not call this function. + * + * @param[in] i_target Target to read spy enum from + * @param[in] i_spyId The spy's id + * @param[out] o_enumVal Spy enum value + * + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode platGetSpyEnum(const fapi::Target& i_target, + const uint32_t i_spyId, + uint32_t& o_enumVal); + +/** + * @brief Platform-level implementation called by fapiPutSpyEnum() + * Hardware procedures writers will not call this function. + * + * @param[in] i_target The chip or logical unit target + * @param[in] i_spyId The spy's id + * @param[in] i_enumVal Spy enum value to write + */ +fapi::ReturnCode platPutSpyEnum(const fapi::Target& i_target, + const uint32_t i_spyId, + const uint32_t i_enumVal); + +#endif + } // extern "C" #endif // FAPIPLATHWACCESS_H_ |