diff options
author | crgeddes <crgeddes@us.ibm.com> | 2016-03-15 14:05:54 -0500 |
---|---|---|
committer | Stephen Cprek <smcprek@us.ibm.com> | 2016-03-17 17:07:13 -0500 |
commit | 9f3f94a84015e09b931f30d8912ad8b96ef61d1e (patch) | |
tree | aee619332f2570537d7ef11ce65bd31af0621fa7 /src/usr/fapi2/target.C | |
parent | 3d120b9df0ca643c6ea553aa5e03386f028a3cbe (diff) | |
download | talos-hostboot-9f3f94a84015e09b931f30d8912ad8b96ef61d1e.tar.gz talos-hostboot-9f3f94a84015e09b931f30d8912ad8b96ef61d1e.zip |
Add Specialized Constructor for SYSTEM fapi2::Targets
HWP writers are defining SYSTEM fapi2::Targets like this:
const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
Which requires us to implement a specialized constructor to handle
getting the top level system target when this type of constructor is used
To do this we had to delagate the default constructor in fapi2_target.H
to point at the constructor that takes in the plat_target_hndl, also a
specialized template was added to target.H. In the future this specialized
template might move to plat_target.H but this is not yet ready.
Change-Id: I10ea0c4fe05487311c29d5996f1f8baa775fa858
Depends-on: Ia7743dc8d3a83b4be361626b1dea57f39e4dd483
Depends-on: Ib0db5ac2b9b5d5f5c2967ff97794493d867fb04b
Depends-on: I863eb985f74f347a4e46a9c19449c57c70d6adce
RTC:133832
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22062
Tested-by: Jenkins Server
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Tested-by: FSP CI Jenkins
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/target.C')
-rw-r--r-- | src/usr/fapi2/target.C | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/usr/fapi2/target.C b/src/usr/fapi2/target.C new file mode 100644 index 000000000..ddb1da0a3 --- /dev/null +++ b/src/usr/fapi2/target.C @@ -0,0 +1,43 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/target.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 target.C +/// +/// @brief Currently just used to create helper functions for target.H +/// +/// + +#include <target.H> + +namespace PLAT_TARGET +{ + + void systemTargCtorHelperFunc(fapi2::plat_target_handle_t& io_handle) + { + TARGETING::targetService().getTopLevelTarget(io_handle); + } + + +} //end fapi2 namespace
\ No newline at end of file |