Thu Jul 15 18:58:41 2010 UTC ()
Purely cosmetic: move L2_SLOT_KERNBASE out of the PAE #ifdef/#endif block.


(jym)
diff -r1.105 -r1.106 src/sys/arch/i386/include/pmap.h

cvs diff -r1.105 -r1.106 src/sys/arch/i386/include/pmap.h (expand / switch to unified diff)

--- src/sys/arch/i386/include/pmap.h 2010/03/01 00:55:33 1.105
+++ src/sys/arch/i386/include/pmap.h 2010/07/15 18:58:40 1.106
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.h,v 1.105 2010/03/01 00:55:33 jym Exp $ */ 1/* $NetBSD: pmap.h,v 1.106 2010/07/15 18:58:40 jym Exp $ */
2 2
3/* 3/*
4 * 4 *
5 * Copyright (c) 1997 Charles D. Cranor and Washington University. 5 * Copyright (c) 1997 Charles D. Cranor and Washington University.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -209,39 +209,38 @@ @@ -209,39 +209,38 @@
209#define VA_SIGN_MASK 0 209#define VA_SIGN_MASK 0
210#define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK) 210#define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK)
211/* 211/*
212 * XXXfvdl this one's not right. 212 * XXXfvdl this one's not right.
213 */ 213 */
214#define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK) 214#define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK)
215 215
216/* 216/*
217 * the following defines identify the slots used as described above. 217 * the following defines identify the slots used as described above.
218 */ 218 */
219#ifdef PAE 219#ifdef PAE
220#define L2_SLOT_PTE (KERNBASE/NBPD_L2-4) /* 1532: for recursive PDP map */ 220#define L2_SLOT_PTE (KERNBASE/NBPD_L2-4) /* 1532: for recursive PDP map */
221#define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 1536: start of kernel space */ 221#define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 1536: start of kernel space */
222#define L2_SLOT_KERNBASE L2_SLOT_KERN 
223#define L2_SLOT_APTE 1960 /* 1964-2047 reserved by Xen */ 222#define L2_SLOT_APTE 1960 /* 1964-2047 reserved by Xen */
224#else /* PAE */ 223#else /* PAE */
225#define L2_SLOT_PTE (KERNBASE/NBPD_L2-1) /* 767: for recursive PDP map */ 224#define L2_SLOT_PTE (KERNBASE/NBPD_L2-1) /* 767: for recursive PDP map */
226#define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 768: start of kernel space */ 225#define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 768: start of kernel space */
227#define L2_SLOT_KERNBASE L2_SLOT_KERN 
228#ifndef XEN 226#ifndef XEN
229#define L2_SLOT_APTE 1023 /* 1023: alternative recursive slot */ 227#define L2_SLOT_APTE 1023 /* 1023: alternative recursive slot */
230#else 228#else
231#define L2_SLOT_APTE 1007 /* 1008-1023 reserved by Xen */ 229#define L2_SLOT_APTE 1007 /* 1008-1023 reserved by Xen */
232#endif 230#endif
233#endif /* PAE */ 231#endif /* PAE */
234 232
 233#define L2_SLOT_KERNBASE L2_SLOT_KERN
235 234
236#define PDIR_SLOT_KERN L2_SLOT_KERN 235#define PDIR_SLOT_KERN L2_SLOT_KERN
237#define PDIR_SLOT_PTE L2_SLOT_PTE 236#define PDIR_SLOT_PTE L2_SLOT_PTE
238#define PDIR_SLOT_APTE L2_SLOT_APTE 237#define PDIR_SLOT_APTE L2_SLOT_APTE
239 238
240/* 239/*
241 * the following defines give the virtual addresses of various MMU 240 * the following defines give the virtual addresses of various MMU
242 * data structures: 241 * data structures:
243 * PTE_BASE and APTE_BASE: the base VA of the linear PTE mappings 242 * PTE_BASE and APTE_BASE: the base VA of the linear PTE mappings
244 * PDP_BASE and APDP_BASE: the base VA of the recursive mapping of the PDP 243 * PDP_BASE and APDP_BASE: the base VA of the recursive mapping of the PDP
245 * PDP_PDE and APDP_PDE: the VA of the PDE that points back to the PDP/APDP 244 * PDP_PDE and APDP_PDE: the VA of the PDE that points back to the PDP/APDP
246 */ 245 */
247 246