xref: /original-bsd/sys/pmax/pmax/turbochannel.h (revision f6a299d4)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * 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	7.1 (Berkeley) 03/01/92
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  * Address map specifications for any TC option
54  * These are offset from the option's base address
55  */
56 
57 #define TC_OFF_ROM		0x000003e0	/* required ROM info */
58 #define TC_OFF_PROTO_ROM	0x003c03e0	/* 'obsolete' alternate */
59 
60 #define TC_ROM_TEST_DATA_SIZE	16
61 #define TC_ROM_SLEN		4
62 #define TC_ROM_LLEN		8
63 
64 typedef struct {
65 	unsigned char	value;
66 	char		pad[3];
67 } tc_padded_char_t;
68 
69 typedef struct {
70 	tc_padded_char_t	rom_width;	/* legal: 1 2 4 */
71 	tc_padded_char_t	rom_stride;	/* legal: 4 */
72 	tc_padded_char_t	rom_size;	/* legal: 0-255, unit: 8kb */
73 	tc_padded_char_t	slot_size;	/* legal: 1-128, unit: 4Mb */
74 	unsigned char		test_data[TC_ROM_TEST_DATA_SIZE];
75 						/* must always contain:
76 						/* x55 x00 xaa xff
77 						/* (each byte is repeated
78 						/*  rom_stride times) */
79 	tc_padded_char_t	firmware_rev[TC_ROM_LLEN];
80 	tc_padded_char_t	vendor_name[TC_ROM_LLEN];
81 	tc_padded_char_t	module_name[TC_ROM_LLEN];
82 	tc_padded_char_t	host_firmware_type[TC_ROM_SLEN];
83 } tc_rommap_t;
84 
85 typedef struct {
86 	u_char	present;			/* and do we handle it */
87 	u_char	slot_size;			/* how many TC slots */
88 	u_char	rom_width;			/* bytewide or.. */
89 	char	module_name[TC_ROM_LLEN+1];	/* ROM name */
90 	char	module_id[TC_ROM_LLEN * 2+1];	/* vendor and rev */
91 	caddr_t	module_address;			/* TC starting address */
92 } tc_option_t;
93 
94 
95 #ifdef KERNEL
96 extern	tc_option_t	tc_slot_info[];
97 
98 extern	void (*tc_slot_hand_fill) __P((tc_option_t *));
99 #endif KERNEL
100