FreeBSD/Linux Kernel Cross Reference
sys/sqt/vm_defs.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991 Carnegie Mellon University
4 * Copyright (c) 1991 Sequent Computer Systems
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
12 *
13 * CARNEGIE MELLON AND SEQUENT COMPUTER SYSTEMS ALLOW FREE USE OF
14 * THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND
15 * SEQUENT COMPUTER SYSTEMS DISCLAIM ANY LIABILITY OF ANY KIND FOR
16 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 *
18 * Carnegie Mellon requests users of this software to return to
19 *
20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
24 *
25 * any improvements or extensions that they make and grant Carnegie Mellon
26 * the rights to redistribute these changes.
27 */
28
29 /*
30 * HISTORY
31 * $Log: vm_defs.h,v $
32 * Revision 2.3 91/07/31 18:04:53 dbg
33 * Changed copyright.
34 * [91/07/31 dbg]
35 *
36 * Revision 2.2 91/05/08 13:01:36 dbg
37 * Make KVTOPHYS use kvtophys to avoid locking kernel pmap.
38 * [91/02/14 dbg]
39 *
40 * Move cpu-local mappings (slic, leds, elapsed-time counter) to
41 * level 1 page just below FPA.
42 * [90/12/17 dbg]
43 *
44 * Rewrote for pure Mach kernel. Kernel is no longer mapped 1-1
45 * with physical memory.
46 * [90/09/27 dbg]
47 *
48 */
49
50 #ifndef _SQT_VM_DEFS_H_
51 #define _SQT_VM_DEFS_H_
52
53 #include <mach/i386/vm_param.h>
54 #include <i386/pmap.h>
55
56 /*
57 * Kernel address space layout.
58 *
59 * Physical memory is mapped 1-1 starting at 0xC0000000. This includes
60 * the kernel code, data, and bss, and the kernel page table directory.
61 * Useful IO space is mapped to allocated virtual memory.
62 * See machine/hwparam.h for description of IO space.
63 *
64 * User mapping consumes 3Gig of space, starting at 0. User segment
65 * registers declare full 4Gig space, to allow FPA mapping to be in the
66 * last 4Meg of the top of the 4Gig space (Intel standard).
67 */
68
69 #define PDE_MAP_SIZE (1 << PDESHIFT)
70 /* amount mapped by a page directory */
71
72 #define FPA_SPACE (1 * PDE_MAP_SIZE)
73 /* 1 L1 page for this */
74 #define VA_FPA (0 - FPA_SPACE)
75 /* mapped FPA */
76
77
78 #define HDW_SPACE (2 * PDE_MAP_SIZE)
79 /* slic, led, etc, sync-points */
80
81 #define VA_SLIC (VA_FPA - HDW_SPACE)
82 #define VA_LED (VA_SLIC + I386_PGBYTES)
83 #define VA_ETC (VA_LED + I386_PGBYTES)
84
85 /*
86 * Mapping between physical and virtual addresses.
87 */
88 #define PHYSTOKV(addr, type) ((type)phystokv(addr))
89 #define KVTOPHYS(addr, type) ((type)kvtophys((vm_offset_t)(addr)))
90
91 #endif /* _SQT_VM_DEFS_H_ */
Cache object: 0b85305227e04bb1c83f097956d12d5f
|