]> Zhao Yanbai Git Server - minix.git/commitdiff
arm:remove pre 1:1 mapping workarounds. 32/632/3
authorKees Jongenburger <kees.jongenburger@gmail.com>
Wed, 12 Jun 2013 08:19:22 +0000 (10:19 +0200)
committerGerrit Code Review <gerrit@gerrit>
Wed, 12 Jun 2013 14:42:20 +0000 (16:42 +0200)
Change-Id: I5a690cf5a561cdca9b9c1f031402f80fd203c92d

kernel/arch/earm/memory.c
servers/vm/arch/i386/pagetable.c

index c7cdc146c096b7b3220e262224822b1a00f1dcf5..0e7e449af71d096af7f1a6b6ee046806a8074d8c 100644 (file)
@@ -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;
 }
 
index c9e6d8fc32a34064a4832870fae41f7327d53595..ea548843075526b9afdd5c2939b436a8f9b26251 100644 (file)
@@ -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,