]> Zhao Yanbai Git Server - minix.git/commitdiff
arm:caching mark normal memory cacheable during identity mapping. 50/850/2
authorKees Jongenburger <kees.jongenburger@gmail.com>
Wed, 25 Sep 2013 08:38:54 +0000 (10:38 +0200)
committerKees Jongenburger <kees.jongenburger@gmail.com>
Thu, 26 Sep 2013 10:11:28 +0000 (12:11 +0200)
Change-Id: I7cd8da168744a3f32276803e99e8af0fea772574

kernel/arch/earm/pg_utils.c

index 512623df1697f7334cd0639db53fe0bb85c8c063..df5930691eeb22a1c5510a92966c75c300212a3e 100644 (file)
@@ -157,10 +157,15 @@ void pg_identity(kinfo_t *cbi)
         for(i = 0; i < ARM_VM_DIR_ENTRIES; i++) {
                u32_t flags = ARM_VM_SECTION
                        | ARM_VM_SECTION_USER
-                       | ARM_VM_SECTION_DEVICE
                        | ARM_VM_SECTION_DOMAIN;
+
                phys = i * ARM_SECTION_SIZE;
-               pagedir[i] =  phys | flags;
+               /* mark mormal memory as cacheable. TODO: fix hard coded values */
+               if (phys >= PHYS_MEM_BEGIN && phys <= PHYS_MEM_END){
+                       pagedir[i] =  phys | flags | ARM_VM_SECTION_CACHED;
+               } else {
+                       pagedir[i] =  phys | flags | ARM_VM_SECTION_DEVICE;
+               }
         }
 }