/* * This file contains the functions and defines necessary to modify and use * the m68k page table tree.
*/
#include <asm/virtconvert.h>
/* Certain architectures need to do special things when pte's * within a page table are directly modified. Thus, the following * hook is made available.
*/ #define set_pte(pteptr, pteval) \ do{ \
*(pteptr) = (pteval); \
} while(0)
/* PMD_SHIFT determines the size of the area a second-level page table can map */ #if CONFIG_PGTABLE_LEVELS == 3 #define PMD_SHIFT 18 #endif #define PMD_SIZE (1UL << PMD_SHIFT) #define PMD_MASK (~(PMD_SIZE-1))
/* * entries per page directory level: the m68k is configured as three-level, * so we do have PMD level physically.
*/ #ifdef CONFIG_SUN3 #define PTRS_PER_PTE 16 #define __PAGETABLE_PMD_FOLDED 1 #define PTRS_PER_PMD 1 #define PTRS_PER_PGD 2048 #elifdefined(CONFIG_COLDFIRE) #define PTRS_PER_PTE 512 #define __PAGETABLE_PMD_FOLDED 1 #define PTRS_PER_PMD 1 #define PTRS_PER_PGD 1024 #else #define PTRS_PER_PTE 64 #define PTRS_PER_PMD 128 #define PTRS_PER_PGD 128 #endif #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
/* Virtual address region for use by kernel_map() */ #ifdef CONFIG_SUN3 #define KMAP_START 0x0dc00000 #define KMAP_END 0x0e000000 #elifdefined(CONFIG_COLDFIRE) #define KMAP_START 0xe0000000 #define KMAP_END 0xf0000000 #elifdefined(CONFIG_VIRT) #define KMAP_START 0xdf000000 #define KMAP_END 0xff000000 #else #define KMAP_START 0xd0000000 #define KMAP_END 0xf0000000 #endif
#ifdef CONFIG_SUN3 externunsignedlong m68k_vmalloc_end; #define VMALLOC_START 0x0f800000 #define VMALLOC_END m68k_vmalloc_end #elifdefined(CONFIG_COLDFIRE) #define VMALLOC_START 0xd0000000 #define VMALLOC_END 0xe0000000 #elifdefined(CONFIG_VIRT) #define VMALLOC_OFFSET PAGE_SIZE #define VMALLOC_START (((unsignedlong) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) #define VMALLOC_END KMAP_START #else /* Just any arbitrary offset to the start of the vmalloc VM area: the * current 8MB value just means that there will be a 8MB "hole" after the * physical memory until the kernel virtual memory starts. That means that * any out-of-bounds memory accesses will hopefully be caught. * The vmalloc() routines leaves a hole of 4kB between each vmalloced * area for the same reason. ;)
*/ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsignedlong) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) #define VMALLOC_END KMAP_START #endif
/* zero page used for uninitialized stuff */ externvoid *empty_zero_page;
/* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc..
*/ #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
/* number of bits that fit into a memory pointer */ #define BITS_PER_PTR (8*sizeof(unsignedlong))
/* to align the pointer to a pointer address */ #define PTR_MASK (~(sizeof(void*)-1))
externvoid kernel_set_cachemode(void *addr, unsignedlong size, int cmode);
/* * The m68k doesn't have any external MMU info: the kernel page * tables contain all the necessary information. The Sun3 does, but * they are updated on demand.
*/ staticinlinevoid update_mmu_cache_range(struct vm_fault *vmf, struct vm_area_struct *vma, unsignedlong address,
pte_t *ptep, unsignedint nr)
{
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.