summaryrefslogtreecommitdiff
path: root/sys/arch/arm64/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-03-24 19:48:02 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-03-24 19:48:02 +0000
commit960bf034a5224117584e38bc930e1d381bdc960b (patch)
tree0fc568aa4e9de34b8fd1260b78a3fe20feea9800 /sys/arch/arm64/include
parent8d5c49ada92e0203a01619c68ff09ca71b5a503b (diff)
Simplify ASID allocation code considerably by allocating an ASID up front
when a pmap is created and freeing it when the pmap is destroyed. This diff relies on the fill 16-bit ASID space being implemented in the processor. While this is documented as an optional feature in the ARMv8 architecture reference manual, all ARMv8 processors seen in the wild so far implement the full 16-bit space. This change incorporates changes by drahn@ to allocate an empty page table for the lower half of the address space for the kernel. ok drahn@, patrick@
Diffstat (limited to 'sys/arch/arm64/include')
-rw-r--r--sys/arch/arm64/include/cpufunc.h3
-rw-r--r--sys/arch/arm64/include/pcb.h3
-rw-r--r--sys/arch/arm64/include/pmap.h3
3 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/arm64/include/cpufunc.h b/sys/arch/arm64/include/cpufunc.h
index e827430394d..6473ceb3e15 100644
--- a/sys/arch/arm64/include/cpufunc.h
+++ b/sys/arch/arm64/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.1 2017/02/06 19:23:45 patrick Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.2 2017/03/24 19:48:01 kettenis Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
@@ -43,6 +43,7 @@ void cpu_setttb(vaddr_t);
void cpu_tlb_flush(void);
void cpu_tlb_flush_asid(vaddr_t);
void cpu_tlb_flush_all_asid(vaddr_t);
+void cpu_tlb_flush_asid_all(vaddr_t);
void cpu_icache_sync_range(vaddr_t, vsize_t);
void cpu_idcache_wbinv_range(vaddr_t, vsize_t);
void cpu_dcache_wbinv_range(vaddr_t, vsize_t);
diff --git a/sys/arch/arm64/include/pcb.h b/sys/arch/arm64/include/pcb.h
index b1b1b9b43eb..c242aab93ac 100644
--- a/sys/arch/arm64/include/pcb.h
+++ b/sys/arch/arm64/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.2 2017/01/10 13:13:12 patrick Exp $ */
+/* $OpenBSD: pcb.h,v 1.3 2017/03/24 19:48:01 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
*
@@ -38,7 +38,6 @@ struct pcb {
caddr_t pcb_onfault; // On fault handler
struct fpreg pcb_fpstate; // Floating Point state */
struct cpu_info *pcb_fpcpu;
- paddr_t pcb_pagedir; // ttbr0
void *pcb_tcb;
};
diff --git a/sys/arch/arm64/include/pmap.h b/sys/arch/arm64/include/pmap.h
index 413bdaf53c1..7bd09ce59ae 100644
--- a/sys/arch/arm64/include/pmap.h
+++ b/sys/arch/arm64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.3 2017/03/16 20:15:07 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.4 2017/03/24 19:48:01 kettenis Exp $ */
/*
* Copyright (c) 2008,2009,2014 Dale Rahn <drahn@dalerahn.com>
*
@@ -70,7 +70,6 @@ struct pmap {
uint64_t pm_pt0pa;
int have_4_level_pt;
int pm_asid;
- int pm_active;
int pm_refs; /* ref count */
struct pmap_statistics pm_stats; /* pmap statistics */
};