/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1988
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/*
 * $Header:os2data.h 12.2$
 * $ACIS:os2data.h 12.2$
 * $Source: /ibm/acis/usr/sys/os2code/RCS/os2data.h,v $
 * Copyright University of Southern California, 1988
 */

/* UNIX Header File
 */

#define PCIF_DRIVER	"PCIF$"
#define BOOT_FILE	"boot"

/* function definitions */

u_short	exchw(u_short);
u_long	exchl(u_long);
u_char	inp(u_short);
int	outp(int,u_short);
u_long	physaddr(char far *);
u_long	pcif_lock(char far *);
void	pcif_unlock(u_long);
char far *pcif_map(u_long,u_short);
#define	PTUV_MAX_SEGMENT_SIZE	0

/* global variables */

extern	u_short	pcif_handle;	/* handle to the device driver */
extern	char 	*unix_name;	/* name of the monitor file */

extern	u_short r_base;		/* start of PCIF registers */
extern	u_long	pc_base;	/* starting address of PCIF */
extern  char far *pc_wind1;	/* starting address of window 1 */
extern  char far *pc_wind2;	/* starting address of window 2 */
extern  char far *pc_wind3;	/* starting address of window 3 */
extern  char far *pc_wind4;	/* starting address of window 4 */
extern	u_long	physmem_bytes;	/* sizeof ROMP memory in bytes */
extern	u_short	physmem_reg;	/* sizeof ROMP memory in pcif format */
extern	u_short	physmem;	/* sizeof ROMP memory in Kb */
extern	char far *buff_dio;	/* buffer segment for hard disk io */
extern	char far *fdbuf;	/* buffer segment for floppy disk io */

extern  char	cbcbbuf[];
extern  char	vec_map[];
extern  struct	dio_rtn_codes *hd_return_code;
extern	struct	dio_rtn_codes *fd_return_code;
extern	struct	cbcb *cbcbptr;
extern	struct	kbdata	kbdata;
extern  char	ubp[];
extern	struct	spkdata	spkdata;
extern	struct	msdata	msdata;
extern  struct	mask_int old_mask;
extern	u_long	pc_base;
extern	struct	XCLOCK	xclock;
extern struct vga_params *vga;
extern int	intlv_flag;
extern	u_long	pcif_data_handle;
extern struct ubpc *ub_pc;

/* include OS/2 error messages */

#include <os2.h>

extern int		cpu_number;	/* this cpu's number */
extern int		ncpu;		/* total number of cpu's */
extern u_int	hd_io_thread_id;	/* id of the hard disk thread */
extern u_int	fd_io_thread_id;	/* id of the floppy disk thread */
extern u_int	kbd_tid;		/* id of the keyboard thread */
extern u_int	mc_tid;			/* id of the mc thread */
extern u_int	main_tid;		/* id of the main thread */
extern u_int	mouse_tid;		/* id of the mouse thread */
extern u_int	clock_tid;		/* id of the clock thread */
extern u_int	vio_tid;
extern long	debug;

#define dbugptr (&cbcbptr->debug)
