diff --git a/kernel/arch/earm/memory.c b/kernel/arch/earm/memory.c index c7cdc146c..0e7e449af 100644 --- a/kernel/arch/earm/memory.c +++ b/kernel/arch/earm/memory.c @@ -20,7 +20,6 @@ #include "kernel/debug.h" #include "omap_timer.h" -phys_bytes device_mem_vaddr = 0; #define HASPT(procptr) ((procptr)->p_seg.p_ttbr != 0) static int nfreepdes = 0; @@ -678,12 +677,10 @@ void arch_proc_init(struct proc *pr, const u32_t ip, const u32_t sp, char *name) pr->p_reg.sp = sp; } -static int device_mem_mapping_index = -1, - frclock_index = -1, +static int frclock_index = -1, usermapped_glo_index = -1, usermapped_index = -1, first_um_idx = -1; -char *device_mem; /* defined in kernel.lds */ extern char usermapped_start, usermapped_end, usermapped_nonglo_start; @@ -702,7 +699,6 @@ int arch_phys_map(const int index, if(first) { memset(&minix_kerninfo, 0, sizeof(minix_kerninfo)); - device_mem_mapping_index = freeidx++; frclock_index = freeidx++; if(glo_len > 0) { usermapped_glo_index = freeidx++; @@ -736,21 +732,6 @@ int arch_phys_map(const int index, *flags = VMMF_USER; return OK; } - else if (index == device_mem_mapping_index) { -#ifdef DM37XX - /* map device memory */ - *addr = 0x48000000; - *len = 0x02000000; -#endif -#ifdef AM335X - /* map device memory until 0x5700 SGX */ - *addr = 0x44000000; - *len = 0x06000000; - -#endif - *flags = VMMF_UNCACHED | VMMF_WRITE; - return OK; - } else if (index == frclock_index) { #ifdef DM37XX @@ -808,10 +789,6 @@ int arch_phys_map_reply(const int index, const vir_bytes addr) if (index == usermapped_index) { return OK; } - else if (index == device_mem_mapping_index) { - device_mem_vaddr = addr; - return OK; - } else if (index == frclock_index) { #ifdef DM37XX minix_kerninfo.minix_frclock = addr; @@ -862,9 +839,6 @@ int arch_enable_paging(struct proc * caller) phys_maps = phys_maps->next; } - - device_mem = (char *) device_mem_vaddr; - return OK; } diff --git a/servers/vm/arch/i386/pagetable.c b/servers/vm/arch/i386/pagetable.c index c9e6d8fc3..ea5488430 100644 --- a/servers/vm/arch/i386/pagetable.c +++ b/servers/vm/arch/i386/pagetable.c @@ -1397,34 +1397,6 @@ int pt_mapkernel(pt_t *pt) /* Kernel also wants various mappings of its own. */ for(i = 0; i < kernmappings; i++) { int r; -#if defined(__arm__) - -#ifdef DM37XX -//FIXME this special case will be removed once we have non 1:1 mapping -#define XXX 0x48000000 -#endif -#ifdef AM335X -#define XXX 0x44000000 -#endif - if(kern_mappings[i].phys_addr == XXX) { - addr = kern_mappings[i].phys_addr; - assert(!(kern_mappings[i].len % ARCH_BIG_PAGE_SIZE)); - for(mapped = 0; mapped < kern_mappings[i].len; - mapped += ARCH_BIG_PAGE_SIZE) { - int map_pde = addr / ARCH_BIG_PAGE_SIZE; - assert(!(addr % ARCH_BIG_PAGE_SIZE)); - assert(addr == (addr & ARCH_VM_PDE_MASK)); - assert(!pt->pt_dir[map_pde]); - pt->pt_dir[map_pde] = addr | - ARM_VM_SECTION | ARM_VM_SECTION_DOMAIN | - ARM_VM_SECTION_DEVICE | - ARM_VM_SECTION_SUPER; - addr += ARCH_BIG_PAGE_SIZE; - } - continue; - } -#endif - if((r=pt_writemap(NULL, pt, kern_mappings[i].vir_addr, kern_mappings[i].phys_addr,