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 (c) 1999-2000 by Sun Microsystems, Inc. 24*7c478bd9Sstevel@tonic-gate * All rights reserved. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_1394_IEEE1212_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_1394_IEEE1212_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 * ieee1212.h 34*7c478bd9Sstevel@tonic-gate * This file contains various defines for config rom entries 35*7c478bd9Sstevel@tonic-gate */ 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 38*7c478bd9Sstevel@tonic-gate extern "C" { 39*7c478bd9Sstevel@tonic-gate #endif 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_CAP_QUAD 2 /* node capability */ 42*7c478bd9Sstevel@tonic-gate #define IEEE1212_ROOT_DIR_QUAD 5 /* root dir quad */ 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gate #define IEEE1212_DIR_LEN(data) (((data) >> 16) & 0xFFFF) 45*7c478bd9Sstevel@tonic-gate #define IEEE1212_DIR_CRC(data) ((uint16_t)((data) & 0xFFFF)) 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate #define CONFIG_ROM_GEN(rom_ptr) \ 48*7c478bd9Sstevel@tonic-gate (((rom_ptr)[IEEE1212_NODE_CAP_QUAD] & 0x000000F0) >> 4) 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gate #define CFGROM_ROOT_DIR(cfgrom) (&(cfgrom)[IEEE1212_ROOT_DIR_QUAD]) 51*7c478bd9Sstevel@tonic-gate #define CFGROM_DIR_LEN(dirptr) (((dirptr)[0] >> 16) & 0xFF) 52*7c478bd9Sstevel@tonic-gate #define CFGROM_TYPE_KEY_VALUE(q, t, k, v) { \ 53*7c478bd9Sstevel@tonic-gate (t) = (((q) & IEEE1212_KEY_TYPE_MASK) >> IEEE1212_KEY_TYPE_SHIFT); \ 54*7c478bd9Sstevel@tonic-gate (k) = (((q) & IEEE1212_KEY_VALUE_MASK) >> IEEE1212_KEY_VALUE_SHIFT); \ 55*7c478bd9Sstevel@tonic-gate (v) = (q) & IEEE1212_ENTRY_VALUE_MASK; \ 56*7c478bd9Sstevel@tonic-gate } 57*7c478bd9Sstevel@tonic-gate 58*7c478bd9Sstevel@tonic-gate /* Key types */ 59*7c478bd9Sstevel@tonic-gate #define IEEE1212_IMMEDIATE_TYPE 0 60*7c478bd9Sstevel@tonic-gate #define IEEE1212_CSR_OFFSET_TYPE 1 61*7c478bd9Sstevel@tonic-gate #define IEEE1212_LEAF_TYPE 2 62*7c478bd9Sstevel@tonic-gate #define IEEE1212_DIRECTORY_TYPE 3 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate /* Key values */ 65*7c478bd9Sstevel@tonic-gate #define IEEE1212_TEXTUAL_DESCRIPTOR 0x01 66*7c478bd9Sstevel@tonic-gate #define IEEE1212_BUS_DEPENDENT_INFO 0x02 67*7c478bd9Sstevel@tonic-gate #define IEEE1212_MODULE_VENDOR_ID 0x03 68*7c478bd9Sstevel@tonic-gate #define IEEE1212_MODULE_HW_VERSION 0x04 69*7c478bd9Sstevel@tonic-gate #define IEEE1212_MODULE_SPEC_ID 0x05 70*7c478bd9Sstevel@tonic-gate #define IEEE1212_MODULE_SW_VERSION 0x06 71*7c478bd9Sstevel@tonic-gate #define IEEE1212_MODULE_DEPENDENT_INFO 0x07 72*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_VENDOR_ID 0x08 73*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_HW_VERSION 0x09 74*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_SPEC_ID 0x0A 75*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_SW_VERSION 0x0B 76*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_CAPABILITIES 0x0C 77*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_UNIQUE_ID 0x0D 78*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_UNITS_EXTENT 0x0E 79*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_MEMORY_EXTENT 0x0F 80*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_DEPENDENT_INFO 0x10 81*7c478bd9Sstevel@tonic-gate #define IEEE1212_UNIT_DIRECTORY 0x11 82*7c478bd9Sstevel@tonic-gate #define IEEE1212_UNIT_SPEC_ID 0x12 83*7c478bd9Sstevel@tonic-gate #define IEEE1212_UNIT_SW_VERSION 0x13 84*7c478bd9Sstevel@tonic-gate #define IEEE1212_UNIT_DEPENDENT_INFO 0x14 85*7c478bd9Sstevel@tonic-gate #define IEEE1212_UNIT_LOCATION 0x15 86*7c478bd9Sstevel@tonic-gate #define IEEE1212_UNIT_POLL_MASK 0x16 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gate #define IEEE1212_KEY_TYPE_MASK 0xC0000000 89*7c478bd9Sstevel@tonic-gate #define IEEE1212_KEY_TYPE_SHIFT 30 90*7c478bd9Sstevel@tonic-gate #define IEEE1212_KEY_VALUE_MASK 0x3F000000 91*7c478bd9Sstevel@tonic-gate #define IEEE1212_KEY_VALUE_SHIFT 24 92*7c478bd9Sstevel@tonic-gate #define IEEE1212_ENTRY_VALUE_MASK 0x00FFFFFF 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate #define IEEE1212_NODE_CAPABILITIES_MASK 0x0000FFFF 95*7c478bd9Sstevel@tonic-gate 96*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 97*7c478bd9Sstevel@tonic-gate } 98*7c478bd9Sstevel@tonic-gate #endif 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate #endif /* _SYS_1394_IEEE1212_H */ 101