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
This commit is contained in:
Marcel Moolenaar 2013-02-25 02:41:38 +00:00
parent 6d4a620eba
commit c78a079c40
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=247251
2 changed files with 9 additions and 8 deletions

View File

@ -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;
}

View File

@ -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