Wed Jun 14 12:49:37 2017 UTC ()
Move the direct map from slot 509 to slot 460. We will increase its size
dynamically.


(maxv)
diff -r1.64 -r1.65 src/sys/arch/x86/include/pmap.h

cvs diff -r1.64 -r1.65 src/sys/arch/x86/include/pmap.h (expand / switch to unified diff)

--- src/sys/arch/x86/include/pmap.h 2017/03/23 18:08:06 1.64
+++ src/sys/arch/x86/include/pmap.h 2017/06/14 12:49:37 1.65
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.h,v 1.64 2017/03/23 18:08:06 maxv Exp $ */ 1/* $NetBSD: pmap.h,v 1.65 2017/06/14 12:49:37 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997 Charles D. Cranor and Washington University. 4 * Copyright (c) 1997 Charles D. Cranor and Washington University.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -475,27 +475,27 @@ paddr_t vtomach(vaddr_t); @@ -475,27 +475,27 @@ paddr_t vtomach(vaddr_t);
475void pmap_kenter_ma(vaddr_t, paddr_t, vm_prot_t, u_int); 475void pmap_kenter_ma(vaddr_t, paddr_t, vm_prot_t, u_int);
476int pmap_enter_ma(struct pmap *, vaddr_t, paddr_t, paddr_t, 476int pmap_enter_ma(struct pmap *, vaddr_t, paddr_t, paddr_t,
477 vm_prot_t, u_int, int); 477 vm_prot_t, u_int, int);
478bool pmap_extract_ma(pmap_t, vaddr_t, paddr_t *); 478bool pmap_extract_ma(pmap_t, vaddr_t, paddr_t *);
479void pmap_free_ptps(struct vm_page *); 479void pmap_free_ptps(struct vm_page *);
480 480
481/* 481/*
482 * Hooks for the pool allocator. 482 * Hooks for the pool allocator.
483 */ 483 */
484#define POOL_VTOPHYS(va) vtophys((vaddr_t) (va)) 484#define POOL_VTOPHYS(va) vtophys((vaddr_t) (va))
485 485
486#ifdef __HAVE_DIRECT_MAP 486#ifdef __HAVE_DIRECT_MAP
487 487
488#define L4_SLOT_DIRECT 509 488#define L4_SLOT_DIRECT 460
489#define PDIR_SLOT_DIRECT L4_SLOT_DIRECT 489#define PDIR_SLOT_DIRECT L4_SLOT_DIRECT
490 490
491#define PMAP_DIRECT_BASE (VA_SIGN_NEG((L4_SLOT_DIRECT * NBPD_L4))) 491#define PMAP_DIRECT_BASE (VA_SIGN_NEG((L4_SLOT_DIRECT * NBPD_L4)))
492#define PMAP_DIRECT_END (VA_SIGN_NEG(((L4_SLOT_DIRECT + 1) * NBPD_L4))) 492#define PMAP_DIRECT_END (VA_SIGN_NEG(((L4_SLOT_DIRECT + 1) * NBPD_L4)))
493 493
494#define PMAP_DIRECT_MAP(pa) ((vaddr_t)PMAP_DIRECT_BASE + (pa)) 494#define PMAP_DIRECT_MAP(pa) ((vaddr_t)PMAP_DIRECT_BASE + (pa))
495#define PMAP_DIRECT_UNMAP(va) ((paddr_t)(va) - PMAP_DIRECT_BASE) 495#define PMAP_DIRECT_UNMAP(va) ((paddr_t)(va) - PMAP_DIRECT_BASE)
496 496
497/* 497/*
498 * Alternate mapping hooks for pool pages. 498 * Alternate mapping hooks for pool pages.
499 */ 499 */
500#define PMAP_MAP_POOLPAGE(pa) PMAP_DIRECT_MAP((pa)) 500#define PMAP_MAP_POOLPAGE(pa) PMAP_DIRECT_MAP((pa))
501#define PMAP_UNMAP_POOLPAGE(va) PMAP_DIRECT_UNMAP((va)) 501#define PMAP_UNMAP_POOLPAGE(va) PMAP_DIRECT_UNMAP((va))