diff options
author | Mark Wenning <wenning@us.ibm.com> | 2011-07-29 18:05:34 -0500 |
---|---|---|
committer | Mark W. Wenning <wenning@us.ibm.com> | 2011-08-31 16:55:20 -0500 |
commit | ddc062ce177ca591958b0d6bdf4c1b616899a340 (patch) | |
tree | 961842e056dfecad329f472b98e521992c856f49 /src/usr/initservice/istepdispatcher/splesscommand.C | |
parent | 0ebac914541254c4b9ee2a271f26cd67fc2b94a0 (diff) | |
download | talos-hostboot-ddc062ce177ca591958b0d6bdf4c1b616899a340.tar.gz talos-hostboot-ddc062ce177ca591958b0d6bdf4c1b616899a340.zip |
RTC 3346: Allow SPless control of ISteps within Hostboot
- initial commit
- add splesscommand and splessstatus objects
- factoring
- findTaskInfo, ExtTaskInfo structs
- doxygen cleanup
- unit tests
- cleanup, final
- review fixes
- take out splesscommand and splessstatus classes
- 2nd round of review changes
Change-Id: I6dce18072b5464a4b8c34e5f4ff639e38afa53d0
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/245
Tested-by: Jenkins Server
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Diffstat (limited to 'src/usr/initservice/istepdispatcher/splesscommand.C')
-rw-r--r-- | src/usr/initservice/istepdispatcher/splesscommand.C | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/src/usr/initservice/istepdispatcher/splesscommand.C b/src/usr/initservice/istepdispatcher/splesscommand.C new file mode 100644 index 000000000..563a4be3a --- /dev/null +++ b/src/usr/initservice/istepdispatcher/splesscommand.C @@ -0,0 +1,113 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/initservice/istepdispatcher/splesscommand.C $ +// +// 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 + +/** + * @file splesscommand.C + * + * Collection of routines to read/write the spless command reg + * + */ + + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <stdio.h> +#include <string.h> + +#include <errl/errlentry.H> // errlHndl_t +#include <sys/mmio.h> // mmio_scratch_read/write + +#include "splesscommon.H" + + +/******************************************************************************/ +// Globals/Constants +/******************************************************************************/ + +/******************************************************************************/ +// Typedef/Enumerations +/******************************************************************************/ + +namespace SPLESSCMD +{ + + +void read( bool &io_rgobit, + uint16_t &io_ristep, + uint16_t &io_rsubstep ) +{ + InternalCommand l_cmd; + + l_cmd.val64 = mmio_scratch_read(MMIO_SCRATCH_IPLSTEP_COMMAND); + + io_rgobit = l_cmd.f.gobit; + io_ristep = l_cmd.f.istep; + io_rsubstep = l_cmd.f.substep; + +} + + +void write( const bool i_gobit, + const uint16_t i_istep, + const uint16_t i_substep ) +{ + InternalCommand l_cmd; + + // copy into union + l_cmd.f.gobit = i_gobit; + l_cmd.f.istep = i_istep; + l_cmd.f.substep = i_substep; + + mmio_scratch_write( MMIO_SCRATCH_IPLSTEP_COMMAND, l_cmd.val64 ); + +} + + +void getgobit( bool &o_rgobit ) +{ + uint16_t l_istep = 0; + uint16_t l_substep = 0; + + // re-use above call... + read( o_rgobit, + l_istep, + l_substep ); + +} + + +void setgobit( const bool i_gobit ) +{ + InternalCommand l_cmd; + + l_cmd.val64 = mmio_scratch_read( MMIO_SCRATCH_IPLSTEP_COMMAND); + + l_cmd.f.gobit = i_gobit; + + mmio_scratch_write( MMIO_SCRATCH_IPLSTEP_COMMAND, l_cmd.val64 ); + +} + +} // namespace |