Annotation of coherent/f/usr/include.78/sys/coherent.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * /usr/include/sys/coherent.h
                      3:  *
                      4:  * Coherent-specific definitions, for linking kernels and related bits.
                      5:  *
                      6:  * Revised: Thu May 27 08:07:17 1993 CDT
                      7:  */
                      8: #ifndef        __SYS_COHERENT_H__
                      9: #define        __SYS_COHERENT_H__
                     10: 
                     11: #define         KERNEL
                     12: #define        __KERNEL__
                     13: #include <sys/__paddr.h>
                     14: #include <sys/types.h>
                     15: #include <sys/_time.h>
                     16: #include <sys/param.h>
                     17: #include <sys/fun.h>
                     18: #include <sys/mmu.h>
                     19: #include <sys/uproc.h>
                     20: #ifdef _I386
                     21: #include <sys/reg.h>
                     22: #define v_sleep(a1,a2,a3,a4,a5)                w_sleep(a1,a2,a5)
                     23: #else
                     24: #include <sys/machine.h>
                     25: #define v_sleep(a1,a2,a3,a4,a5)                sleep(a1,a2,a3,a4)
                     26: #endif
                     27: 
                     28: #ifdef TRACER
                     29: #include <sys/mwc_coherent.h>
                     30: #else
                     31: #define SET_U_ERROR(errno, msg)        { u.u_error = errno; }
                     32: #define T_HAL(f,c)
                     33: #define T_PIGGY(f,c)
                     34: #define T_VLAD(f,c)
                     35: #define T_CON(f,c)
                     36: #define T_MSGQ(f,c)
                     37: #define DV(v)
                     38: #endif /* TRACER */
                     39: 
                     40: #ifdef _I386
                     41: #define CHIRP(ch)              chirp(ch)
                     42: #define _CHIRP(ch, locn)       _chirp(ch, locn)
                     43: #if 1
                     44: #define kclear(buf, nbytes)            memset(buf, 0, nbytes)
                     45: #define kkcopy(src, dest, nbytes)      (memcpy(dest, src, nbytes),nbytes)
                     46: #endif
                     47: #else
                     48: #define CHIRP(ch)
                     49: #define _CHIRP(ch, locn)
                     50: #endif
                     51: 
                     52: /*
                     53:  * Null
                     54:  */
                     55: #ifndef        NULL            /* machine.h doesn't have any ideas */
                     56: #define NULL   0
                     57: #endif
                     58: 
                     59: /*
                     60:  * Storage management functions.
                     61:  */
                     62: extern char            *alloc();
                     63: #define        kalloc(n)       alloc(allkp, n)
                     64: #define kfree(p)       free(p)
                     65: 
                     66: /*
                     67:  * Functions for copying between kernel and segments.
                     68:  */
                     69: #define kscopy(k, s, o, n)     kpcopy(k, s->s_paddr+o, n)
                     70: #define skcopy(s, o, k, n)     pkcopy(s->s_paddr+o, k, n)
                     71: 
                     72: /*
                     73:  * Time of day structure.
                     74:  */
                     75: 
                     76: extern struct _TIME_OF_DAY {
                     77:        time_t  t_time;                 /* Time and date */
                     78:        int     t_tick;                 /* Clock ticks into this second */
                     79:        int     t_zone;                 /* Time zone */
                     80:        int     t_dstf;                 /* Daylight saving time used */
                     81: } timer;
                     82: 
                     83: /*
                     84:  * General global variables.
                     85:  */
                     86: extern int      debflag;               /* General debug flag */
                     87: extern int      batflag;               /* Turn on clock flag */
                     88: extern int      outflag;               /* Device timeouts */
                     89: extern int      ttyflag;               /* Console is present */
                     90: extern int      mactype;               /* Machine type */
                     91: extern unsigned utimer;                /* Unsigned timer */
                     92: extern long     lbolt;                 /* Clock ticks since system startup */
                     93: extern TIM     stimer;                 /* Swap timer */
                     94: extern unsigned msize;                 /* Memory size in K */
                     95: extern unsigned asize;                 /* Alloc size in bytes */
                     96: extern char     *icodep;               /* Init code start */
                     97: extern int      icodes;                /* Init code size */
                     98: extern dev_t    rootdev;               /* Root device */
                     99: extern dev_t    swapdev;               /* Swap device */
                    100: extern dev_t    pipedev;               /* Pipe device */
                    101: extern __paddr_t        corebot;       /* Bottom of core */
                    102: extern __paddr_t        coretop;        /* Top of core */
                    103: extern __paddr_t        holebot;       /* Bottom of I/O memory */
                    104: extern __paddr_t        holetop;       /* Top of I/O memory */
                    105: extern daddr_t  swapbot;               /* Bottom of swap */
                    106: extern daddr_t  swaptop;               /* Top of swap */
                    107: extern __paddr_t        clistp;        /* Base of clists */
                    108: extern struct   all *allkp;            /* Alloc space */
                    109: extern int      NSLOT;                 /* Num of loadable driver data slots */
                    110: extern int      slotsz;                /* Size of loadable driver data slot */
                    111: extern int *    slotp;                 /* Loadable driver pids/data space */
                    112: extern int      (*altclk)();           /* hook for polled devices */
                    113: extern UPROC    u;                     /* Current user area. */
                    114: 
                    115: #ifdef _I386
                    116: 
                    117: extern unsigned total_mem;             /* Total physical memory in bytes.  */
                    118: extern SR      blockp;                 /* Base of buffers */
                    119: extern SR      allocp;
                    120: extern int     dev_loaded;
                    121: extern int     DUMP_LIM;
                    122: 
                    123: #else
                    124: 
                    125: extern char     *idatap;               /* Init data start */
                    126: extern int      idatas;                /* Init data size */
                    127: extern __paddr_t        blockp;        /* Base of buffers */
                    128: extern int      altsel;                /* for far polling, this is selector */
                    129:                                        /* ... for altclk; for near polling, */
                    130:                                        /* ... this is zero */
                    131: extern int     is_ps;                  /* 1 if running on a PS/2            */ 
                    132: 
                    133: #endif
                    134: #endif /* COHERENT_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.