⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ubavar.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 2 页
字号:
	int	um_ubinfo;	/* save unibus registers, etc */	struct	buf um_tab;	/* queue of devices for this controller */};/* * Per ``device'' structure. * (A controller has devices or uses and releases buffered data paths). * (Everything else is a ``device''.) * * If a controller has many drives attached, then there will * be several uba_device structures associated with a single uba_ctlr * structure. * * This structure contains all the information necessary to run * a unibus device such as a dz or a dh.  It also contains information * for slaves of unibus controllers as to which device on the slave * this is.  A flags field here can also be given in the system specification * and is used to tell which dz lines are hard wired or other device * specific parameters. */struct uba_device {	struct	uba_driver *ui_driver;	char	*ui_devname;	/* name of the device */	short	ui_unit;	/* unit number on the system */	caddr_t	ui_parent;	int	ui_adpt;	/* which i/o bus it is on */	short	ui_nexus;	/* which nexus on i/o bus */	short	ui_rctlr;	/* remote controller number */	short	ui_ubanum;	/* the uba it is on */#define	ui_vbanum	ui_ubanum	short	ui_ctlr;	/* mass ctlr number; -1 if none */	short	ui_slave;	/* slave on controller */	int	(**ui_intr)();	/* interrupt handler(s) */	caddr_t	ui_addr;	/* address of device in i/o space */	caddr_t	ui_addr2;	/* address of second csr */	short	ui_dk;		/* if init 1 set to number for iostat */	int	ui_flags;	/* parameter from system specification */	int     ui_bus_priority;/* i/o bus priority level */	int     ui_ivnum;       /* first interrupt vector */	int     ui_priority;    /* main bus request level of device */	short	ui_alive;	/* device exists */	short	ui_type;	/* driver specific type information */	caddr_t	ui_physaddr;	/* phys addr, for standalone (dump) code *//* this is the forward link in a list of devices on a controller */	struct	uba_device *ui_forw;/* if the device is connected to a controller, this is the controller */	struct	uba_ctlr *ui_mi;	union {		struct	uba_hd *uba;		struct	vba_hd *vba;	}bus_head;#define	ui_hd		bus_head.uba#define	ui_vbahd	bus_head.vba};#endif/* * Per-driver structure. * * Each unibus driver defines entries for a set of routines * as well as an array of types which are acceptable to it. * These are used at boot time by the configuration program. */struct uba_driver {	int	(*ud_probe)();		/* see if a driver is really there */	int	(*ud_slave)();		/* see if a slave is there */	int	(*ud_attach)();		/* setup driver for a slave */	int	(*ud_dgo)();		/* fill csr/ba to start transfer */	u_short	*ud_addr;		/* device csr addresses */	char	*ud_dname;		/* name of a device */	struct	uba_device **ud_dinfo;	/* backpointers to ubdinit structs */	char	*ud_mname;		/* name of a controller */	struct	uba_ctlr **ud_minfo;	/* backpointers to ubminit structs */	short	ud_xclu;		/* want exclusive use of bdp's */	int	ud_addr1_size;		/* size of first csr area */        int	ud_addr1_atype;	 	/* address space of first csr area */	int	ud_addr2_size;		/* size of second csr area */        int	ud_addr2_atype;	 	/* address space of second csr area */};#endif/* * Flags to UBA map/bdp allocation routines */#define	UBA_NEEDBDP	0x01		/* transfer needs a bdp */#define	UBA_CANTWAIT	0x02		/* don't block me */#define	UBA_NEED16	0x04		/* need 16 bit addresses only */#define	UBA_HAVEBDP	0x08		/* use bdp specified in high bits */#define UBA_MAPANYWAY	0x10		/* map anyway on MicroVAX I *//* * Macros to bust return word from map allocation routines. */#define	UBAI_BDP(i)	((int)(((unsigned)(i))>>28))#define	UBAI_NMR(i)	((int)((i)>>18)&0x3ff)#define	UBAI_MR(i)	((int)((i)>>9)&0x1ff)#define	UBAI_BOFF(i)	((int)((i)&0x1ff))#ifndef LOCORE#ifdef KERNEL/* * UBA related kernel variables */int	numuba;					/* number of uba's *//* * UBA related kernel variables */extern struct	uba_hd uba_hd[];extern int tty_ubinfo[];		     /* allocated unibus map for ttys */ /* * Ubminit and ubdinit initialize the mass storage controller and * device tables specifying possible devices. */extern	struct	uba_ctlr ubminit[];extern	struct	uba_device ubdinit[];/* * UNIbus device address space is mapped by UMEMmap * into virtual address umem[][]. */extern	struct pte UMEMmap[][512];	/* uba device addr pte's */extern	char umem[][512*NBPG];		/* uba device addr space *//* * Qbus device address space is mapped by QMEMmap * into virtual address qmem[][]. * NOTE: also used by VAXstar (no-bus). */extern	struct pte QMEMmap[][512];	/* qbus device addr pte's */extern	char qmem[][512*NBPG];		/* qbus device addr space *//* * Part of VAXstar device address space is mapped by NMEMmap * into virtual address nmem[][]. */extern	struct pte NMEMmap[][512];	/* nobus device addr pte's */extern	char nmem[][512*NBPG];		/* nobus device addr space *//* * FireFox graphics address map */extern  struct pte FGMEMmap[][512];       /* nobus device addr pte's */extern  char fgmem[][512*NBPG];         /* nobus device addr space *//* * VAXstation 2000 color option address map */extern	struct pte SGMEMmap[][512];	/* nobus device addr pte's */extern	char sgmem[][512*NBPG];		/* nobus device addr space *//* * VAXstation 2000 system scratch RAM */extern	struct pte SGSYSmap[][512];	/* nobus device addr pte's */extern	char sgsys[][512*NBPG];		/* nobus device addr space *//* * MicroVAX 2000 serial line expander (8 line SLU) map. */extern	struct pte SHMEMmap[][512];	/* nobus device addr pte's */extern	char shmem[][512*NBPG];		/* nobus device addr space *//* * TODO: check out Al's question about why these are 2 deminisonal *		arrays???? * CVAXstar 2nd level cache data storage for clearing */extern	struct pte CVSCACHEmap[][512];extern	char cvscachemem[] [512*NBPG];/* TODO: ext mode - temp */extern	struct pte CVSEDDBmap[][512];extern	char cvseddbmem[] [512*NBPG];/* * CVAXstar (VAX420) SCSI registers. */extern	struct pte SZMEMmap[][512];	/* nobus device addr pte's */extern	char szmem[][512*NBPG];		/* nobus device addr space *//* * Since some VAXen vector their unibus interrupts * just adjacent to the system control block, we must * allocate space there when running on ``any'' cpu.  This space is * used for the vectors for uba0 and uba1 on all cpu's. */extern	int (*UNIvec[])();			/* unibus vec for uba0 *//* * On 780's and 8600's, we must set the scb vectors for the nexus of the * UNIbus adaptors to vector to locore unibus adaptor interrupt dispatchers * which make 780's look like the other VAXen. */#ifdef VAX8600extern	Xua0int(), Xua1int(), Xua2int(), Xua3int(), Xua4int(), Xua5int(), Xua6int();#else#ifdef VAX780extern	Xua0int(), Xua1int(), Xua2int(), Xua3int();#endif /* VAX780 */#endif /* VAX8600 */#ifdef mipsextern volatile int cvec;extern volatile int br;#elseextern int cvec;extern int br;#endif#endif /* KERNEL */#endif /* !LOCORE *//* *  definitions for the zero vector timer */#define	ZVINTVL		300	/* zero vector interval in seconds */#define ZVTHRESH	100000	/* zero vector reporting threshold *//* Stuff for common I/O buffer sharing between vaxstar disk and TK50 */struct vsbuf {	u_char	vs_status;	/* vaxstar buffer is being used	(boolean)     */	struct vsdev *vs_active;/* tape structure			      */	struct vsdev *vs_wants; /* disk structure			      */};#define VS_IDLE		0	/* Buffer not being used		      */#define VS_SDC		1	/* vaxstar disk driver			      */#define VS_ST		2	/* vaxstar tape driver			      *//* * Action Values used to call, and as return values. */#define	VS_DEALLOC	0	/* Deallocate the vaxstar buffer	      */#define VS_ALLOC	1	/* Allocate the vaxstar buffer		      */#define VS_KEEP		2	/* In progress				      */#define VS_WANTBACK	3	/* More requsts, want to be called back later */struct vsdev {	u_char	vsd_id;		/* id of the device			      */	int	vsd_action;	/* desired action			      */	int	(*vsd_funcptr)();/* Callback address for vs_wants vs_id */};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -