|
|
1.1 root 1: /*
2: * Mach Operating System
3: * Copyright (c) 1991,1990 Carnegie Mellon University
4: * All Rights Reserved.
5: *
6: * Permission to use, copy, modify and distribute this software and its
7: * documentation is hereby granted, provided that both the copyright
8: * notice and this permission notice appear in all copies of the
9: * software, derivative works or modified versions, and any portions
10: * thereof, and that both notices appear in supporting documentation.
11: *
12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15: *
16: * Carnegie Mellon requests users of this software to return to
17: *
18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
22: *
23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26: /*
27: * File: rz.h
28: * Author: Alessandro Forin, Carnegie Mellon University
29: * Date: 9/90
30: *
31: * Mapping between U*x-like indexing and controller+slave
32: * Each controller handles at most 8 slaves, few controllers.
33: */
34:
35: #if 0
36: #define rzcontroller(dev) (((dev)>>6)&0x3)
37: #define rzslave(dev) (((dev)>>3)&0x7)
38: #endif 0
39: #define rzcontroller(dev) (((dev)>>13)&0x3)
40: #define rzslave(dev) (((dev)>>10)&0x7)
41:
42: #if 0
43: #define rzpartition(dev) ((PARTITION_TYPE(dev)==0xf)?MAXPARTITIONS:((dev)&0x7))
44: #endif 0
45: #define rzpartition(dev) ((dev)&0x3ff)
46:
47: /* To address the full 256 luns use upper bits 8..12 */
48: /* NOTE: Under U*x this means the next major up.. what a mess */
49: #define rzlun(dev) (((dev)&0x7) | (((dev)>>5)&0xf8))
50:
51: /* note: whatever this was used for is no longer cared about -- Kevin */
52: #define PARTITION_TYPE(dev) (((dev)>>24)&0xf)
53: #define PARTITION_ABSOLUTE (0xf<<24)
54:
55: #ifdef MACH_KERNEL
56: #else /*MACH_KERNEL*/
57: #define tape_unit(dev) ((((dev)&0xe0)>>3)|((dev)&0x3))
58: #define TAPE_UNIT(dev) ((dev)&(~0xff))|(tape_unit((dev))<<3)
59: #define TAPE_REWINDS(dev) (((dev)&0x1c)==0)||(((dev)&0x1c)==8)
60: #endif /*MACH_KERNEL*/
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.