#ifndef __MT_VM_H__ #define __MT_VM_H__ #include "main.h" #include "tlb.h" /* * Default values for where the TEXT, STACK, and DATA segments start. * * These are the values that are normally used for Ultrix. We use them * too because we compile Ultrix code. * * Have to give the end value for the stack (instead of the start) * because it grows down. */ #define TEXT_START 0x00400000 #define DATA_START 0x10000000 #define STACK_END 0x80000000 /* maximum size of memory */ #define MAX_MEMORY_SIZE (16*1024*1024) /* * Initialize the segments for the VM system. * * Assume that the addresses are aligned on page boundaries. * * Valid virtual addresses are for addresses that: * min_addr <= addr < max_addr * */ void mt_vm_initialize(unsigned min_text_addr, unsigned max_text_addr, unsigned min_stack_addr, unsigned max_stack_addr, unsigned min_data_addr, unsigned max_data_addr); /* convert the virtual page to a physical page and set the flags */ PTE mt_tlb_translate_fault(unsigned long vpage); /* write fault occured at this virtual page, expected return * value is a new value for the protection flags for this virtual * page */ unsigned long mt_tlb_write_fault(unsigned long vpage); #endif __MT_VM_H__