summaryrefslogtreecommitdiffstats
path: root/src/occ_405/state.h
diff options
context:
space:
mode:
authorWael El-Essawy <welessa@us.ibm.com>2017-01-27 11:01:21 -0600
committerWael El-Essawy <welessa@us.ibm.com>2017-02-22 12:01:54 -0500
commitcfdf01a5cd0d5651a5930cc6ff014fade184c90f (patch)
tree49ae2529e1584732e5a9c616e11107bd39e275d4 /src/occ_405/state.h
parent3b610c244fb402e50768b8d67b55a91f665a53d3 (diff)
downloadtalos-occ-cfdf01a5cd0d5651a5930cc6ff014fade184c90f.tar.gz
talos-occ-cfdf01a5cd0d5651a5930cc6ff014fade184c90f.zip
Characterization state, new state transitions and Active to Observation state
Support for new characterization state changes used by manufacturing. Observation state and new characterization state. Details in version 0.10 OCC Interface Specifications. Change-Id: I2ff0fc9327ad75e54c0a47cf42946e58f387522b RTC: 163268 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35517 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Wael El-Essawy <welessa@us.ibm.com>
Diffstat (limited to 'src/occ_405/state.h')
-rwxr-xr-xsrc/occ_405/state.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/occ_405/state.h b/src/occ_405/state.h
index 9752b9f..17ae7b6 100755
--- a/src/occ_405/state.h
+++ b/src/occ_405/state.h
@@ -31,6 +31,9 @@
#include "errl.h"
#include "mode.h"
+// Maximum allowed value approx. 16.3 ms
+#define PCBS_HEARBEAT_TIME_US 16320
+
extern uint32_t G_smgr_validate_data_active_mask;
extern uint32_t G_smgr_validate_data_observation_mask;
@@ -52,6 +55,7 @@ typedef enum
OCC_STATE_OBSERVATION = 0x02,
OCC_STATE_ACTIVE = 0x03,
OCC_STATE_SAFE = 0x04,
+ OCC_STATE_CHARACTERIZATION = 0x05,
// Make sure this is after the last valid state
OCC_STATE_COUNT,
@@ -63,8 +67,9 @@ typedef enum
} OCC_STATE;
// These are the only states that TMGT/HTMGT can send
-#define OCC_STATE_IS_VALID(state) ((state == OCC_STATE_NOCHANGE) || \
- (state == OCC_STATE_OBSERVATION) || \
+#define OCC_STATE_IS_VALID(state) ((state == OCC_STATE_NOCHANGE) || \
+ (state == OCC_STATE_OBSERVATION) || \
+ (state == OCC_STATE_CHARACTERIZATION) || \
(state == OCC_STATE_ACTIVE))
/**
@@ -144,6 +149,9 @@ typedef enum
// Returns true if OCC State is observation
#define IS_OCC_STATE_OBSERVATION() ( (OCC_STATE_OBSERVATION == G_occ_internal_state)? 1 : 0 )
+// Returns true if OCC State is charaterization
+#define IS_OCC_STATE_CHARACTERIZATION() ( (OCC_STATE_CHARACTERIZATION == G_occ_internal_state)? 1 : 0 )
+
/**
* @struct smgr_state_trans_t
* @brief Used by the "Set State" command to call the correct transition
@@ -162,6 +170,24 @@ extern OCC_STATE G_occ_internal_req_state;
extern OCC_STATE G_occ_master_state;
extern OCC_STATE G_occ_external_req_state;
+// State Transition Function Calls
+errlHndl_t SMGR_standby_to_observation();
+errlHndl_t SMGR_standby_to_characterization();
+errlHndl_t SMGR_standby_to_active();
+
+errlHndl_t SMGR_observation_to_characterization();
+errlHndl_t SMGR_observation_to_active();
+
+errlHndl_t SMGR_characterization_to_observation();
+errlHndl_t SMGR_characterization_to_active();
+
+errlHndl_t SMGR_active_to_observation();
+errlHndl_t SMGR_active_to_characterization();
+
+errlHndl_t SMGR_all_to_standby();
+
+errlHndl_t SMGR_all_to_safe();
+
// Used by macro above to clear flag indicating to not halt OCC when a reset
// is requested.
inline void reset_disable_halt(void);
@@ -182,5 +208,5 @@ errlHndl_t SMGR_set_state(OCC_STATE i_state);
// parms we currently know.
uint8_t SMGR_validate_get_valid_states(void);
-#endif
+#endif // _state_h
OpenPOWER on IntegriCloud