diff options
author | cognet <cognet@FreeBSD.org> | 2005-02-26 18:59:01 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2005-02-26 18:59:01 +0000 |
commit | 43586d701a28a6b1ef236ac59977399f1c91658e (patch) | |
tree | 754a92db74155793fdb77b1dabe591af0404d9f8 /sys/arm/include | |
parent | d017d1bb8095eeec8316d252936d8810684f8c64 (diff) | |
download | FreeBSD-src-43586d701a28a6b1ef236ac59977399f1c91658e.zip FreeBSD-src-43586d701a28a6b1ef236ac59977399f1c91658e.tar.gz |
Instead of using sysarch() to store-retrieve the tp, add a magic address,
ARM_TP_ADDRESS, where the tp will be stored. On CPUs that support it, a cache
line will be allocated and locked for this address, so that it will never go
to RAM. On CPUs that does not, a page is allocated for it (it will be a bit
slower, and is wrong for SMP, but should be fine for UP).
The tp is still stored in the mdthread struct, and at each context switch,
ARM_TP_ADDRESS gets updated.
Suggested by: davidxu
Diffstat (limited to 'sys/arm/include')
-rw-r--r-- | sys/arm/include/machdep.h | 2 | ||||
-rw-r--r-- | sys/arm/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/arm/include/sysarch.h | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/sys/arm/include/machdep.h b/sys/arm/include/machdep.h index 4d201cc..b26f386 100644 --- a/sys/arm/include/machdep.h +++ b/sys/arm/include/machdep.h @@ -10,4 +10,6 @@ void data_abort_handler (trapframe_t *); void prefetch_abort_handler (trapframe_t *); void undefinedinstruction_bounce (trapframe_t *); +void arm_lock_cache_line(vm_offset_t); + #endif /* !_MACHINE_MACHDEP_H_ */ diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h index cc4eeda..aa87c08 100644 --- a/sys/arm/include/pmap.h +++ b/sys/arm/include/pmap.h @@ -208,6 +208,7 @@ extern vm_offset_t virtual_end; void pmap_bootstrap(vm_offset_t, vm_offset_t, struct pv_addr *); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); +void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); void pmap_kremove(vm_offset_t); void *pmap_mapdev(vm_offset_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); diff --git a/sys/arm/include/sysarch.h b/sys/arm/include/sysarch.h index d0c0c47..4d6234b 100644 --- a/sys/arm/include/sysarch.h +++ b/sys/arm/include/sysarch.h @@ -53,6 +53,8 @@ #define ARM_SET_TP 2 #define ARM_GET_TP 3 +#define ARM_TP_ADDRESS 0xe0000000 /* Magic */ + struct arm_sync_icache_args { uintptr_t addr; /* Virtual start address */ size_t len; /* Region size */ |