diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-06 06:06:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-06 06:06:42 +0000 |
commit | a710dd719491cf5d6cf25776c860d40ecf004895 (patch) | |
tree | e94703ba8537bcc7df6eed45946da665b34eea58 /sys/alpha | |
parent | 0a04578be41eeac63246d97839c306955bc8f7cc (diff) | |
download | FreeBSD-src-a710dd719491cf5d6cf25776c860d40ecf004895.zip FreeBSD-src-a710dd719491cf5d6cf25776c860d40ecf004895.tar.gz |
- Rework pmap_map() to take advantage of direct-mapped segments on
supported architectures such as the alpha. This allows us to save
on kernel virtual address space, TLB entries, and (on the ia64) VHPT
entries. pmap_map() now modifies the passed in virtual address on
architectures that do not support direct-mapped segments to point to
the next available virtual address. It also returns the actual
address that the request was mapped to.
- On the IA64 don't use a special zone of PV entries needed for early
calls to pmap_kenter() during pmap_init(). This gets us in trouble
because we end up trying to use the zone allocator before it is
initialized. Instead, with the pmap_map() change, the number of needed
PV entries is small enough that we can get by with a static pool that is
used until pmap_init() is complete.
Submitted by: dfr
Debugging help: peter
Tested by: me
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/pmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index 4dd81ad..bdea119 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -884,18 +884,18 @@ pmap_kremove(vm_offset_t va) * Used to map a range of physical addresses into kernel * virtual address space. * - * For now, VM is already on, we only need to map the - * specified memory. + * The value passed in '*virt' is a suggested virtual address for + * the mapping. Architectures which can support a direct-mapped + * physical to virtual region can return the appropriate address + * within that region, leaving '*virt' unchanged. Other + * architectures should map the pages starting at '*virt' and + * update '*virt' with the first usable address after the mapped + * region. */ vm_offset_t -pmap_map(vm_offset_t virt, vm_offset_t start, vm_offset_t end, int prot) +pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { - while (start < end) { - pmap_kenter(virt, start); - virt += PAGE_SIZE; - start += PAGE_SIZE; - } - return (virt); + return ALPHA_PHYS_TO_K0SEG(start); } |