diff options
author | marcel <marcel@FreeBSD.org> | 2013-02-25 02:41:38 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2013-02-25 02:41:38 +0000 |
commit | e8ba976b7dfb1172cef92f2d7f0f844edd05ca86 (patch) | |
tree | 26f1cc35315e7297206cf28ea0c2567bc575624b /sys/ia64 | |
parent | 59678235a83f4d24f35261b9ce906fef4a724c98 (diff) | |
download | FreeBSD-src-e8ba976b7dfb1172cef92f2d7f0f844edd05ca86.zip FreeBSD-src-e8ba976b7dfb1172cef92f2d7f0f844edd05ca86.tar.gz |
kernacc() expects all KVAs to be covered in the kernel map. With the
introduction of the PBVM, this stopped being the case. Redefine the
VM parameters so that the PBVM is included in the kernel map. In
particular this introduces VM_INIT_KERNEL_ADDRESS to point to the base
of region 5 now that VM_MIN_KERNEL_ADDRESS points to the base of
region 4 to include the PBVM.
While here define KERNBASE to the actual link address of the kernel as
is intended.
PR: 169926
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 8 | ||||
-rw-r--r-- | sys/ia64/include/vmparam.h | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 594f8c6..fcc00f4 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -387,7 +387,7 @@ pmap_bootstrap() */ ia64_kptdir = ia64_physmem_alloc(PAGE_SIZE, PAGE_SIZE); nkpt = 0; - kernel_vm_end = VM_MIN_KERNEL_ADDRESS; + kernel_vm_end = VM_INIT_KERNEL_ADDRESS; /* * Determine a valid (mappable) VHPT size. @@ -425,7 +425,7 @@ pmap_bootstrap() ia64_set_pta(base + (1 << 8) + (pmap_vhpt_log2size << 2) + 1); ia64_srlz_i(); - virtual_avail = VM_MIN_KERNEL_ADDRESS; + virtual_avail = VM_INIT_KERNEL_ADDRESS; virtual_end = VM_MAX_KERNEL_ADDRESS; /* @@ -1383,7 +1383,7 @@ pmap_kextract(vm_offset_t va) /* Region 5 is our KVA. Bail out if the VA is beyond our limits. */ if (va >= kernel_vm_end) goto err_out; - if (va >= VM_MIN_KERNEL_ADDRESS) { + if (va >= VM_INIT_KERNEL_ADDRESS) { pte = pmap_find_kpte(va); pa = pmap_present(pte) ? pmap_ppn(pte) | (va & PAGE_MASK) : 0; goto out; @@ -2746,7 +2746,7 @@ DB_COMMAND(kpte, db_kpte) db_printf("usage: kpte <kva>\n"); return; } - if (addr < VM_MIN_KERNEL_ADDRESS) { + if (addr < VM_INIT_KERNEL_ADDRESS) { db_printf("kpte: error: invalid <kva>\n"); return; } diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h index 16c5e7d..10125db 100644 --- a/sys/ia64/include/vmparam.h +++ b/sys/ia64/include/vmparam.h @@ -181,12 +181,13 @@ /* user/kernel map constants */ #define VM_MIN_ADDRESS 0 #define VM_MAXUSER_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION) -#define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1) -#define VM_MAX_KERNEL_ADDRESS \ - (VM_MIN_KERNEL_ADDRESS + IA64_REGION_GAP_START - 1) +#define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS +#define VM_INIT_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1) +#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1) #define VM_MAX_ADDRESS ~0UL -#define KERNBASE VM_MAXUSER_ADDRESS +/* We link the kernel at IA64_PBVM_BASE. */ +#define KERNBASE IA64_PBVM_BASE /* * USRSTACK is the top (end) of the user stack. Immediately above the user |