#ifndef _CPU_SGNBLK_DEFS_H
#define _CPU_SGNBLK_DEFS_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ASM
#include <sys/types.h>
#include <sys/cpuvar.h>
#endif
#define CPU_SIG_BLD(sig, state, sub_state) \
(((sig) << 16) | ((state) << 8) | (sub_state))
typedef union {
struct cpu_signature {
ushort_t sig;
uchar_t state;
uchar_t sub_state;
} state_t;
uint32_t signature;
} sig_state_t;
#define SIG_BLD(f, s) (((f) << 8) | (s))
#define OBP_SIG SIG_BLD('O', 'B')
#define OS_SIG SIG_BLD('O', 'S')
#define DBG_SIG SIG_BLD('D', 'B')
#define POST_SIG SIG_BLD('P', 'O')
#define SIGST_NONE 0
#define SIGST_RUN 1
#define SIGST_EXIT 2
#define SIGST_PRERUN 3
#define SIGST_DOMAINSTOP 4
#define SIGST_RESET 5
#define SIGST_POWEROFF 6
#define SIGST_DETACHED 7
#define SIGST_CALLBACK 8
#define SIGST_OFFLINE 9
#define SIGST_BOOTING 10
#define SIGST_UNKNOWN 11
#define SIGST_ERROR_RESET 12
#define SIGST_ERROR_RESET_SYNC 13
#define SIGST_QUIESCED 14
#define SIGST_QUIESCE_INPROGRESS 15
#define SIGST_RESUME_INPROGRESS 16
#define SIGST_INIT 17
#define SIGST_LOADING 18
#define SIGSUBST_NULL 0
#define SIGSUBST_HALT 1
#define SIGSUBST_ENVIRON 2
#define SIGSUBST_REBOOT 3
#define SIGSUBST_PANIC 4
#define SIGSUBST_PANIC_CONT 5
#define SIGSUBST_HUNG 6
#define SIGSUBST_WATCH 7
#define SIGSUBST_PANIC_REBOOT 8
#define SIGSUBST_ERROR_RESET_REBOOT 9
#define SIGSUBST_OBP_RESET 10
#define SIGSUBST_DEBUG 11
#define SIGSUBST_DUMP 12
#define SIGSUBST_FAILED 13
#ifdef _KERNEL
#define CPU_SIGNATURE(sig, state, sub_state, cpuid) \
{ \
if (cpu_sgn_func) \
(*cpu_sgn_func)((sig), (state), (sub_state), (cpuid)); \
}
extern void (*cpu_sgn_func)(ushort_t, uchar_t, uchar_t, int);
#endif
#ifdef __cplusplus
}
#endif
#endif