summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/vm_param.h2
-rw-r--r--i386/i386at/model_dep.c8
-rw-r--r--i386/intel/pmap.c6
3 files changed, 9 insertions, 7 deletions
diff --git a/i386/i386/vm_param.h b/i386/i386/vm_param.h
index 6abbf8f..49ba663 100644
--- a/i386/i386/vm_param.h
+++ b/i386/i386/vm_param.h
@@ -25,7 +25,9 @@
/* XXX use xu/vm_param.h */
#include <mach/vm_param.h>
+#ifdef MACH_XEN
#include <xen/public/xen.h>
+#endif
/* The kernel address space is usually 1GB, usually starting at virtual address 0. */
#ifdef MACH_XEN
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index ef2d672..01d515d 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -703,9 +703,9 @@ init_alloc_aligned(vm_size_t size, vm_offset_t *addrp)
}
/* Skip our own kernel code, data, and bss. */
- if ((avail_next > (vm_offset_t)start) && (addr < (vm_offset_t)end))
+ if ((phystokv(avail_next) > (vm_offset_t)start) && (phystokv(addr) < (vm_offset_t)end))
{
- avail_next = (vm_offset_t)end;
+ avail_next = _kvtophys(end);
goto retry;
}
@@ -720,9 +720,9 @@ init_alloc_aligned(vm_size_t size, vm_offset_t *addrp)
avail_next = mods_end_pa;
goto retry;
}
- if ((avail_next > kern_sym_start) && (addr < kern_sym_end))
+ if ((phystokv(avail_next) > kern_sym_start) && (phystokv(addr) < kern_sym_end))
{
- avail_next = kern_sym_end;
+ avail_next = _kvtophys(kern_sym_end);
goto retry;
}
if (boot_info.flags & MULTIBOOT_MODS)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 51ca00e..d8865b2 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1856,9 +1856,9 @@ Retry:
| INTEL_PTE_WRITE))
panic("%s:%d could not set pde %p(%p,%p) to %p(%p,%p) %p\n",__FILE__,__LINE__, pdp, kvtophys((vm_offset_t)pdp), (vm_offset_t) pa_to_ma(kvtophys((vm_offset_t)pdp)), ptp, kvtophys(ptp), (vm_offset_t) pa_to_ma(kvtophys(ptp)), (vm_offset_t) pa_to_pte(kv_to_ma(ptp)));
#else /* MACH_XEN */
- *pdp = pa_to_pte(ptp) | INTEL_PTE_VALID
- | INTEL_PTE_USER
- | INTEL_PTE_WRITE;
+ *pdp = pa_to_pte(kvtophys(ptp)) | INTEL_PTE_VALID
+ | INTEL_PTE_USER
+ | INTEL_PTE_WRITE;
#endif /* MACH_XEN */
pdp++;
ptp += INTEL_PGBYTES;