diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2014-09-26 15:21:14 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-11-17 12:06:38 -0600 |
commit | 7e0ef7549c2c65ad22d6b3ddc6cd41906f19102d (patch) | |
tree | 641fb2dde89f9a6a8219166ed12c14d24edc6a50 /src/include | |
parent | 70c20f8bdf6584df562024e627e04fa2c02336c5 (diff) | |
download | talos-hostboot-7e0ef7549c2c65ad22d6b3ddc6cd41906f19102d.tar.gz talos-hostboot-7e0ef7549c2c65ad22d6b3ddc6cd41906f19102d.zip |
Refactoring OCC Code
RTC:98547
Change-Id: I4eb918b1b73336a8b48f0bdb40cc285d0dde5a47
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13862
Tested-by: Jenkins Server
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/hwpf/hwp/occ/occ.H | 23 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwp/occ/occ_common.H | 112 |
2 files changed, 114 insertions, 21 deletions
diff --git a/src/include/usr/hwpf/hwp/occ/occ.H b/src/include/usr/hwpf/hwp/occ/occ.H index ea9e4c1c7..1292895df 100644 --- a/src/include/usr/hwpf/hwp/occ/occ.H +++ b/src/include/usr/hwpf/hwp/occ/occ.H @@ -25,29 +25,10 @@ #ifndef OCC_H_ #define OCC_H_ -#include <limits.h> -#include <errl/errlentry.H> +#include <limits.h> +#include <errl/errlentry.H> namespace HBOCC { - - struct occHostConfigDataArea_t - { - uint32_t version; - uint32_t nestFrequency; - }; - - enum - { - OccHostDataVersion = 1, - OCC_IBSCOM_RANGE_IN_MB = MEGABYTE, - }; - - enum occAction_t - { - OCC_START, - OCC_STOP, - }; - /** * @brief Starts OCCs on all Processors in the node * This is intended to be used for AVP testing. diff --git a/src/include/usr/hwpf/hwp/occ/occ_common.H b/src/include/usr/hwpf/hwp/occ/occ_common.H new file mode 100644 index 000000000..7aa7d6ae5 --- /dev/null +++ b/src/include/usr/hwpf/hwp/occ/occ_common.H @@ -0,0 +1,112 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/occ/occ_common.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 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. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef OCC_COMMON_H +#define OCC_COMMON_H + +#include <limits.h> +#include <errl/errlentry.H> + +namespace HBOCC +{ + /* + * @brief Host config data consumed by OCC + */ + struct occHostConfigDataArea_t + { + uint32_t version; + uint32_t nestFrequency; + }; + + enum + { + OccHostDataVersion = 1, + OCC_LIDID = 0x81e00430, + OCC_IBSCOM_RANGE_IN_MB = MEGABYTE, + }; + + enum occAction_t + { + OCC_START, + OCC_STOP, + }; + /** + * @brief Sets up OCC Host data + * + * @param[in] i_occHostDataVirtAddr Virtual + * address of current + * proc's Host data area. + * + * @return errlHndl_t Error log Host data setup failed + */ + errlHndl_t loadHostDataToHomer(void* i_occHostDataVirtAddr); + + /** + * @brief Execute procedures and steps required to load + * OCC data in a specified processor + * + * @param[in] i_target: target processor to load + * @param[in] i_homerPhysAddr: Physical address of current + * proc's homer + * @param[in] i_homerVirtAddr: Virtual address of current + * proc's homer + * @param[in] i_commonPhysAddr: Physical address of common + * occ region + * @return errlHndl_t Error log of loadOCC failed + */ + errlHndl_t loadOCC(TARGETING::Target* i_target, + uint64_t i_homerPhysAddr, + uint64_t i_homerVirtAddr, + uint64_t i_commonPhysAddr); + + /** + * @brief Start OCC for specified DCM pair of processors. + * If 2nd input is NULL, OCC will be setup on just + * one target. + * + * @param[in] i_target0: target of first processor in DCM pair + * @param[in] i_target1: target of second processor in DCM pair + * @param[out] o_failedTarget failed target in case of an error + * + * @return errlHndl_t Error log of startOCC failed + */ + errlHndl_t startOCC (TARGETING::Target* i_target0, + TARGETING::Target* i_target1, + TARGETING::Target *& o_failedTarget); + /** + * @brief Stop OCC for specified DCM pair of processors. + * If 2nd input is NULL, OCC will be setup on just + * one target. + * + * @param[in] i_target0: target of first processor in DCM pair + * @param[in] i_target1: target of second processor in DCM pair + * + * @return errlHndl_t Error log of stopOCC failed + */ + errlHndl_t stopOCC(TARGETING::Target * i_target0, + TARGETING::Target * i_target1); + +} //namespace HBOCC ends + +#endif |