1 /*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University 7 * and Ralph Campbell. 8 * 9 * %sccs.include.redist.c% 10 * 11 * @(#)turbochannel.h 8.1 (Berkeley) 06/10/93 12 */ 13 14 /* 15 * Mach Operating System 16 * Copyright (c) 1991,1990,1989 Carnegie Mellon University 17 * All Rights Reserved. 18 * 19 * Permission to use, copy, modify and distribute this software and 20 * its documentation is hereby granted, provided that both the copyright 21 * notice and this permission notice appear in all copies of the 22 * software, derivative works or modified versions, and any portions 23 * thereof, and that both notices appear in supporting documentation. 24 * 25 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 26 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 27 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 28 * 29 * Carnegie Mellon requests users of this software to return to 30 * 31 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 32 * School of Computer Science 33 * Carnegie Mellon University 34 * Pittsburgh PA 15213-3890 35 * 36 * any improvements or extensions that they make and grant Carnegie the 37 * rights to redistribute these changes. 38 */ 39 40 /* 41 * Created, from the DEC specs: 42 * "TURBOchannel Hardware Specification" 43 * EK-369AA-OD-005, Version 005, July 1990 44 * 45 * File: tc.h 46 * Author: Alessandro Forin, Carnegie Mellon University 47 * Date: 9/90 48 * 49 * Definitions for the TURBOchannel BUS. 50 */ 51 52 /* 53 * Max conceivable number of slots on the TC 54 */ 55 #define TC_MAX_SLOTS 8 56 #define TC_MAX_LOGICAL_SLOTS 12 57 58 /* 59 * Address map specifications for any TC option 60 * These are offset from the option's base address 61 */ 62 63 #define TC_OFF_ROM 0x000003e0 /* required ROM info */ 64 #define TC_OFF_PROTO_ROM 0x003c03e0 /* 'obsolete' alternate */ 65 66 #define TC_ROM_TEST_DATA_SIZE 16 67 #define TC_ROM_SLEN 4 68 #define TC_ROM_LLEN 8 69 70 typedef struct { 71 unsigned char value; 72 char pad[3]; 73 } tc_padded_char_t; 74 75 typedef struct { 76 tc_padded_char_t rom_width; /* legal: 1 2 4 */ 77 tc_padded_char_t rom_stride; /* legal: 4 */ 78 tc_padded_char_t rom_size; /* legal: 0-255, unit: 8kb */ 79 tc_padded_char_t slot_size; /* legal: 1-128, unit: 4Mb */ 80 unsigned char test_data[TC_ROM_TEST_DATA_SIZE]; 81 /* must always contain: 82 /* x55 x00 xaa xff 83 /* (each byte is repeated 84 /* rom_stride times) */ 85 tc_padded_char_t firmware_rev[TC_ROM_LLEN]; 86 tc_padded_char_t vendor_name[TC_ROM_LLEN]; 87 tc_padded_char_t module_name[TC_ROM_LLEN]; 88 tc_padded_char_t host_firmware_type[TC_ROM_SLEN]; 89 } tc_rommap_t; 90 91 typedef struct { 92 u_char present; /* and do we handle it */ 93 u_char slot_size; /* how many TC slots */ 94 u_char rom_width; /* bytewide or.. */ 95 u_char unit; /* Device unit number */ 96 char module_name[TC_ROM_LLEN+1]; /* ROM name */ 97 char module_id[TC_ROM_LLEN * 2+1]; /* vendor and rev */ 98 u_long k1seg_address; /* TC starting address */ 99 char *driver_name; /* software name */ 100 void (*intr)(); /* interrupt routine */ 101 } tc_option_t; 102 103 104 #ifdef KERNEL 105 extern tc_option_t tc_slot_info[]; 106 107 extern void (*tc_slot_hand_fill) __P((tc_option_t *)); 108 #endif /* KERNEL */ 109