#ifndef _SYS_BOFI_H
#define _SYS_BOFI_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/feature_tests.h>
#define BOFI_ADD_DEF 0
#define BOFI_DEL_DEF 1
#define BOFI_START 2
#define BOFI_STOP 3
#define BOFI_CHK_STATE 8
#define BOFI_CHK_STATE_W 9
#define BOFI_BROADCAST 10
#define BOFI_CLEAR_ACC_CHK 11
#define BOFI_CLEAR_ERRORS 12
#define BOFI_CLEAR_ERRDEFS 13
#define BOFI_GET_HANDLES 16
#define BOFI_GET_HANDLE_INFO 17
#define NAMESIZE 256
#define ERRMSGSIZE 256
struct acc_log_elem {
hrtime_t access_time;
uint_t access_type;
uint_t _pad;
offset_t offset;
uint64_t value;
uint32_t size;
uint32_t repcount;
};
#define BOFI_LOG_REPIO 0x1
#define BOFI_LOG_WRAP 0x2
#define BOFI_LOG_FULL 0x4
#define BOFI_LOG_TIMESTAMP 0x8
struct acc_log {
uint32_t logsize;
uint32_t entries;
uint_t flags;
uint_t wrapcnt;
hrtime_t start_time;
hrtime_t stop_time;
caddr_t logbase;
};
#if defined(_SYSCALL32)
#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
#pragma pack(4)
#endif
struct acc_log32 {
uint32_t logsize;
uint32_t entries;
uint_t flags;
uint_t wrapcnt;
hrtime_t start_time;
hrtime_t stop_time;
caddr32_t logbase;
};
#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
#pragma pack()
#endif
#endif
struct bofi_errdef {
uint_t namesize;
char name[NAMESIZE];
int instance;
int rnumber;
offset_t offset;
offset_t len;
uint_t access_type;
uint_t access_count;
uint_t fail_count;
uint_t acc_chk;
uint_t optype;
uint64_t operand;
struct acc_log log;
uint64_t errdef_handle;
};
#if defined(_SYSCALL32)
#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
#pragma pack(4)
#endif
struct bofi_errdef32 {
uint_t namesize;
char name[NAMESIZE];
int instance;
int rnumber;
offset_t offset;
offset_t len;
uint_t access_type;
uint_t access_count;
uint_t fail_count;
uint_t acc_chk;
uint_t optype;
uint64_t operand;
struct acc_log32 log;
uint64_t errdef_handle;
};
#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
#pragma pack()
#endif
#endif
struct bofi_errctl {
uint_t namesize;
char name[NAMESIZE];
int instance;
};
struct bofi_get_handles {
uint_t namesize;
char name[NAMESIZE];
int instance;
int count;
caddr_t buffer;
};
#if defined(_SYSCALL32)
struct bofi_get_handles32 {
uint_t namesize;
char name[NAMESIZE];
int instance;
int count;
caddr32_t buffer;
};
#endif
struct handle_info {
int instance;
uint_t access_type;
int rnumber;
int _pad;
offset_t len;
offset_t offset;
uint64_t addr_cookie;
};
struct bofi_get_hdl_info {
uint_t namesize;
char name[NAMESIZE];
int count;
caddr_t hdli;
};
#if defined(_SYSCALL32)
struct bofi_get_hdl_info32 {
uint_t namesize;
char name[NAMESIZE];
int count;
caddr32_t hdli;
};
#endif
#define BOFI_EQUAL 0
#define BOFI_AND 1
#define BOFI_OR 2
#define BOFI_XOR 3
#define BOFI_NO_TRANSFER 4
#define BOFI_DELAY_INTR 5
#define BOFI_LOSE_INTR 6
#define BOFI_EXTRA_INTR 7
#define BOFI_NOP 16
#define BOFI_PIO_R 1
#define BOFI_PIO_W 2
#define BOFI_PIO_RW (BOFI_PIO_R|BOFI_PIO_W)
#define BOFI_DMA_R 4
#define BOFI_DMA_W 8
#define BOFI_DMA_RW (BOFI_DMA_R|BOFI_DMA_W)
#define BOFI_INTR 64
#define BOFI_LOG 128
struct bofi_errstate {
hrtime_t fail_time;
hrtime_t msg_time;
uint_t access_count;
uint_t fail_count;
uint_t acc_chk;
uint_t errmsg_count;
char buffer[ERRMSGSIZE];
ddi_fault_impact_t severity;
struct acc_log log;
uint64_t errdef_handle;
};
#if defined(_SYSCALL32)
#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
#pragma pack(4)
#endif
struct bofi_errstate32 {
hrtime_t fail_time;
hrtime_t msg_time;
uint_t access_count;
uint_t fail_count;
uint_t acc_chk;
uint_t errmsg_count;
char buffer[ERRMSGSIZE];
ddi_fault_impact_t severity;
struct acc_log32 log;
uint64_t errdef_handle;
};
#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
#pragma pack()
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif