]> Zhao Yanbai Git Server - minix.git/commitdiff
ARM:Rename ARM_BIG_PAGE to ARM_SECTION. 36/536/1
authorKees Jongenburger <keesj@minix3.org>
Mon, 29 Apr 2013 09:42:26 +0000 (11:42 +0200)
committerKees Jongenburger <keesj@minix3.org>
Mon, 29 Apr 2013 09:42:26 +0000 (11:42 +0200)
The natural term to use when talking about MINIX big pages on ARM
is SECTION. A section is a level 1 page table entry pointing to
a 1MB area.

Change-Id: I9bd27ca99bc772126c31c27a537b1415db20c4a6

include/arch/earm/include/vm.h
kernel/arch/earm/memory.c
kernel/arch/earm/pg_utils.c
servers/vm/arch/earm/pagetable.h

index 3800d907b68b69a347cabcff2637b1b3e20b2c96..8383b0661b529b341319f5046583ccf1441c89c9 100644 (file)
@@ -6,7 +6,6 @@ arm/vm.h
 
 #define ARM_PAGE_SIZE          4096 /* small page on ARM  */
 #define ARM_SECTION_SIZE       (1024 * 1024) /* 1 MB section */
-#define ARM_BIG_PAGE_SIZE      (ARM_SECTION_SIZE)
 
 /* Page table specific flags. */
 #define ARM_VM_PAGETABLE       (1 << 1)  /* Page table */
@@ -47,7 +46,6 @@ arm/vm.h
 #define ARM_VM_SECTION_WT      ((0x6 << 12) | ARM_VM_SECTION_CACHEABLE)
 /* shareable device */
 #define ARM_VM_SECTION_DEVICE  (ARM_VM_SECTION_BUFFERABLE)
-#define ARM_VM_BIGPAGE         (ARM_VM_SECTION)  /* 1MB section */
 
 /* Page directory specific flags. */
 #define ARM_VM_PAGEDIR         (1 << 0)  /* Page directory */
index e3ebedd2d45596752e630236d0b56c379cba1468..7d2123adaadbc64879d8ec7c337a8f1fb7d8db71 100644 (file)
@@ -123,10 +123,10 @@ static phys_bytes createpde(
         * if that is less than the requested range.
         */
        offset = linaddr & ARM_VM_OFFSET_MASK_1MB; /* Offset in 1MB window. */
-       *bytes = MIN(*bytes, ARM_BIG_PAGE_SIZE - offset);
+       *bytes = MIN(*bytes, ARM_SECTION_SIZE - offset);
 
        /* Return the linear address of the start of the new mapping. */
-       return ARM_BIG_PAGE_SIZE*pde + offset;
+       return ARM_SECTION_SIZE*pde + offset;
 }
 
 
@@ -315,7 +315,7 @@ int vm_lookup(const struct proc *proc, const vir_bytes virtual,
 
        /* We don't expect to ever see this. 
         * LSC Impossible with the previous test.
-       if(pde_v & ARM_VM_BIGPAGE) {
+       if(pde_v & ARM_VM_SECTION) {
                *physical = pde_v & ARM_VM_SECTION_MASK;
                if(ptent) *ptent = pde_v;
                *physical += virtual & ARM_VM_OFFSET_MASK_1MB;
index 17584db8ae0be2e99a6c2fbd3af3a31413f8db5d..eb2403ab646ade6e5985bbca5c9b3773d34570ad 100644 (file)
@@ -160,7 +160,7 @@ void pg_identity(kinfo_t *cbi)
                u32_t flags = ARM_VM_SECTION
                        | ARM_VM_SECTION_USER
                        | ARM_VM_SECTION_DOMAIN;
-               phys = i * ARM_BIG_PAGE_SIZE;
+               phys = i * ARM_SECTION_SIZE;
                pagedir[i] =  phys | flags;
         }
 }
@@ -170,16 +170,16 @@ int pg_mapkernel(void)
        int pde;
        u32_t mapped = 0, kern_phys = kern_phys_start;
 
-       assert(!(kern_vir_start % ARM_BIG_PAGE_SIZE));
-       assert(!(kern_phys_start % ARM_BIG_PAGE_SIZE));
-       pde = kern_vir_start / ARM_BIG_PAGE_SIZE; /* start pde */
+       assert(!(kern_vir_start % ARM_SECTION_SIZE));
+       assert(!(kern_phys_start % ARM_SECTION_SIZE));
+       pde = kern_vir_start / ARM_SECTION_SIZE; /* start pde */
        while(mapped < kern_kernlen) {
                pagedir[pde] = (kern_phys & ARM_VM_PDE_MASK) | ARM_VM_SECTION
                        | ARM_VM_SECTION_SUPER
                        | ARM_VM_SECTION_DOMAIN
                        | ARM_VM_SECTION_WT;
-               mapped += ARM_BIG_PAGE_SIZE;
-               kern_phys += ARM_BIG_PAGE_SIZE;
+               mapped += ARM_SECTION_SIZE;
+               kern_phys += ARM_SECTION_SIZE;
                pde++;
        }
        return pde;     /* free pde */
index 8c74cf8ca07d0d883188af55cb5a3b5a8ffe2593..c877866f6e95c2b519fa2e16ec37da91f3469259 100644 (file)
@@ -19,7 +19,7 @@
 #define PTF_SHARE      ARM_VM_PTE_SHAREABLE
 
 #define ARCH_VM_DIR_ENTRIES     ARM_VM_DIR_ENTRIES
-#define ARCH_BIG_PAGE_SIZE      ARM_BIG_PAGE_SIZE
+#define ARCH_BIG_PAGE_SIZE      ARM_SECTION_SIZE
 #define ARCH_VM_ADDR_MASK       ARM_VM_ADDR_MASK
 #define ARCH_VM_PDE_MASK       ARM_VM_PDE_MASK
 #define ARCH_VM_PDE_PRESENT    ARM_VM_PDE_PRESENT
@@ -27,7 +27,7 @@
 #define ARCH_VM_PTE_USER       ARM_VM_PTE_USER
 #define ARCH_PAGEDIR_SIZE      ARM_PAGEDIR_SIZE
 #define ARCH_VM_PTE_RW         ARM_VM_PTE_RW
-#define ARCH_VM_BIGPAGE                ARM_VM_BIGPAGE
+#define ARCH_VM_BIGPAGE                ARM_VM_SECTION
 #define ARCH_VM_PT_ENTRIES     ARM_VM_PT_ENTRIES
 #define ARCH_VM_PTE_RO         ARM_VM_PTE_RO