|
|
1.1 root 1: /* @(#)cpu.h 1.1 86/02/03 SMI */
2:
3: /*
4: * Copyright (c) 1985 by Sun Microsystems, Inc.
5: *
6: * This file is intended to contain the specific details
7: * of various implementations of a given architecture.
8: */
9: #ifndef LOCORE
10: #include "../machine/sunromvec.h"
11: #endif !LOCORE
12:
13: #define CPU_ARCH 0xf0 /* mask for architecture bits */
14: #define SUN3_ARCH 0x10 /* arch value for Sun 3 */
15:
16: #define CPU_MACH 0x0f /* mask for machine implementation */
17: #define MACH_160 0x01
18: #define MACH_50 0x02
19: #define MACH_260 0x03
20:
21: #define CPU_SUN3_160 (SUN3_ARCH + MACH_160)
22: #define CPU_SUN3_50 (SUN3_ARCH + MACH_50)
23: #define CPU_SUN3_260 (SUN3_ARCH + MACH_260)
24:
25: #if defined(KERNEL) && !defined(LOCORE)
26: int cpu; /* machine type we are running on */
27: int dvmasize; /* usable dvma size in clicks */
28: int fbobmemavail; /* video copy memory is available */
29: #endif defined(KERNEL) && !defined(LOCORE)
30:
31: #ifndef LOCORE
32: /*
33: * The context structure is used to allocate
34: * contexts and maintains the pmeg allocation
35: * information for the context.
36: */
37: struct context {
38: int ctx_time; /* pseudo-time for ctx lru */
39: u_short ctx_context; /* bits to load into context register */
40: short ctx_tdmax; /* max text or data seg used */
41: short ctx_smin; /* min stack segment used */
42: struct proc *ctx_procp; /* back pointer to proc structure */
43: u_char ctx_pmeg[NSEGMAP]; /* pmeg allocation for this context */
44: };
45:
46: /*
47: * CSEG is the virtual segment reserved for temporary operations.
48: * We use the segment immediately before the start of monitor area.
49: */
50: #define CSEG ((MONSTART - NBSG) >> SGSHIFT)
51:
52: /*
53: * The pmeg structure allocates the
54: * hardware page map entry groups.
55: */
56: struct pmeg {
57: struct pmeg *pm_forw; /* forward link */
58: struct pmeg *pm_back; /* backward link */
59: struct proc *pm_procp; /* back pointer to proc using */
60: struct pte *pm_pte; /* pointer to pte's mapping */
61: short pm_seg; /* seg within process address space */
62: short pm_count; /* number of valid pte's in group */
63: int pm_time; /* last "time" pmeg was unloaded */
64: };
65:
66: #ifdef KERNEL
67: extern struct context context[];
68: extern struct pmeg pmeg[];
69: extern struct pmeg pmeghead;
70: extern int kernpmeg;
71: #endif KERNEL
72: #endif !LOCORE
73:
74: /*
75: * Various I/O space related constants
76: */
77: #define VME16_BASE 0xFFFF0000
78: #define VME16_SIZE (1<<16)
79: #define VME16_MASK (VME16_SIZE-1)
80:
81: #define VME24_BASE 0xFF000000
82: #define VME24_SIZE (1<<24)
83: #define VME24_MASK (VME24_SIZE-1)
84:
85: /*
86: * The Basic DVMA space size for all Sun-3 implementations
87: * is given by DVMASIZE. The actual usable dvma size
88: * (in clicks) is given by the dvmasize variable declared
89: * above (for compatibility with Sun-2).
90: */
91: #define DVMASIZE 0x100000
92:
93: /*
94: * FBSIZE is the amount of memory we will use for the frame buffer
95: * copy region if the copy mode of the frame buffer is to be used.
96: */
97: #define FBSIZE 0x20000 /* size of frame buffer memory region */
98: #define OBFBADDR 0x100000 /* location of frame buffer in memory */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.