# 2.11BSD#431 - /usr/src/sys/h/uba.h

##### Macros

    BUF_UBADDR        X
    UBMAP             X
    UBPAGE            X
    btoub             X
    nubreg            X
    pointubreg        X
    setubregno        X

##### struct's

    ubmap             X
    ubmeter           X

       1: /*
       2:  * Copyright (c) 1986 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)uba.h	1.2 (2.11BSD GTE) 1/3/93
       7:  */
       8:
       9: /*
      10:  *	Structure to access UNIBUS map registers.
      11:  */
      12:
      13: struct  ubmap   {
      14:     short   ub_lo;
      15:     short   ub_hi;
      16: };
      17:
      18: #ifdef UCB_METER
      19: /*
      20:  *	Structure for metering mapalloc performance.
      21:  */
      22: struct  ubmeter {
      23:     long    ub_calls;   /* total # of calls to mapalloc */
      24:     long    ub_remaps;  /* total # of buffer remappings */
      25:     long    ub_fails;   /* total # of allocation failures */
      26:     long    ub_pages;   /* total # of pages allocated */
      27: };
      28: #endif
      29:
      30: #define UBMAP   ((struct ubmap *) 0170200)
      31: #define UBPAGE  020000          /* size of UNIBUS map segment */
      32:
      33: /*
      34:  *	BUF_UBADDR is the UNIBUS address of buffers
      35:  *	if we have a UNIBUS map, as distinguished from bpaddr,
      36:  *	which is the physical address in clicks.
      37:  */
      38: #define BUF_UBADDR  020000
      39:
      40: /*
      41:  *	Bytes to UNIBUS pages.
      42:  */
      43: #define btoub(b)    ((((long)(b)) + ((long)(UBPAGE - 1))) / ((long)UBPAGE))
      44:
      45: /*
      46:  *	Number of UNIBUS registers required by n objects of size s.
      47:  */
      48: #define nubreg(n,s) (((long) (n) * (long) (s) +     \
      49:             ((long) (UBPAGE - 1))) / (long) UBPAGE)
      50:
      51: /*
      52:  *	Set UNIBUS register r to point at physical address p (in bytes).
      53:  */
      54: #define setubregno(r,p) {                   \
      55:                 UBMAP[r].ub_lo  = loint(p); \
      56:                 UBMAP[r].ub_hi  = hiint(p); \
      57:             }
      58:
      59: /*
      60:  *	Point the appropriate UNIBUS register at a kernel
      61:  *	virtual data address (in clicks).  V must be less
      62:  *	than btoc(248K).
      63:  */
      64: #define pointubreg(v,sep)   {   ubadr_t x; \
      65:                     short   regno; \
      66:                     regno   = ((v) >> 7) & 037; \
      67:                     x   = (ubadr_t) (v) & ~01; \
      68:                     UBMAP[regno].ub_lo  = loint (x); \
      69:                     UBMAP[regno].ub_hi  = hiint (x); \
      70:                 }
      71:
      72: #ifdef KERNEL
      73: extern  short   ubmap;          /* Do we have UNIBUS registers? */
      74: extern  memaddr bpaddr;         /* physical click-address of buffers */
      75: extern  struct map  ub_map[];
      76: extern  int ub_wantmr;
      77: #endif

#### Defined struct's

ubmap defined in line 13; used 26 times

- in /usr/src/sys/pdp/machdep.c line 179(2)
- in /usr/src/sys/pdp/machdep2.c line 319(2)
- in /usr/src/sys/pdpif/if_uba.c line 175(2)
- in /usr/src/sys/pdpuba/br.c line 377(2)
- in /usr/src/sys/pdpuba/hk.c line 698(2), 823(2)
- in /usr/src/sys/pdpuba/ra.c line 1256(2)
- in /usr/src/sys/pdpuba/rl.c line 619(2)
- in /usr/src/sys/pdpuba/si.c line 418(2)
- in /usr/src/sys/pdpuba/tmscpdump.c line 43(2)
- in /usr/src/sys/pdpuba/xp.c line 813(2), 962(2)
- in /usr/src/sys/sys/sys_net.c line 139(2)

ubmeter defined in line 22; used 2 times

- in /usr/src/sys/pdp/machdep.c line 168(2)

#### Defined macros

BUF_UBADDR defined in line 38; used 4 times

- in /usr/src/sys/pdp/machdep.c line 201, 267
- in /usr/src/sys/pdp/machdep2.c line 338(2)

UBMAP defined in line 30; used 19 times

- in line 55-56(2), 68-69(2)
- in /usr/src/sys/pdp/machdep.c line 225
- in /usr/src/sys/pdp/machdep2.c line 364
- in /usr/src/sys/pdpif/if_uba.c line 197
- in /usr/src/sys/pdpuba/br.c line 394
- in /usr/src/sys/pdpuba/hk.c line 731, 836
- in /usr/src/sys/pdpuba/ra.c line 1283, 1329
- in /usr/src/sys/pdpuba/rl.c line 648
- in /usr/src/sys/pdpuba/si.c line 434
- in /usr/src/sys/pdpuba/tmscpdump.c line 55, 91
- in /usr/src/sys/pdpuba/xp.c line 880, 996
- in /usr/src/sys/sys/sys_net.c line 164

UBPAGE defined in line 31; used 12 times

- in line 43(2), 49(2)
- in /usr/src/sys/pdp/machdep.c line 234
- in /usr/src/sys/pdp/machdep2.c line 338-340(3), 370
- in /usr/src/sys/pdpif/if_uba.c line 203
- in /usr/src/sys/pdpuba/hk.c line 690
- in /usr/src/sys/sys/sys_net.c line 170

btoub defined in line 43; used 5 times

- in /usr/src/sys/pdp/machdep.c line 211, 252
- in /usr/src/sys/pdp/machdep2.c line 361
- in /usr/src/sys/pdpif/if_uba.c line 187
- in /usr/src/sys/sys/sys_net.c line 157

nubreg defined in line 48; used 1 times

- in /usr/src/sys/pdp/machdep2.c line 337

pointubreg defined in line 64; never used
setubregno defined in line 54; used 2 times

- in /usr/src/sys/pdp/machdep2.c line 330, 339

#### Usage of this include

uba.h used 22 times

- in /usr/src/sys/pdp/machdep.c line 18
- in /usr/src/sys/pdp/machdep2.c line 23
- in /usr/src/sys/pdpif/if_il.c line 45
- in /usr/src/sys/pdpif/if_uba.c line 24
- in /usr/src/sys/pdpuba/br.c line 52
- in /usr/src/sys/pdpuba/dh.c line 27
- in /usr/src/sys/pdpuba/dhu.c line 34
- in /usr/src/sys/pdpuba/dhv.c line 41
- in /usr/src/sys/pdpuba/hk.c line 42
- in /usr/src/sys/pdpuba/ra.c line 141
- in /usr/src/sys/pdpuba/rk.c line 25
- in /usr/src/sys/pdpuba/rl.c line 55
- in /usr/src/sys/pdpuba/rx.c line 53
- in /usr/src/sys/pdpuba/si.c line 23
- in /usr/src/sys/pdpuba/tm.c line 28
- in /usr/src/sys/pdpuba/tmscp.c line 262
- in /usr/src/sys/pdpuba/tmscpdump.c line 24
- in /usr/src/sys/pdpuba/ts.c line 25
- in /usr/src/sys/pdpuba/xp.c line 31
- in /usr/src/sys/sys/init_main.c line 24
- in /usr/src/sys/sys/sys_net.c line 28
- in /usr/src/sys/sys/ufs_bio.c line 17

Last modified: 1993-01-03 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 585 |