diff options
Diffstat (limited to 'i386/intel')
-rw-r--r-- | i386/intel/pmap.h | 28 | ||||
-rw-r--r-- | i386/intel/read_fault.h | 35 |
2 files changed, 63 insertions, 0 deletions
diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h index 0255f5a..b16d984 100644 --- a/i386/intel/pmap.h +++ b/i386/intel/pmap.h @@ -42,6 +42,7 @@ #include <mach/machine/vm_param.h> #include <mach/vm_statistics.h> #include <mach/kern_return.h> +#include <mach/vm_prot.h> #include <i386/proc_reg.h> /* @@ -363,6 +364,33 @@ pt_entry_t *pmap_pte(pmap_t pmap, vm_offset_t addr); #define pmap_attribute(pmap,addr,size,attr,value) \ (KERN_INVALID_ADDRESS) +/* + * Bootstrap the system enough to run with virtual memory. + * Allocate the kernel page directory and page tables, + * and direct-map all physical memory. + * Called with mapping off. + */ +extern void pmap_bootstrap(void); + +extern void pmap_unmap_page_zero (void); + +/* + * pmap_zero_page zeros the specified (machine independent) page. + */ +extern void pmap_zero_page (vm_offset_t); + +/* + * pmap_copy_page copies the specified (machine independent) pages. + */ +extern void pmap_copy_page (vm_offset_t, vm_offset_t); + +/* + * kvtophys(addr) + * + * Convert a kernel virtual address to a physical address + */ +extern vm_offset_t kvtophys (vm_offset_t); + #endif /* __ASSEMBLER__ */ #endif /* _PMAP_MACHINE_ */ diff --git a/i386/intel/read_fault.h b/i386/intel/read_fault.h new file mode 100644 index 0000000..8aa3f03 --- /dev/null +++ b/i386/intel/read_fault.h @@ -0,0 +1,35 @@ +/* + * Kernel read_fault on i386 functions + * Copyright (C) 2008 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Author: Barry deFreese. + */ +/* + * Kernel read_fault on i386 functions. + * + */ + +#ifndef _READ_FAULT_H_ +#define _READ_FAULT_H_ + +#include <mach/std_types.h> + +extern kern_return_t intel_read_fault( + vm_map_t map, + vm_offset_t vaddr); + +#endif /* _READ_FAULT_H_ */ |