|
|
1.1 root 1: /* @(#)cpu.addrs.h 1.27 85/04/15 SMI */
2:
3: /*
4: * Copyright (c) 1985 by Sun Microsystems, Inc.
5: */
6:
7: /*
8: * Memory Addresses of Interest in the Sun-3 "Monitor" memory map
9: *
10: * THE VALUE FOR PROM_BASE must be changed in several places when it is
11: * changed. A complete list:
12: * ../conf/Makefile.mon RELOC= near top of file
13: * ../h/sunromvec.h #define romp near end of file
14: * ../* /Makefile (best to rerun sunconfig to generate them)
15: * Since sunromvec is exported to the world, such a change invalidates all
16: * object programs that use it (eg standalone diagnostics, demos, boot code,
17: * etc) until they are recompiled. As a transition aid, it is often useful
18: * to specially map the old sunromvec location(s) so they also work.
19: *
20: * THE VALUE FOR MONBSS_BASE must be changed in the Makefiles when you
21: * change it here, too.
22: */
23:
24: /*
25: * The following define the base addresses in mappable memory where
26: * the various devices and forms of memory are mapped in when the ROM
27: * Monitor powers up. Ongoing operation of the monitor requires that
28: * these locations remain mapped as they were.
29: */
30:
31: /* On-board I/O devices */
32: #define KEYBMOUSE_BASE ((struct zscc_device *) 0x0FE00000)
33: #define SERIAL0_BASE ((struct zscc_device *) 0x0FE02000)
34: #define EEPROM_BASE ((unsigned char *) 0x0FE04000)
35: #define CLOCK_BASE ((struct intersil7170 *) 0x0FE06000)
36: #define MEMORY_ERR_BASE ((struct memreg *) 0x0FE08000)
37: #define INTERRUPT_BASE ((unsigned char *) 0x0FE0A000)
38: #define ETHER_BASE ((struct obie_device *) 0x0FE0C000)
39: #define COLORMAP_BASE ((struct obcolormap *) 0x0FE0E000)
40: #define AMD_ETHER_BASE ((struct amd_ether *) 0x0FE10000)
41: #define SCSI_BASE ((struct scsichip *) 0x0FE12000)
42: #define DES_BASE ((struct deschip *) 0x0FE14000)
43: #define ECC_CTRL_BASE ((struct ecc_ctrl *) 0x0FE16000)
44:
45: /* Video memory (at least one plane of it...) */
46: #define VIDEOMEM_BASE ((char *) 0x0FE20000)
47:
48: /* Handy place to map the invalid PMEG. Also redzone for stack. */
49: #define INVPMEG_BASE ((char *) 0x0FE40000)
50:
51: /*
52: * Monitor scratch RAM for stack, trap vectors, and expanded font
53: * (one page = 8K)
54: */
55: #define STACK_BASE ((char *) 0x0FE60000)
56: #define STACK_TOP ((char *) 0x0FE60C00)
57: #define TRAPVECTOR_BASE ((char *) 0x0FE60C00)
58: #define FONT_BASE ((char *) 0x0FE61000)
59:
60: /*
61: * RAM page used to hold the valid-main-memory-pages bitmap if memory
62: * fails self-test. This will be mapped invalid if memory was all OK.
63: */
64: #define MAINMEM_BITMAP ((char *) 0x0FE62000)
65:
66: /*
67: * Roughly 512K for mapping in devices & mainmem during boot
68: * Mapped Invalid otherwise (to Invalid PMEG if a whole pmeg invalid).
69: */
70: #define BOOTMAP_BASE ((char *) 0x0FE64000)
71:
72: /*
73: * Location of PROM code. The system executes out of these addresses.
74: *
75: * SEE NOTE AT TOP OF FILE IF YOU CHANGE THIS VALUE.
76: */
77: #define PROM_BASE ((struct sunromvec *) 0x0FEF0000)
78:
79: /*
80: * First hardware virtual address where DVMA is possible.
81: * The Monitor does not normally use this address range, but does
82: * use it during bootstrap, via the resalloc() routine.
83: */
84: #define DVMA_BASE ((char *) 0x0FF00000)
85:
86: /*
87: * One page of scratch RAM for general Monitor global variables.
88: * We put it here so it can be accessed with short absolute addresses.
89: *
90: * SEE NOTE AT TOP OF FILE IF YOU CHANGE THIS VALUE.
91: */
92: #define MONBSS_BASE MONSHORTPAGE
93:
94: /*
95: * The Monitor maps only as much main memory as it can detect; the rest
96: * of the address space (up thru the special addresses defined above)
97: * is mapped as invalid.
98: *
99: * The last pmeg in the page map is always filled with PME_INVALID
100: * entries. This pmeg number ("The Invalid Pmeg Number") can be used to
101: * invalidate an entire segment's worth of memory.
102: * B E C A R E F U L !
103: * If you change a page map entry in this pmeg, you change it for thousands
104: * of virtual addresses. (The standard getpagemap/setpagemap routines
105: * will cause a trap if you attempt to write a valid page map entry to this
106: * pmeg, but you could do it by hand if you really wanted to mess things up.)
107: *
108: * Because there is four times as much virtual memory space in a single context
109: * as there are total pmegs to map it with, much of the monitor's memory
110: * map must be re-mappings of the same pmegs. There's no reason to duplicate
111: * useful addresses, and several reasons not to, so we map the extra
112: * virtual address space with the Invalid Pmeg Number. This means that
113: * some of the address space has their own page map entries, and the other
114: * part all shares the one Invalid Pmeg. Remember this when trying to map
115: * things; if the address you want is segmapped to the Invalid Pmeg, you'd
116: * better find it a pmeg before you set a page map entry.
117: *
118: * The Monitor always uses page map entry PME_INVALID to map an invalid
119: * page, although the only relevant bits are the (nonzero) permission bits
120: * and the (zero) Valid bit. PME_INVALID is defined in ./structconst.h,
121: * which is generated by the Monitor makefile.
122: */
123: #define SEG_INVALID NUMPMEGS-1
124: #define EEPROM ((struct eeprom *)0x0FE04000)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.