1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_SBP2_DEFS_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_SBP2_DEFS_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate /* 33*7c478bd9Sstevel@tonic-gate * Serial Bus Protocol 2 (SBP-2) definitions 34*7c478bd9Sstevel@tonic-gate * 35*7c478bd9Sstevel@tonic-gate * References are to ANSI NCITS 325-1998 unless specified otherwise 36*7c478bd9Sstevel@tonic-gate */ 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #include <sys/sbp2/common.h> 39*7c478bd9Sstevel@tonic-gate #include <sys/note.h> 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 42*7c478bd9Sstevel@tonic-gate extern "C" { 43*7c478bd9Sstevel@tonic-gate #endif 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate /* 46*7c478bd9Sstevel@tonic-gate * Operation request blocks (ORB's) 47*7c478bd9Sstevel@tonic-gate * Note that the targets specify the minimum ORB size (ref: 7.8.4) 48*7c478bd9Sstevel@tonic-gate * 49*7c478bd9Sstevel@tonic-gate * dummy ORB (ref: 5.1.1) 50*7c478bd9Sstevel@tonic-gate */ 51*7c478bd9Sstevel@tonic-gate typedef struct sbp2_dummy_orb { 52*7c478bd9Sstevel@tonic-gate sbp2_orbp_t do_next_orb; /* next ORB pointer */ 53*7c478bd9Sstevel@tonic-gate uint32_t do_ignored1[2]; /* ignored */ 54*7c478bd9Sstevel@tonic-gate uint16_t do_params; /* parameters */ 55*7c478bd9Sstevel@tonic-gate uint16_t do_ignored2; /* ignored */ 56*7c478bd9Sstevel@tonic-gate } sbp2_dummy_orb_t; 57*7c478bd9Sstevel@tonic-gate 58*7c478bd9Sstevel@tonic-gate /* parameters */ 59*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_NOTIFY 0x8000 /* notify bit */ 60*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_RQ_FMT 0x6000 /* ORB format */ 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate /* ORB formats */ 63*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_RQ_FMT_SBP2 0x0000 /* SBP2 ORB */ 64*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_RQ_FMT_DUMMY 0x6000 /* dummy (NOP) ORB */ 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate /* command block ORB (ref: 5.1.2) */ 67*7c478bd9Sstevel@tonic-gate typedef struct sbp2_cmd_orb { 68*7c478bd9Sstevel@tonic-gate sbp2_orbp_t co_next_orb; /* next ORB pointer */ 69*7c478bd9Sstevel@tonic-gate uint32_t co_data_descr[2]; /* data descriptor */ 70*7c478bd9Sstevel@tonic-gate uint16_t co_params; /* parameters */ 71*7c478bd9Sstevel@tonic-gate uint16_t co_data_size; /* data size */ 72*7c478bd9Sstevel@tonic-gate } sbp2_cmd_orb_t; 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gate /* request */ 75*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_DIR 0x0800 76*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD 0x0700 77*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_SHIFT 8 78*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_MAX_PAYLOAD 0x00F0 79*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_MAX_PAYLOAD_SHIFT 4 80*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_PT 0x0008 81*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_PSZ 0x0007 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate /* speeds */ 84*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_S100 0x0000 85*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_S200 0x0100 86*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_S400 0x0200 87*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_S800 0x0300 88*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_S1600 0x0400 89*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_CMD_SPD_S3200 0x0500 90*7c478bd9Sstevel@tonic-gate 91*7c478bd9Sstevel@tonic-gate /* management ORB (ref: 5.1.3) */ 92*7c478bd9Sstevel@tonic-gate typedef struct sbp2_mgt_orb { 93*7c478bd9Sstevel@tonic-gate uint32_t mo_fdep1[4]; /* function-dependent */ 94*7c478bd9Sstevel@tonic-gate uint16_t mo_params; /* parameters */ 95*7c478bd9Sstevel@tonic-gate uint16_t mo_fdep2; /* function-dependent */ 96*7c478bd9Sstevel@tonic-gate uint32_t mo_fdep3; /* function-dependent */ 97*7c478bd9Sstevel@tonic-gate sbp2_addr_t mo_status_fifo; /* status FIFO address */ 98*7c478bd9Sstevel@tonic-gate } sbp2_mgt_orb_t; 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate /* parameters */ 101*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC 0x000F /* mgt function */ 102*7c478bd9Sstevel@tonic-gate 103*7c478bd9Sstevel@tonic-gate /* mgt functions */ 104*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_LOGIN 0x0000 105*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_QUERY_LOGINS 0x0001 106*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_RECONNECT 0x0003 107*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_SET_PASSWORD 0x0004 108*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_LOGOUT 0x0007 109*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_ABORT_TASK 0x000B 110*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_ABORT_TASK_SET 0x000C 111*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_LUN_RESET 0x000E 112*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_MGT_FUNC_TARGET_RESET 0x000F 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate /* login ORB (ref: 5.1.3.1) */ 115*7c478bd9Sstevel@tonic-gate typedef struct sbp2_login_orb { 116*7c478bd9Sstevel@tonic-gate sbp2_addr_t lo_passwd; /* password */ 117*7c478bd9Sstevel@tonic-gate sbp2_addr_t lo_resp; /* response */ 118*7c478bd9Sstevel@tonic-gate uint16_t lo_params; /* parameters */ 119*7c478bd9Sstevel@tonic-gate uint16_t lo_lun; /* lun */ 120*7c478bd9Sstevel@tonic-gate uint16_t lo_passwd_len; /* password length */ 121*7c478bd9Sstevel@tonic-gate uint16_t lo_resp_len; /* response length */ 122*7c478bd9Sstevel@tonic-gate sbp2_addr_t lo_status_fifo; /* status FIFO address */ 123*7c478bd9Sstevel@tonic-gate } sbp2_login_orb_t; 124*7c478bd9Sstevel@tonic-gate 125*7c478bd9Sstevel@tonic-gate /* parameters */ 126*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_LOGIN_EXCL 0x1000 127*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_LOGIN_RECONNECT 0x00F0 128*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_LOGIN_RECONNECT_SHIFT 4 129*7c478bd9Sstevel@tonic-gate 130*7c478bd9Sstevel@tonic-gate /* login response */ 131*7c478bd9Sstevel@tonic-gate typedef struct sbp2_login_resp { 132*7c478bd9Sstevel@tonic-gate uint16_t lr_len; /* login length */ 133*7c478bd9Sstevel@tonic-gate uint16_t lr_login_id; /* login ID */ 134*7c478bd9Sstevel@tonic-gate sbp2_addr_t lr_cmd_agent; /* command block agent address */ 135*7c478bd9Sstevel@tonic-gate uint16_t lr_reserved; /* reserved */ 136*7c478bd9Sstevel@tonic-gate uint16_t lr_reconnect_hold; /* reconnect hold */ 137*7c478bd9Sstevel@tonic-gate } sbp2_login_resp_t; 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gate /* query logins ORB (ref: 5.1.3.2) */ 140*7c478bd9Sstevel@tonic-gate typedef struct sbp2_qlogins_orb { 141*7c478bd9Sstevel@tonic-gate uint32_t qo_reserved1[2]; /* reserved */ 142*7c478bd9Sstevel@tonic-gate sbp2_addr_t qo_resp; /* query response address */ 143*7c478bd9Sstevel@tonic-gate uint16_t qo_params; /* parameters */ 144*7c478bd9Sstevel@tonic-gate uint16_t qo_lun; /* LUN */ 145*7c478bd9Sstevel@tonic-gate uint16_t qo_reserved2; /* reserved */ 146*7c478bd9Sstevel@tonic-gate uint16_t qo_len; /* lengths */ 147*7c478bd9Sstevel@tonic-gate sbp2_addr_t qo_status_fifo; /* status FIFO address */ 148*7c478bd9Sstevel@tonic-gate } sbp2_qlogins_orb_t; 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate /* reconnect ORB (ref: 5.1.3.3) */ 151*7c478bd9Sstevel@tonic-gate typedef struct sbp2_reconnect_orb { 152*7c478bd9Sstevel@tonic-gate uint32_t ro_reserved1[4]; /* reserved */ 153*7c478bd9Sstevel@tonic-gate uint16_t ro_params; /* parameters */ 154*7c478bd9Sstevel@tonic-gate uint16_t ro_login_id; /* login ID */ 155*7c478bd9Sstevel@tonic-gate uint32_t ro_reserved2; /* reserved */ 156*7c478bd9Sstevel@tonic-gate sbp2_addr_t ro_status_fifo; /* status FIFO address */ 157*7c478bd9Sstevel@tonic-gate } sbp2_reconnect_orb_t; 158*7c478bd9Sstevel@tonic-gate 159*7c478bd9Sstevel@tonic-gate /* logout ORB (ref: 5.1.3.4) */ 160*7c478bd9Sstevel@tonic-gate typedef struct sbp2_logout_orb { 161*7c478bd9Sstevel@tonic-gate uint32_t lo_reserved1[4]; /* reserved */ 162*7c478bd9Sstevel@tonic-gate uint16_t lo_params; /* parameters */ 163*7c478bd9Sstevel@tonic-gate uint16_t lo_login_id; /* login ID */ 164*7c478bd9Sstevel@tonic-gate uint32_t lo_reserved2; /* reserved */ 165*7c478bd9Sstevel@tonic-gate sbp2_addr_t lo_status_fifo; /* status FIFO address */ 166*7c478bd9Sstevel@tonic-gate } sbp2_logout_orb_t; 167*7c478bd9Sstevel@tonic-gate 168*7c478bd9Sstevel@tonic-gate /* task management ORB (ref: 5.1.3.5) */ 169*7c478bd9Sstevel@tonic-gate typedef struct sbp2_task_mgt_orb { 170*7c478bd9Sstevel@tonic-gate sbp2_orbp_t to_orb; /* task pointer */ 171*7c478bd9Sstevel@tonic-gate uint32_t to_reserved1[2]; /* reserved */ 172*7c478bd9Sstevel@tonic-gate uint16_t to_params; /* parameters */ 173*7c478bd9Sstevel@tonic-gate uint16_t to_login_id; /* login ID */ 174*7c478bd9Sstevel@tonic-gate uint32_t to_reserved; /* reserved */ 175*7c478bd9Sstevel@tonic-gate sbp2_addr_t to_status_fifo; /* status FIFO address */ 176*7c478bd9Sstevel@tonic-gate } sbp2_task_mgt_orb_t; 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate /* status block (ref: 5.3) */ 179*7c478bd9Sstevel@tonic-gate typedef struct sbp2_status { 180*7c478bd9Sstevel@tonic-gate uint8_t st_param; /* parameters */ 181*7c478bd9Sstevel@tonic-gate uint8_t st_sbp_status; /* SBP status */ 182*7c478bd9Sstevel@tonic-gate uint16_t st_orb_offset_hi; /* ORB offset hi */ 183*7c478bd9Sstevel@tonic-gate uint32_t st_orb_offset_lo; /* ORB offset lo */ 184*7c478bd9Sstevel@tonic-gate uint32_t st_data[6]; /* command set-dependent data */ 185*7c478bd9Sstevel@tonic-gate } sbp2_status_t; 186*7c478bd9Sstevel@tonic-gate 187*7c478bd9Sstevel@tonic-gate /* parameters */ 188*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SRC 0xC0 189*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SRC_SHIFT 6 190*7c478bd9Sstevel@tonic-gate #define SBP2_ST_RESP 0x30 191*7c478bd9Sstevel@tonic-gate #define SBP2_ST_RESP_SHIFT 4 192*7c478bd9Sstevel@tonic-gate #define SBP2_ST_DEAD 0x08 193*7c478bd9Sstevel@tonic-gate #define SBP2_ST_LEN 0x07 194*7c478bd9Sstevel@tonic-gate 195*7c478bd9Sstevel@tonic-gate /* status origins */ 196*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SRC_ORB 0x00 197*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SRC_ORB_NULL 0x40 198*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SRC_UNSOLICITED 0x80 199*7c478bd9Sstevel@tonic-gate 200*7c478bd9Sstevel@tonic-gate /* response status */ 201*7c478bd9Sstevel@tonic-gate #define SBP2_ST_RESP_COMPLETE 0x00 /* REQUEST COMPLETE */ 202*7c478bd9Sstevel@tonic-gate #define SBP2_ST_RESP_TRANFAIL 0x10 /* TRANSPORT FAILURE */ 203*7c478bd9Sstevel@tonic-gate #define SBP2_ST_RESP_ILLREQ 0x20 /* ILLEGAL REQUEST */ 204*7c478bd9Sstevel@tonic-gate #define SBP2_ST_RESP_VENDOR 0x30 /* VENDOR DEPENDENT */ 205*7c478bd9Sstevel@tonic-gate 206*7c478bd9Sstevel@tonic-gate /* SBP status, when response status is REQUEST COMPLETE */ 207*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_NOINFO 0x00 /* no additional info */ 208*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_REQ_TYPE 0x01 /* req type not supported */ 209*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_SPD 0x02 /* speed not supported */ 210*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_PSZ 0x03 /* page size not supported */ 211*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ACCESS 0x04 /* access denied */ 212*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_LUN 0x05 /* LUN not supported */ 213*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_PAYLOAD 0x06 /* max payload too small */ 214*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_RSRC 0x08 /* resources unavailable */ 215*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_FUNC 0x09 /* function rejected */ 216*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_LOGIN_ID 0x0A /* login ID not recognized */ 217*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_DUMMY_ORB 0x0B /* dummy ORB completed */ 218*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_REQ_ABORT 0x0C /* request aborted */ 219*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_UNSPEC 0xFF /* unspecified error */ 220*7c478bd9Sstevel@tonic-gate 221*7c478bd9Sstevel@tonic-gate /* SBP status, when response status is TRANSPORT FAILURE */ 222*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_OBJ 0xC0 /* failed object */ 223*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR 0x0F /* serial bus error */ 224*7c478bd9Sstevel@tonic-gate 225*7c478bd9Sstevel@tonic-gate /* objects */ 226*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_OBJ_ORB 0x00 /* ORB */ 227*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_OBJ_DATA 0x40 /* data buffer */ 228*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_OBJ_PT 0x80 /* page table */ 229*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_OBJ_UNSPEC 0xC0 /* unable to specify */ 230*7c478bd9Sstevel@tonic-gate 231*7c478bd9Sstevel@tonic-gate /* serial bus errors */ 232*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_ACK 0x00 /* missing ackknowledge */ 233*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_TIMEOUT 0x02 /* time-out error */ 234*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_ACK_BUSY_X 0x04 /* ack_busy_X */ 235*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_ACK_BUSY_A 0x05 /* ack_busy_A */ 236*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_ACK_BUSY_B 0x06 /* ack_busy_B */ 237*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_TARDY 0x0B /* tardy limit exceeded */ 238*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_CONFLICT 0x0C /* conflict error */ 239*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_DATA 0x0D /* data error */ 240*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_TYPE 0x0E /* type error */ 241*7c478bd9Sstevel@tonic-gate #define SBP2_ST_SBP_ERR_ADDR 0x0F /* address error */ 242*7c478bd9Sstevel@tonic-gate 243*7c478bd9Sstevel@tonic-gate 244*7c478bd9Sstevel@tonic-gate /* command block agent registers (ref: 6.4) */ 245*7c478bd9Sstevel@tonic-gate #define SBP2_AGENT_STATE_OFFSET 0x00 246*7c478bd9Sstevel@tonic-gate #define SBP2_AGENT_RESET_OFFSET 0x04 247*7c478bd9Sstevel@tonic-gate #define SBP2_ORB_POINTER_OFFSET 0x08 248*7c478bd9Sstevel@tonic-gate #define SBP2_DOORBELL_OFFSET 0x10 249*7c478bd9Sstevel@tonic-gate #define SBP2_UNSOLICITED_STATUS_ENABLE_OFFSET 0x14 250*7c478bd9Sstevel@tonic-gate 251*7c478bd9Sstevel@tonic-gate /* agent states */ 252*7c478bd9Sstevel@tonic-gate #define SBP2_AGENT_STATE_RESET 0 253*7c478bd9Sstevel@tonic-gate #define SBP2_AGENT_STATE_ACTIVE 1 254*7c478bd9Sstevel@tonic-gate #define SBP2_AGENT_STATE_SUSPENDED 2 255*7c478bd9Sstevel@tonic-gate #define SBP2_AGENT_STATE_DEAD 3 256*7c478bd9Sstevel@tonic-gate 257*7c478bd9Sstevel@tonic-gate /* page table parameters */ 258*7c478bd9Sstevel@tonic-gate #define SBP2_PT_ENT_SIZE 8 /* table entry size */ 259*7c478bd9Sstevel@tonic-gate #define SBP2_PT_SEGSIZE_MAX (65536 - 8) /* max segment size */ 260*7c478bd9Sstevel@tonic-gate 261*7c478bd9Sstevel@tonic-gate /* page table element for unrestricted page table (ref: 5.2.1) */ 262*7c478bd9Sstevel@tonic-gate typedef struct sbp2_pt_unrestricted { 263*7c478bd9Sstevel@tonic-gate uint16_t pt_seg_len; /* segment length */ 264*7c478bd9Sstevel@tonic-gate uint16_t pt_seg_base_hi; /* segment base hi */ 265*7c478bd9Sstevel@tonic-gate uint32_t pt_seg_base_lo; /* segment base lo */ 266*7c478bd9Sstevel@tonic-gate } sbp2_pt_unrestricted_t; 267*7c478bd9Sstevel@tonic-gate 268*7c478bd9Sstevel@tonic-gate /* 269*7c478bd9Sstevel@tonic-gate * Configuration ROM 270*7c478bd9Sstevel@tonic-gate * 271*7c478bd9Sstevel@tonic-gate * key types & values 272*7c478bd9Sstevel@tonic-gate */ 273*7c478bd9Sstevel@tonic-gate #define SBP2_KT_MGT_AGENT 1 274*7c478bd9Sstevel@tonic-gate #define SBP2_KV_MGT_AGENT 0x14 275*7c478bd9Sstevel@tonic-gate #define SBP2_KT_LUN 0 276*7c478bd9Sstevel@tonic-gate #define SBP2_KV_LUN 0x14 277*7c478bd9Sstevel@tonic-gate #define SBP2_KT_UNCHAR 0 278*7c478bd9Sstevel@tonic-gate #define SBP2_KV_UNCHAR 0x3A 279*7c478bd9Sstevel@tonic-gate 280*7c478bd9Sstevel@tonic-gate /* Logical_Unit_Number */ 281*7c478bd9Sstevel@tonic-gate #define SBP2_LUN_TYPE 0x001F0000 /* device_type */ 282*7c478bd9Sstevel@tonic-gate #define SBP2_LUN_TYPE_SHIFT 16 283*7c478bd9Sstevel@tonic-gate #define SBP2_LUN_NUM 0x0000FFFF /* lun */ 284*7c478bd9Sstevel@tonic-gate 285*7c478bd9Sstevel@tonic-gate /* Unit_Characteristics */ 286*7c478bd9Sstevel@tonic-gate #define SBP2_UNCHAR_MOT 0x0000FF00 /* mgt_ORB_timeout */ 287*7c478bd9Sstevel@tonic-gate #define SBP2_UNCHAR_MOT_SHIFT 8 288*7c478bd9Sstevel@tonic-gate #define SBP2_UNCHAR_ORB_SIZE 0x000000FF /* ORB_size */ 289*7c478bd9Sstevel@tonic-gate 290*7c478bd9Sstevel@tonic-gate 291*7c478bd9Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("unique per ORB", { sbp2_dummy_orb sbp2_cmd_orb 292*7c478bd9Sstevel@tonic-gate sbp2_mgt_orb sbp2_login_orb sbp2_login_resp sbp2_qlogins_orb 293*7c478bd9Sstevel@tonic-gate sbp2_reconnect_orb sbp2_logout_orb sbp2_task_mgt_orb sbp2_status 294*7c478bd9Sstevel@tonic-gate sbp2_pt_unrestricted })) 295*7c478bd9Sstevel@tonic-gate 296*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 297*7c478bd9Sstevel@tonic-gate } 298*7c478bd9Sstevel@tonic-gate #endif 299*7c478bd9Sstevel@tonic-gate 300*7c478bd9Sstevel@tonic-gate #endif /* _SYS_SBP2_DEFS_H */ 301