Deleted Added
full compact
pmap.c (327501) pmap.c (327785)
1/*-
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 * Copyright (c) 1994 John S. Dyson
5 * All rights reserved.
6 * Copyright (c) 1994 David Greenman
7 * All rights reserved.
8 * Copyright (c) 2003 Peter Wemm

--- 65 unchanged lines hidden (view full) ---

74 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
75 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 * SUCH DAMAGE.
77 */
78
79#define AMD64_NPT_AWARE
80
81#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 * Copyright (c) 1994 John S. Dyson
5 * All rights reserved.
6 * Copyright (c) 1994 David Greenman
7 * All rights reserved.
8 * Copyright (c) 2003 Peter Wemm

--- 65 unchanged lines hidden (view full) ---

74 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
75 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 * SUCH DAMAGE.
77 */
78
79#define AMD64_NPT_AWARE
80
81#include <sys/cdefs.h>
82__FBSDID("$FreeBSD: stable/11/sys/amd64/amd64/pmap.c 327501 2018-01-02 20:22:31Z mjg $");
82__FBSDID("$FreeBSD: stable/11/sys/amd64/amd64/pmap.c 327785 2018-01-10 20:39:26Z markj $");
83
84/*
85 * Manages physical address maps.
86 *
87 * Since the information managed by this module is
88 * also stored by the logical address mapping module,
89 * this module may throw away valid virtual-to-physical
90 * mappings at almost any time. However, invalidations

--- 2320 unchanged lines hidden (view full) ---

2411{
2412 vm_page_t pml4pg;
2413 vm_paddr_t pml4phys;
2414 int i;
2415
2416 /*
2417 * allocate the page directory page
2418 */
83
84/*
85 * Manages physical address maps.
86 *
87 * Since the information managed by this module is
88 * also stored by the logical address mapping module,
89 * this module may throw away valid virtual-to-physical
90 * mappings at almost any time. However, invalidations

--- 2320 unchanged lines hidden (view full) ---

2411{
2412 vm_page_t pml4pg;
2413 vm_paddr_t pml4phys;
2414 int i;
2415
2416 /*
2417 * allocate the page directory page
2418 */
2419 while ((pml4pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL |
2420 VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL)
2421 VM_WAIT;
2419 pml4pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ |
2420 VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_WAITOK);
2422
2423 pml4phys = VM_PAGE_TO_PHYS(pml4pg);
2424 pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(pml4phys);
2425 CPU_FOREACH(i) {
2426 pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE;
2427 pmap->pm_pcids[i].pm_gen = 0;
2428 }
2429 pmap->pm_cr3 = ~0; /* initialize to an invalid value */

--- 5113 unchanged lines hidden ---
2421
2422 pml4phys = VM_PAGE_TO_PHYS(pml4pg);
2423 pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(pml4phys);
2424 CPU_FOREACH(i) {
2425 pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE;
2426 pmap->pm_pcids[i].pm_gen = 0;
2427 }
2428 pmap->pm_cr3 = ~0; /* initialize to an invalid value */

--- 5113 unchanged lines hidden ---