From 64c191c26962ab6373dca9fab4d351b9f69f7ffb Mon Sep 17 00:00:00 2001 From: rearnsha Date: Sat, 3 Nov 2001 00:01:23 +0000 Subject: [PATCH] Define boolean predicates pmap_pde_page, pmap_pde_section & pmap_pde_fpage, which return true if their pde argument is a coarse page, section or fine page respectively. --- sys/arch/arm/include/arm32/pmap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm/include/arm32/pmap.h b/sys/arch/arm/include/arm32/pmap.h index 604c0e632c7f..408efd5aaf59 100644 --- a/sys/arch/arm/include/arm32/pmap.h +++ b/sys/arch/arm/include/arm32/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.15 2001/09/13 23:56:01 chris Exp $ */ +/* $NetBSD: pmap.h,v 1.16 2001/11/03 00:01:23 rearnsha Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -200,6 +200,10 @@ boolean_t pmap_pageidlezero __P((paddr_t)); #define pmap_pde(m, v) (&((m)->pm_pdir[((vaddr_t)(v) >> PDSHIFT)&4095])) #define pmap_pte_pa(pte) (*(pte) & PG_FRAME) #define pmap_pde_v(pde) (*(pde) != 0) +#define pmap_pde_section(pde) ((*(pde) & L1_MASK) == L1_SECTION) +#define pmap_pde_page(pde) ((*(pde) & L1_MASK) == L1_PAGE) +#define pmap_pde_fpage(pde) ((*(pde) & L1_MASK) == L1_FPAGE) + #define pmap_pte_v(pte) (*(pte) != 0) /* Size of the kernel part of the L1 page table */