|
|
1.1 ! root 1: /* ! 2: * addressing stuff for unibus devices ! 3: */ ! 4: ! 5: struct ubaddr { ! 6: long uboff; /* address within unibus space */ ! 7: short vec; /* vector (within unibus) */ ! 8: short ubno; /* unibus number */ ! 9: }; ! 10: ! 11: /* ! 12: * unibus map things ! 13: */ ! 14: ! 15: typedef long ubm_t; /* cookie for a piece of unibus map */ ! 16: typedef long uaddr_t; /* 18-bit unibus or 22-bit q-bus address */ ! 17: ! 18: /* ! 19: * pieces of ubm_t; ! 20: * ubmpath is probably the only one ! 21: * useful outside the unibus code ! 22: * ! 23: * bits 0-12 first reg index; enough for 22 bits of addr space (q-bus) ! 24: * bits 13-19 number of map registers; enough for 64kb transfer ! 25: * number offset by UMSZERO -- alignment page + end sentinel ! 26: * bits 20-23 data path ! 27: */ ! 28: ! 29: #define UMFIRST 0 ! 30: #define UMSIZE 13 ! 31: #define UMSZERO 2 ! 32: #define UMDP 20 ! 33: ! 34: #define ubmfirst(m) (int)((m)&017777) ! 35: #define ubmsize(m) (int)((((m)>>UMSIZE)&0177)+UMSZERO) ! 36: #define ubmpath(m) (int)(((m)>>UMDP)&017) ! 37: ! 38: /* ! 39: * change map m to use path p ! 40: */ ! 41: ! 42: #define ubinspath(p, m) (((m)&~(017<<UMDP))|((p)<<UMDP)) ! 43: ! 44: #define NOMAP ((-1L)<<23) /* this is a phony piece of map */ ! 45: ! 46: /* ! 47: * map flags ! 48: */ ! 49: ! 50: #define UBDP 01 /* want a bdp if possible */ ! 51: #define USLP 02 /* ok to sleep waiting for free map or path */ ! 52: #define UPAG 04 /* transfer is page-aligned; saves a map reg */ ! 53: ! 54: #ifdef KERNEL ! 55: caddr_t ubaddr(); ! 56: ubm_t ubmalloc(); ! 57: uaddr_t ubmaddr(); ! 58: uaddr_t ubmsetmap(); ! 59: ubm_t ubmbuf(), ubmblk(); ! 60: uaddr_t ubadbuf(), ubadrptr(), ubadwptr(); ! 61: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.