diff options
author | crgeddes <crgeddes@us.ibm.com> | 2015-12-10 15:55:51 -0600 |
---|---|---|
committer | WILLIAM G. HOFFA <wghoffa@us.ibm.com> | 2016-02-26 08:49:33 -0600 |
commit | 581462957e6df9ea663914fabf65f9f77b4e4bfa (patch) | |
tree | 26602a2bccd1a3bfdc95d8c935ae74cecd155aed /src/usr/fapi2/test | |
parent | a9e3b39d8520ff5c0356e85d4ce27ebf8f9a5fef (diff) | |
download | talos-hostboot-581462957e6df9ea663914fabf65f9f77b4e4bfa.tar.gz talos-hostboot-581462957e6df9ea663914fabf65f9f77b4e4bfa.zip |
Basic Hostboot platform support for FAPI2
Allows clean compile and link of FAPI2 procedures and a subset of the
platform functional support
RTC:123290
Change-Id: I9faa3bea86d1b43bca0a7eaca3869b45cc0b0d54
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23046
Tested-by: Jenkins Server
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/test')
-rw-r--r-- | src/usr/fapi2/test/fapi2HwpTest.C | 277 | ||||
-rw-r--r-- | src/usr/fapi2/test/fapi2Test.H | 68 | ||||
-rw-r--r-- | src/usr/fapi2/test/fapi2TestUtils.C | 314 | ||||
-rw-r--r-- | src/usr/fapi2/test/fapi2TestUtils.H | 66 | ||||
-rw-r--r-- | src/usr/fapi2/test/makefile | 47 | ||||
-rw-r--r-- | src/usr/fapi2/test/p9_sample_procedure.C | 386 | ||||
-rw-r--r-- | src/usr/fapi2/test/p9_sample_procedure.H | 117 |
7 files changed, 1275 insertions, 0 deletions
diff --git a/src/usr/fapi2/test/fapi2HwpTest.C b/src/usr/fapi2/test/fapi2HwpTest.C new file mode 100644 index 000000000..c90431ecb --- /dev/null +++ b/src/usr/fapi2/test/fapi2HwpTest.C @@ -0,0 +1,277 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/test/fapi2HwpTest.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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 */ + +#include <errl/errlmanager.H> +#include <errl/errlentry.H> +#include <fapi2.H> +#include <hwpf_fapi2_reasoncodes.H> +#include <fapi2TestUtils.H> + +namespace fapi2 +{ + + +//****************************************************************************** +// fapi2HwpTest +//****************************************************************************** +errlHndl_t fapi2HwpTest() +{ + int numTests = 0; + int numFails = 0; + errlHndl_t l_errl = NULL; + + do + { + // Create a vector of TARGETING::Target pointers + TARGETING::TargetHandleList l_chipList; + + // Get a list of all of the proc chips + TARGETING::getAllChips(l_chipList, TARGETING::TYPE_PROC, false); + + TARGETING::Target * l_nimbusProc = NULL; + + //Take the first NIMBUS proc and use it + for(uint32_t i = 0; i < l_chipList.size(); i++) + { + if(TARGETING::MODEL_NIMBUS == + l_chipList[i]->getAttr<TARGETING::ATTR_MODEL>()) + { + l_nimbusProc = l_chipList[i]; + break; + } + } + numTests++; + if(l_nimbusProc == NULL) + { + // Send an errorlog because we cannot find any NIMBUS procs. + FAPI_ERR("FAPI2_GETPARENT:: could not find Nimbus proc, skipping tests"); + numFails++; + /*@ + * @errortype ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid fapi2::MOD_FAPI2_PLAT_HWP_TEST + * @reasoncode fapi2::RC_NO_PROCS_FOUND + * @userdata1 Model Type we looked for + * @userdata2 Unused + * @devdesc Could not find NIMBUS procs in system model + */ + l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, + fapi2::MOD_FAPI2_PLAT_HWP_TEST, + fapi2::RC_NO_PROCS_FOUND, + TARGETING::MODEL_NIMBUS, + NULL, + true/*SW Error*/); + errlCommit(l_errl,HWPF_COMP_ID); + break; + } + + TARGETING::Target* targeting_targets[NUM_TARGETS]; + generateTargets(l_nimbusProc, targeting_targets); + + for( uint64_t x = 0; x < NUM_TARGETS; x++ ) + { + if(targeting_targets[x] == NULL) + { + FAPI_ERR("Unable to find target for item %d in targeting_targets", x); + + /*@ + * @errortype ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid fapi2::MOD_FAPI2_PLAT_HWP_TEST + * @reasoncode fapi2::RC_NO_PATH_TO_TARGET_FOUND + * @userdata1 Index of target in array of objects + * @userdata2 Unused + * @devdesc Could not find a path to the target of that type + */ + l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, + fapi2::MOD_FAPI2_PLAT_HWP_TEST, + fapi2::RC_NO_PATH_TO_TARGET_FOUND, + x, + NULL, + true/*SW Error*/); + errlCommit(l_errl,HWPF_COMP_ID); + } + } + + fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(l_nimbusProc); + fapi2::Target<fapi2::TARGET_TYPE_EQ> fapi2_eqTarget(targeting_targets[MY_EQ]); + fapi2::Target<fapi2::TARGET_TYPE_EX> fapi2_exTarget(targeting_targets[MY_EX]); + fapi2::Target<fapi2::TARGET_TYPE_CORE> fapi2_coreTarget( + targeting_targets[MY_CORE]); + fapi2::Target<fapi2::TARGET_TYPE_MCS> fapi2_mcsTarget(targeting_targets[MY_MCS]); + fapi2::Target<fapi2::TARGET_TYPE_MCA> fapi2_mcaTarget(targeting_targets[MY_MCA]); + fapi2::Target<fapi2::TARGET_TYPE_MCBIST> fapi2_mcbistTarget( + targeting_targets[MY_MCBIST]); + fapi2::Target<fapi2::TARGET_TYPE_PEC> fapi2_pecTarget(targeting_targets[MY_PEC]); + fapi2::Target<fapi2::TARGET_TYPE_PHB> fapi2_phbTarget(targeting_targets[MY_PHB]); + fapi2::Target<fapi2::TARGET_TYPE_XBUS> fapi2_xbusTarget( + targeting_targets[MY_XBUS]); + fapi2::Target<fapi2::TARGET_TYPE_OBUS> fapi2_obusTarget( + targeting_targets[MY_OBUS]); + fapi2::Target<fapi2::TARGET_TYPE_NV> fapi2_nvbusTarget( + targeting_targets[MY_NVBUS]); + fapi2::Target<fapi2::TARGET_TYPE_PPE> fapi2_ppeTarget(targeting_targets[MY_PPE]); + fapi2::Target<fapi2::TARGET_TYPE_PERV> fapi2_pervTarget( + targeting_targets[MY_PERV]); + fapi2::Target<fapi2::TARGET_TYPE_SBE> fapi2_sbeTarget(targeting_targets[MY_SBE]); + fapi2::Target<fapi2::TARGET_TYPE_CAPP> fapi2_cappTarget( + targeting_targets[MY_CAPP]); + + + int scratchWriteValue = 5; + + //Get/Set Attr for all of the targets + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_proc, fapi2_procTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_proc !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_eq, fapi2_eqTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_eq !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_ex, fapi2_exTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_ex !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_core, fapi2_coreTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_core !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_mcs, fapi2_mcsTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_mcs !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_mca, fapi2_mcaTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_mca !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_mcbist, fapi2_mcbistTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_mcbist !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_pec, fapi2_pecTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_pec !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_phb, fapi2_phbTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_phb !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_xbus, fapi2_xbusTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_xbus !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_obus, fapi2_obusTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_obus !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_nv, fapi2_nvbusTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_nv !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_ppe, fapi2_ppeTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_ppe !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_perv, fapi2_pervTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_perv !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_sbe, fapi2_sbeTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_sbe !!"); + } + numTests++; + FAPI_INVOKE_HWP(l_errl, p9_sample_procedure_capp, fapi2_cappTarget, scratchWriteValue); + if(l_errl != NULL) + { + l_errl = NULL; + numFails++; + TS_FAIL("Error occured in p9_sample_procedure_capp !!"); + } + }while(0); + FAPI_INF("test_sampleHWPs:: Test Complete. %d/%d fails", numFails,numTests); + return l_errl; +} + +}
\ No newline at end of file diff --git a/src/usr/fapi2/test/fapi2Test.H b/src/usr/fapi2/test/fapi2Test.H new file mode 100644 index 000000000..76a86a183 --- /dev/null +++ b/src/usr/fapi2/test/fapi2Test.H @@ -0,0 +1,68 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/test/fapi2Test.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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 __FAPI2TEST_H__ +#define __FAPI2TEST_H__ + +/** + * @file fapi2Test.H + * + * @brief Test case for SCOM code +*/ + +#include <cxxtest/TestSuite.H> +#include <errl/errlmanager.H> +#include <errl/errlentry.H> +#include <targeting/common/targetservice.H> +#include <fapi2.H> +#include <p9_sample_procedure.H> +#include <hwp_executor.H> +#include <plat_hwp_invoker.H> +#include <pnor/pnorif.H> +#include <targeting/common/utilFilter.H> +#include <fapi2TestUtils.H> +#include <hwpf_fapi2_reasoncodes.H> + +#include "fapi2HwpTest.C" + +using namespace fapi2; + +class fapi2Test: public CxxTest::TestSuite +{ +public: + +/** +* @brief Test some basic HWPs that hit all targets +* that runs through the FAPI2 macros +* +*/ +void test_fapi2HwpTest(void) +{ + FAPI_INF(">>test_fapi2HwpTest starting..."); + fapi2HwpTest(); + FAPI_INF(">>test_fapi2HwpTest exiting..."); +} +}; + +#endif
\ No newline at end of file diff --git a/src/usr/fapi2/test/fapi2TestUtils.C b/src/usr/fapi2/test/fapi2TestUtils.C new file mode 100644 index 000000000..896a94ba8 --- /dev/null +++ b/src/usr/fapi2/test/fapi2TestUtils.C @@ -0,0 +1,314 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/test/fapi2TestUtils.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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 */ +/// +/// @file fapi2TestUtils.C +/// +/// @brief FAPI2 utility functions +/// +/// Note that platform code must provide the implementation. +/// + +#include <fapi2.H> +#include "fapi2TestUtils.H" + + +//This is subject to change, try to keep updated +#define NUM_EQS 6 +#define NUM_EXS 12 +#define NUM_CORES 24 +#define NUM_L2S 12 +#define NUM_L3S 12 +#define NUM_MCS 4 +#define NUM_MCAS 8 +#define NUM_MCBISTS 2 +#define NUM_PECS 3 +#define NUM_PHBS 6 +#define NUM_XBUS 1 +#define NUM_OBUS 2 +#define NUM_NVBUS 2 +#define NUM_PPES 21 +#define NUM_PERVS 55 +#define NUM_CAPPS 2 +#define NUM_SBES 1 + +namespace fapi2 +{ + +void generateTargets(TARGETING::Target* i_pMasterProcChip, + TARGETING::Target* o_targetList[]) +{ + for( uint64_t x = 0; x < NUM_TARGETS; x++ ) + { + o_targetList[x] = NULL; + } + + // Set up entity path for NIMBUS proc + TARGETING::EntityPath l_epath; + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + + //Setup EQs, COREs, and EXs + for(int i = 0; i < NUM_EQS; i++) + { + l_epath.addLast(TARGETING::TYPE_EQ,i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_EQ] = + TARGETING::targetService().toTarget(l_epath); + for(int j = 0; j < NUM_EXS; j++) + { + l_epath.addLast(TARGETING::TYPE_EX,i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_EX] = + TARGETING::targetService().toTarget(l_epath); + for(int k = 0; k < NUM_CORES; k++) + { + l_epath.addLast(TARGETING::TYPE_CORE,k); + if(TARGETING::targetService().toTarget(l_epath)!=NULL) + { + o_targetList[MY_CORE] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + break; + } + else + { + l_epath.removeLast(); + } + } + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup MCSs and MCAs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_MCS; i++) + { + l_epath.addLast(TARGETING::TYPE_MCS, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_MCS] = + TARGETING::targetService().toTarget(l_epath); + for(int j = 0; j < NUM_MCAS; j++) + { + l_epath.addLast(TARGETING::TYPE_MCA,j); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_MCA] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup MCBISTs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_MCBISTS; i++) + { + l_epath.addLast(TARGETING::TYPE_MCBIST, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_MCBIST] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup PECs and PHBs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_PECS; i++) + { + l_epath.addLast(TARGETING::TYPE_PEC, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_PEC] = + TARGETING::targetService().toTarget(l_epath); + for(int j = 0; j < NUM_PHBS; j++) + { + l_epath.addLast(TARGETING::TYPE_PHB,j); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_PHB] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup XBUS + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_XBUS; i++) + { + l_epath.addLast(TARGETING::TYPE_XBUS, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_XBUS] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup OBUSs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_OBUS; i+=3) + { + l_epath.addLast(TARGETING::TYPE_OBUS, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_OBUS] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup NVBUS + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_NVBUS; i++) + { + l_epath.addLast(TARGETING::TYPE_NVBUS, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_NVBUS] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup PPEs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_PPES; i++) + { + l_epath.addLast(TARGETING::TYPE_PPE, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_PPE] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup CAPPs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_CAPPS; i++) + { + l_epath.addLast(TARGETING::TYPE_CAPP, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_CAPP] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup SBE + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_SBES; i++) + { + l_epath.addLast(TARGETING::TYPE_SBE, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_SBE] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } + + //Setup PERVs + i_pMasterProcChip->tryGetAttr<TARGETING::ATTR_PHYS_PATH>(l_epath); + for(int i = 0; i < NUM_PERVS; i++) + { + l_epath.addLast(TARGETING::TYPE_PERV, i); + if(TARGETING::targetService().toTarget(l_epath) != NULL) + { + o_targetList[MY_PERV] = + TARGETING::targetService().toTarget(l_epath); + break; + } + else + { + l_epath.removeLast(); + } + } +} + +} // End namespace fapi2 diff --git a/src/usr/fapi2/test/fapi2TestUtils.H b/src/usr/fapi2/test/fapi2TestUtils.H new file mode 100644 index 000000000..15ddb0b6a --- /dev/null +++ b/src/usr/fapi2/test/fapi2TestUtils.H @@ -0,0 +1,66 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/test/fapi2TestUtils.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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 */ +/// +/// @file fapi2TestUtils.H +/// +/// @brief FAPI2 utility functions +/// +/// Note that platform code must provide the implementation. +/// + +#ifndef FAPI2TESTUTILS_H_ +#define FAPI2TESTUTILS_H_ + +#include <fapi2.H> + +namespace fapi2 +{ +// Setup some targets to use +enum{ + MY_EQ, + MY_EX, + MY_CORE, + MY_MCS, + MY_MCA, + MY_MCBIST, + MY_PEC, + MY_PHB, + MY_XBUS, + MY_OBUS, + MY_NVBUS, + MY_PPE, + MY_PERV, + MY_CAPP, + MY_SBE, + NUM_TARGETS +}; + + +void generateTargets(TARGETING::Target* i_pMasterProcChip, + TARGETING::Target* o_targetList[]); + +} // End namespace fapi2 + +#endif diff --git a/src/usr/fapi2/test/makefile b/src/usr/fapi2/test/makefile new file mode 100644 index 000000000..ffebf05e3 --- /dev/null +++ b/src/usr/fapi2/test/makefile @@ -0,0 +1,47 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/fapi2/test/makefile $ +# +# OpenPOWER HostBoot Project +# +# Contributors Listed Below - COPYRIGHT 2015,2016 +# [+] 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 +# @file src/usr/fapi2/test/makefile +# +# @brief Makefile for fapi2 test case directory +# +ROOTPATH = ../../../.. +MODULE = testfapi2 + +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ +EXTRAINCDIR += ${ROOTPATH}/src/usr/fapi2/test/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/ + + +# Procedures +OBJS += p9_sample_procedure.o +OBJS += fapi2TestUtils.o + +TESTS += fapi2Test.H + +include ${ROOTPATH}/config.mk + +vpath %.C ${GENDIR} + diff --git a/src/usr/fapi2/test/p9_sample_procedure.C b/src/usr/fapi2/test/p9_sample_procedure.C new file mode 100644 index 000000000..1d4cf32e9 --- /dev/null +++ b/src/usr/fapi2/test/p9_sample_procedure.C @@ -0,0 +1,386 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/test/p9_sample_procedure.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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 */ +#include <cxxtest/TestSuite.H> +#include <p9_sample_procedure.H> +#include <fapi2.H> +#include <plat_attribute_service.H> + + +//------------------------------------------------------------------------------ +/// @file p9_sample_procedure.C +/// +/// @brief These procedures test FAPI_ATTR_GET, FAPI_ATTR_SET, +/// and FAPI_TRY and FAPI_ERR. This is primarily here to +/// to make sure these compile okay. +//------------------------------------------------------------------------------ + + +fapi2::ReturnCode p9_sample_procedure_proc( + fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on PROC Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, + i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on PROC Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, + i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", + l_attr_scratch, + expectedValue); + + + fapi_try_exit: + + FAPI_ERR("Exiting ..."); + + return fapi2::current_err; + +} + + +fapi2::ReturnCode p9_sample_procedure_ex( + fapi2::Target<fapi2::TARGET_TYPE_EX>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on EX Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on EX Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_eq( + fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on EQ Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on EQ Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_core( + fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on CORE Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on CORE Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + + + +fapi2::ReturnCode p9_sample_procedure_mcs( + fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on MCS Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on MCS Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_mca( + fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on MCA Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on MCA Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_mcbist( + fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on MCBIST Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on MCBIST Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_xbus( + fapi2::Target<fapi2::TARGET_TYPE_XBUS>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on XBUS Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on XBUS Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_capp( + fapi2::Target<fapi2::TARGET_TYPE_CAPP>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on CAPP Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on CAPP Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_obus( + fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on OBUS Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on OBUS Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_nv( + fapi2::Target<fapi2::TARGET_TYPE_NV>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on NV Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on NV Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_sbe( + fapi2::Target<fapi2::TARGET_TYPE_SBE>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on SBE Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on SBE Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_ppe( + fapi2::Target<fapi2::TARGET_TYPE_PPE>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on PPE Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on PPE Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_perv( + fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on PERV Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on PERV Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_phb( + fapi2::Target<fapi2::TARGET_TYPE_PHB>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on PHB Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on PHB Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + +fapi2::ReturnCode p9_sample_procedure_pec( + fapi2::Target<fapi2::TARGET_TYPE_PEC>& i_target, + uint8_t expectedValue) +{ + uint8_t l_attr_scratch = 0; + FAPI_ERR("Entering ..."); + FAPI_ERR("Set Scratch Attr on PEC Target"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + expectedValue)); + + FAPI_ERR("Get Scratch Attr on PEC Target"); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SCRATCH_UINT8_1, i_target, + l_attr_scratch)); + FAPI_ERR("Read scratch value : %d , expected it to be %d", l_attr_scratch, expectedValue); + +fapi_try_exit: + FAPI_ERR("Exiting ..."); + return fapi2::current_err; + +} + diff --git a/src/usr/fapi2/test/p9_sample_procedure.H b/src/usr/fapi2/test/p9_sample_procedure.H new file mode 100644 index 000000000..e931e7624 --- /dev/null +++ b/src/usr/fapi2/test/p9_sample_procedure.H @@ -0,0 +1,117 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/test/p9_sample_procedure.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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 */ +//------------------------------------------------------------------------------ +/// @file p9_sample_procedure.H +/// +/// @brief This procedure is a sample p9 procedure for compilation testing +//------------------------------------------------------------------------------ + +#ifndef _P9_SAMPLE_PROCEDURE_H_ +#define _P9_SAMPLE_PROCEDURE_H_ + + +#include <fapi2.H> +#include <error_scope.H> + +typedef fapi2::ReturnCode (*p9_sample_procedure_FP_t)(const + fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&); + +/// @brief This sample function has some CFAM/SCOM access for compilation +/// testing +/// +/// @param[in] i_target Reference to TARGET_TYPE_PROC_CHIP target +/// @return FAPI2_RC_SUCCESS if success, else error code. +extern "C" +{ + +fapi2::ReturnCode p9_sample_procedure_proc( + fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + uint8_t expectedValue); + + +fapi2::ReturnCode p9_sample_procedure_ex( + fapi2::Target<fapi2::TARGET_TYPE_EX>& i_target, + uint8_t expectedValue); + + +fapi2::ReturnCode p9_sample_procedure_eq( + fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_core( + fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target, + uint8_t expectedValue); + + +fapi2::ReturnCode p9_sample_procedure_mcs( + fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_mca( + fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_mcbist( + fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_xbus( + fapi2::Target<fapi2::TARGET_TYPE_XBUS>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_capp( + fapi2::Target<fapi2::TARGET_TYPE_CAPP>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_obus( + fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_nv( + fapi2::Target<fapi2::TARGET_TYPE_NV>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_sbe( + fapi2::Target<fapi2::TARGET_TYPE_SBE>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_ppe( + fapi2::Target<fapi2::TARGET_TYPE_PPE>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_perv( + fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_phb( + fapi2::Target<fapi2::TARGET_TYPE_PHB>& i_target, + uint8_t expectedValue); + +fapi2::ReturnCode p9_sample_procedure_pec( + fapi2::Target<fapi2::TARGET_TYPE_PEC>& i_target, + uint8_t expectedValue); +} + +#endif // _P9_SAMPLE_PROCEDURE_H_ |