Introduce pl_pi, will be used soon.
This commit is contained in:
parent
ce63d7aabc
commit
d11ad8eef5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.h,v 1.57 2018/11/19 20:28:01 maxv Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.58 2018/11/19 20:44:51 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@ -150,6 +150,7 @@ extern pt_entry_t *pte_base;
|
||||
#define NKL2_START_ENTRIES 0
|
||||
#define NKL1_START_ENTRIES 0
|
||||
|
||||
#define PTP_MASK_INITIALIZER { L1_MASK, L2_MASK, L3_MASK, L4_MASK }
|
||||
#define PTP_FRAME_INITIALIZER { L1_FRAME, L2_FRAME, L3_FRAME, L4_FRAME }
|
||||
#define PTP_SHIFT_INITIALIZER { L1_SHIFT, L2_SHIFT, L3_SHIFT, L4_SHIFT }
|
||||
#define NKPTP_INITIALIZER { NKL1_START_ENTRIES, NKL2_START_ENTRIES, \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.h,v 1.120 2018/11/19 20:28:01 maxv Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.121 2018/11/19 20:44:51 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@ -267,6 +267,7 @@
|
||||
#endif /* !XEN */
|
||||
#define NPDPG (PAGE_SIZE / sizeof (pd_entry_t))
|
||||
|
||||
#define PTP_MASK_INITIALIZER { L1_MASK, L2_MASK }
|
||||
#define PTP_FRAME_INITIALIZER { L1_FRAME, L2_FRAME }
|
||||
#define PTP_SHIFT_INITIALIZER { L1_SHIFT, L2_SHIFT }
|
||||
#define NKPTP_INITIALIZER { NKL1_START_ENTRIES, NKL2_START_ENTRIES }
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.h,v 1.90 2018/11/19 20:28:01 maxv Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.91 2018/11/19 20:44:51 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@ -75,6 +75,8 @@
|
||||
#define pl2_pi(VA) (((VA_SIGN_POS(VA)) & L2_MASK) >> L2_SHIFT)
|
||||
#define pl3_pi(VA) (((VA_SIGN_POS(VA)) & L3_MASK) >> L3_SHIFT)
|
||||
#define pl4_pi(VA) (((VA_SIGN_POS(VA)) & L4_MASK) >> L4_SHIFT)
|
||||
#define pl_pi(va, lvl) \
|
||||
(((VA_SIGN_POS(va)) & ptp_masks[(lvl)-1]) >> ptp_shifts[(lvl)-1])
|
||||
|
||||
/*
|
||||
* pl*_i: generate index into pde/pte arrays in virtual space
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.311 2018/11/19 20:28:01 maxv Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.312 2018/11/19 20:44:51 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
|
||||
@ -130,7 +130,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.311 2018/11/19 20:28:01 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.312 2018/11/19 20:44:51 maxv Exp $");
|
||||
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_lockdebug.h"
|
||||
@ -239,6 +239,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.311 2018/11/19 20:28:01 maxv Exp $");
|
||||
* lock it when adding or removing pmaps from this list.
|
||||
*/
|
||||
|
||||
const vaddr_t ptp_masks[] = PTP_MASK_INITIALIZER;
|
||||
const vaddr_t ptp_frames[] = PTP_FRAME_INITIALIZER;
|
||||
const int ptp_shifts[] = PTP_SHIFT_INITIALIZER;
|
||||
const long nkptpmax[] = NKPTPMAX_INITIALIZER;
|
||||
|
Loading…
Reference in New Issue
Block a user