summaryrefslogtreecommitdiffstats
path: root/sys/arm/include/pmap.h
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2004-11-07 23:01:36 +0000
committercognet <cognet@FreeBSD.org>2004-11-07 23:01:36 +0000
commit103e95586ea0c1e4225a4bc7c851cf22bd979fa5 (patch)
treebd6194dbac8ef344d695c3a883f0f92fa9bc572f /sys/arm/include/pmap.h
parente8fd5617c522ffcbe43eca509cc8a05d0fa4ef0e (diff)
downloadFreeBSD-src-103e95586ea0c1e4225a4bc7c851cf22bd979fa5.zip
FreeBSD-src-103e95586ea0c1e4225a4bc7c851cf22bd979fa5.tar.gz
Import md bits for mem(4) on arm.
While I'm there, cleanup a bit pmap.h.
Diffstat (limited to 'sys/arm/include/pmap.h')
-rw-r--r--sys/arm/include/pmap.h51
1 files changed, 6 insertions, 45 deletions
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h
index a4377b1..fc870c9 100644
--- a/sys/arm/include/pmap.h
+++ b/sys/arm/include/pmap.h
@@ -57,31 +57,7 @@
*/
#define PTE_NOCACHE 0
#define PTE_CACHE 1
-
-#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDR_SHIFT)+((pti)<<PAGE_SHIFT)))
-#define PTDIPDE(ptd) ((ptd)/1024)
-#define PTDIPTE(ptd) ((ptd)%256)
-
-#ifndef NKPT
-#define NKPT 120 /* actual number of kernel page tables */
-#endif
-
-#ifndef NKPDE
-#define NKPDE 1019 /* Maximum number of kernel PDE */
-#endif
-
-#define NPDEPTD 16 /* Number of PDE in each PTD */
-
-/*
- * The *PTDI values control the layout of virtual memory
- */
-
-#define KPTDI (NPDEPG-NKPDE) /* ptd entry for kernel space begin */
-#define PTDPTDI (KPTDI-1) /* ptd entry that points to ptd! */
-#define KPTPTDI (PTDPTDI-1) /* ptd entry for kernel PTEs */
-#define UPTPTDI (KPTPTDI-3) /* ptd entry for uspace PTEs */
-#define UMAXPTDI (UPTPTDI-1) /* ptd entry for user space end */
-#define UMAXPTEOFF (NPTEPG) /* pte entry for user space end */
+#define PTE_PAGETABLE 2
#ifndef LOCORE
@@ -99,7 +75,7 @@
#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list))
/*
- * Pmap sutff
+ * Pmap stuff
*/
/*
@@ -175,6 +151,7 @@ typedef struct pmap *pmap_t;
#ifdef _KERNEL
extern pmap_t kernel_pmap;
#define pmap_kernel() kernel_pmap
+
#endif
@@ -192,20 +169,6 @@ typedef struct pv_entry {
#define PV_ENTRY_NULL ((pv_entry_t) 0)
-#define PV_CI 0x01 /* all entries must be cache inhibited */
-#define PV_PTPAGE 0x02 /* entry maps a page table page */
-
-/*
- * Page hooks.
- * For speed we store the both the virtual address and the page table
- * entry address for each page hook.
- */
-typedef struct {
- vm_offset_t va;
- pt_entry_t *pte;
-} pagehook_t;
-
-
#ifdef _KERNEL
boolean_t pmap_get_pde_pte(pmap_t, vm_offset_t, pd_entry_t **, pt_entry_t **);
@@ -496,11 +459,6 @@ void pmap_use_minicache(vm_offset_t, vm_size_t);
#define pmap_pte_v(pte) l2pte_valid(*(pte))
#define pmap_pte_pa(pte) l2pte_pa(*(pte))
-/* Size of the kernel part of the L1 page table */
-#define KERNEL_PD_SIZE \
- (L1_TABLE_SIZE - (KERNEL_BASE >> L1_S_SHIFT) * sizeof(pd_entry_t))
-#define PTE_PAGETABLE 2
-
/*
* Flags that indicate attributes of pages or mappings of pages.
*
@@ -542,6 +500,9 @@ const struct pmap_devmap *pmap_devmap_find_va(vm_offset_t, vm_size_t);
void pmap_devmap_bootstrap(vm_offset_t, const struct pmap_devmap *);
void pmap_devmap_register(const struct pmap_devmap *);
+
+extern char *_tmppt;
+
#endif /* _KERNEL */
#endif /* !LOCORE */
OpenPOWER on IntegriCloud