#include <i386/tss.h>
#include <i386/user_ldt.h>
#include <i386/fpu.h>
-#include <i386/iopb_entries.h>
#include <i386/misc_protos.h>
/*
ppnum_t pn)
{
assert(pn != vm_page_fictitious_addr);
+ assert(pn != vm_page_guard_addr);
bzero_phys((addr64_t)i386_ptob(pn), PAGE_SIZE);
}
vm_size_t len)
{
assert(pn != vm_page_fictitious_addr);
+ assert(pn != vm_page_guard_addr);
assert(offset + len <= PAGE_SIZE);
bzero_phys((addr64_t)(i386_ptob(pn) + offset), len);
}
assert(psrc != vm_page_fictitious_addr);
assert(pdst != vm_page_fictitious_addr);
+ assert(psrc != vm_page_guard_addr);
+ assert(pdst != vm_page_guard_addr);
src = i386_ptob(psrc);
dst = i386_ptob(pdst);
mapwindow_t *map;
assert(pdst != vm_page_fictitious_addr);
+ assert(pdst != vm_page_guard_addr);
assert((dst_offset + len) <= PAGE_SIZE);
mp_disable_preemption();
map = pmap_get_mapwindow(INTEL_PTE_VALID | INTEL_PTE_RW | (i386_ptob(pdst) & PG_FRAME) |
INTEL_PTE_REF | INTEL_PTE_MOD);
- if (map == 0) {
- panic("pmap_copy_part_lpage");
- }
- invlpg((uintptr_t)map->prv_CADDR);
memcpy((void *) (map->prv_CADDR + (dst_offset & INTEL_OFFMASK)), (void *) src, len);
- *map->prv_CMAP = 0;
+
+ pmap_put_mapwindow(map);
mp_enable_preemption();
}
mapwindow_t *map;
assert(psrc != vm_page_fictitious_addr);
+ assert(psrc != vm_page_guard_addr);
assert((src_offset + len) <= PAGE_SIZE);
mp_disable_preemption();
map = pmap_get_mapwindow(INTEL_PTE_VALID | INTEL_PTE_RW | (i386_ptob(psrc) & PG_FRAME) |
INTEL_PTE_REF);
- if (map == 0) {
- panic("pmap_copy_part_rpage");
- }
- invlpg((uintptr_t) map->prv_CADDR);
memcpy((void *) dst, (void *) (map->prv_CADDR + (src_offset & INTEL_OFFMASK)), len);
- *map->prv_CMAP = 0;
+
+ pmap_put_mapwindow(map);
mp_enable_preemption();
}
{
pt_entry_t *ptep;
pmap_paddr_t pa;
-
+
mp_disable_preemption();
if ((ptep = pmap_pte(kernel_pmap, (vm_map_offset_t)addr)) == PT_ENTRY_NULL) {
- pa = 0;
+ pa = 0;
} else {
- pa = pte_to_pa(*ptep) | (addr & INTEL_OFFMASK);
+ pa = pte_to_pa(*ptep) | (addr & INTEL_OFFMASK);
}
mp_enable_preemption_no_check();
+
return ((addr64_t)pa);
}