T306: Rename mapping.frame to mapping.cap
authorMoritz Hoffmann <moritz.hoffmann@inf.ethz.ch>
Tue, 11 Oct 2016 09:18:37 +0000 (11:18 +0200)
committerMoritz Hoffmann <moritz.hoffmann@inf.ethz.ch>
Tue, 11 Oct 2016 09:18:37 +0000 (11:18 +0200)
Signed-off-by: Moritz Hoffmann <moritz.hoffmann@inf.ethz.ch>

capabilities/caps.hl
kernel/arch/x86_32/page_mappings_arch.c
kernel/arch/x86_64/page_mappings_arch.c
kernel/capabilities.c
kernel/paging_generic.c
lib/barrelfish/debug.c

index 3e2e808..5ac1cbf 100644 (file)
@@ -68,12 +68,12 @@ cap Memory abstract {
 cap PhysAddr from_self inherit Memory;
 
 cap Mapping abstract {
-    "struct capability" frame;
+    "struct capability" cap;
     eq lvaddr pte;
     uint32 offset;
     uint16 pte_count;
 
-    address { get_address(frame) };
+    address { get_address(cap) };
 };
 
 cap VNode abstract {
index 7ec3ff4..61ff2a8 100644 (file)
@@ -320,7 +320,7 @@ errval_t page_mappings_modify_flags(struct capability *mapping, size_t offset,
     /* Calculate page access protection flags */
     // Get frame cap rights
     paging_x86_32_flags_t flags =
-        paging_x86_32_cap_to_page_flags(info->frame->rights);
+        paging_x86_32_cap_to_page_flags(info->cap->rights);
     // Mask with provided access rights mask
     flags = paging_x86_32_mask_attrs(flags, X86_32_PTABLE_ACCESS(mflags));
     // Add additional arch-specific flags
index 98726f5..429aae3 100644 (file)
@@ -373,7 +373,7 @@ errval_t page_mappings_modify_flags(struct capability *mapping, size_t offset,
     /* Calculate page access protection flags */
     // Get frame cap rights
     paging_x86_64_flags_t flags =
-        paging_x86_64_cap_to_page_flags(info->frame->rights);
+        paging_x86_64_cap_to_page_flags(info->cap->rights);
     // Mask with provided access rights mask
     flags = paging_x86_64_mask_attrs(flags, X86_64_PTABLE_ACCESS(mflags));
     // Add additional arch-specific flags
index ec19ebc..0212bd2 100644 (file)
@@ -150,105 +150,105 @@ int sprint_cap(char *buf, size_t len, struct capability *cap)
     case ObjType_Frame_Mapping:
         return snprintf(buf, len, "Frame Mapping (Frame cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.frame_mapping.frame,
+                                  cap->u.frame_mapping.cap,
                                   cap->u.frame_mapping.pte,
                                   cap->u.frame_mapping.pte_count);
 
     case ObjType_DevFrame_Mapping:
         return snprintf(buf, len, "DevFrame Mapping (DevFrame cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.devframe_mapping.frame,
+                                  cap->u.devframe_mapping.cap,
                                   cap->u.devframe_mapping.pte,
                                   cap->u.devframe_mapping.pte_count);
 
     case ObjType_VNode_x86_64_pml4_Mapping:
         return snprintf(buf, len, "x86_64 PML4 Mapping (x86_64 PML4 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_pml4_mapping.frame,
+                                  cap->u.vnode_x86_64_pml4_mapping.cap,
                                   cap->u.vnode_x86_64_pml4_mapping.pte,
                                   cap->u.vnode_x86_64_pml4_mapping.pte_count);
 
     case ObjType_VNode_x86_64_pdpt_Mapping:
         return snprintf(buf, len, "x86_64 PDPT Mapping (x86_64 PDPT cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_pdpt_mapping.frame,
+                                  cap->u.vnode_x86_64_pdpt_mapping.cap,
                                   cap->u.vnode_x86_64_pdpt_mapping.pte,
                                   cap->u.vnode_x86_64_pdpt_mapping.pte_count);
 
     case ObjType_VNode_x86_64_pdir_Mapping:
         return snprintf(buf, len, "x86_64 PDIR Mapping (x86_64 PDIR cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_pdir_mapping.frame,
+                                  cap->u.vnode_x86_64_pdir_mapping.cap,
                                   cap->u.vnode_x86_64_pdir_mapping.pte,
                                   cap->u.vnode_x86_64_pdir_mapping.pte_count);
 
     case ObjType_VNode_x86_64_ptable_Mapping:
         return snprintf(buf, len, "x86_64 PTABLE Mapping (x86_64 PTABLE cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_ptable_mapping.frame,
+                                  cap->u.vnode_x86_64_ptable_mapping.cap,
                                   cap->u.vnode_x86_64_ptable_mapping.pte,
                                   cap->u.vnode_x86_64_ptable_mapping.pte_count);
 
     case ObjType_VNode_x86_32_pdpt_Mapping:
         return snprintf(buf, len, "x86_32 PDPT Mapping (x86_32 PDPT cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_32_pdpt_mapping.frame,
+                                  cap->u.vnode_x86_32_pdpt_mapping.cap,
                                   cap->u.vnode_x86_32_pdpt_mapping.pte,
                                   cap->u.vnode_x86_32_pdpt_mapping.pte_count);
 
     case ObjType_VNode_x86_32_pdir_Mapping:
         return snprintf(buf, len, "x86_32 PDIR Mapping (x86_32 PDIR cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_32_pdir_mapping.frame,
+                                  cap->u.vnode_x86_32_pdir_mapping.cap,
                                   cap->u.vnode_x86_32_pdir_mapping.pte,
                                   cap->u.vnode_x86_32_pdir_mapping.pte_count);
 
     case ObjType_VNode_x86_32_ptable_Mapping:
         return snprintf(buf, len, "x86_32 PTABLE Mapping (x86_32 PTABLE cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_32_ptable_mapping.frame,
+                                  cap->u.vnode_x86_32_ptable_mapping.cap,
                                   cap->u.vnode_x86_32_ptable_mapping.pte,
                                   cap->u.vnode_x86_32_ptable_mapping.pte_count);
 
     case ObjType_VNode_ARM_l1_Mapping:
         return snprintf(buf, len, "ARM l1 Mapping (ARM l1 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_arm_l1_mapping.frame,
+                                  cap->u.vnode_arm_l1_mapping.cap,
                                   cap->u.vnode_arm_l1_mapping.pte,
                                   cap->u.vnode_arm_l1_mapping.pte_count);
 
     case ObjType_VNode_ARM_l2_Mapping:
         return snprintf(buf, len, "ARM l2 Mapping (ARM l2 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_arm_l2_mapping.frame,
+                                  cap->u.vnode_arm_l2_mapping.cap,
                                   cap->u.vnode_arm_l2_mapping.pte,
                                   cap->u.vnode_arm_l2_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l0_Mapping:
         return snprintf(buf, len, "AARCH64 l0 Mapping (AARCH64 l0 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l0_mapping.frame,
+                                  cap->u.vnode_aarch64_l0_mapping.cap,
                                   cap->u.vnode_aarch64_l0_mapping.pte,
                                   cap->u.vnode_aarch64_l0_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l1_Mapping:
         return snprintf(buf, len, "AARCH64 l1 Mapping (AARCH64 l1 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l1_mapping.frame,
+                                  cap->u.vnode_aarch64_l1_mapping.cap,
                                   cap->u.vnode_aarch64_l1_mapping.pte,
                                   cap->u.vnode_aarch64_l1_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l2_Mapping:
         return snprintf(buf, len, "AARCH64 l2 Mapping (AARCH64 l2 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l2_mapping.frame,
+                                  cap->u.vnode_aarch64_l2_mapping.cap,
                                   cap->u.vnode_aarch64_l2_mapping.pte,
                                   cap->u.vnode_aarch64_l2_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l3_Mapping:
         return snprintf(buf, len, "AARCH64 l3 Mapping (AARCH64 l3 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l3_mapping.frame,
+                                  cap->u.vnode_aarch64_l3_mapping.cap,
                                   cap->u.vnode_aarch64_l3_mapping.pte,
                                   cap->u.vnode_aarch64_l3_mapping.pte_count);
 
index 4f58f15..0307104 100644 (file)
@@ -30,7 +30,7 @@ static inline errval_t find_mapping_for_cap(struct cte *cap, struct cte **mappin
     while ((next = mdb_successor(next)) && get_address(&next->cap) == faddr)
     {
         if (next->cap.type == get_mapping_type(cap->cap.type) &&
-            next->cap.u.frame_mapping.frame == &cap->cap)
+            next->cap.u.frame_mapping.cap == &cap->cap)
         {
             *mapping = next;
             return SYS_ERR_OK;
@@ -94,7 +94,7 @@ static inline size_t get_offset(struct cte *mapping, struct cte *next)
 /*
  * 'set_cap()' for mapping caps
  */
-void create_mapping_cap(struct cte *mapping_cte, struct capability *frame,
+void create_mapping_cap(struct cte *mapping_cte, struct capability *cap,
                         lvaddr_t pte, size_t offset, size_t pte_count)
 {
     assert(mapping_cte->cap.type == ObjType_Null);
@@ -102,8 +102,8 @@ void create_mapping_cap(struct cte *mapping_cte, struct capability *frame,
     // the offset needs to have no more than 42 significant bits. FIXME
     assert((offset & ~MASK(42)) == 0);
 
-    mapping_cte->cap.type = get_mapping_type(frame->type);
-    mapping_cte->cap.u.frame_mapping.frame = frame;
+    mapping_cte->cap.type = get_mapping_type(cap->type);
+    mapping_cte->cap.u.frame_mapping.cap = cap;
     mapping_cte->cap.u.frame_mapping.pte = pte;
     mapping_cte->cap.u.frame_mapping.offset = offset >> 10;
     mapping_cte->cap.u.frame_mapping.pte_count = pte_count;
@@ -220,7 +220,7 @@ errval_t unmap_capability(struct cte *mem)
     while ((next = mdb_successor(next)) && get_address(&next->cap) == faddr) {
         TRACE_CAP_MSG("looking at", next);
         if (next->cap.type == get_mapping_type(mem->cap.type) &&
-            next->cap.u.frame_mapping.frame == &mem->cap)
+            next->cap.u.frame_mapping.cap == &mem->cap)
         {
             TRACE_CAP_MSG("cleaning up mapping", next);
             mapping_count ++;
index 954f097..8ad8729 100644 (file)
@@ -248,105 +248,105 @@ int debug_print_cap(char *buf, size_t len, struct capability *cap)
     case ObjType_Frame_Mapping:
         return snprintf(buf, len, "Frame Mapping (Frame cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.frame_mapping.frame,
+                                  cap->u.frame_mapping.cap,
                                   cap->u.frame_mapping.pte,
                                   cap->u.frame_mapping.pte_count);
 
     case ObjType_DevFrame_Mapping:
         return snprintf(buf, len, "DevFrame Mapping (DevFrame cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.devframe_mapping.frame,
+                                  cap->u.devframe_mapping.cap,
                                   cap->u.devframe_mapping.pte,
                                   cap->u.devframe_mapping.pte_count);
 
     case ObjType_VNode_x86_64_pml4_Mapping:
         return snprintf(buf, len, "x86_64 PML4 Mapping (x86_64 PML4 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_pml4_mapping.frame,
+                                  cap->u.vnode_x86_64_pml4_mapping.cap,
                                   cap->u.vnode_x86_64_pml4_mapping.pte,
                                   cap->u.vnode_x86_64_pml4_mapping.pte_count);
 
     case ObjType_VNode_x86_64_pdpt_Mapping:
         return snprintf(buf, len, "x86_64 PDPT Mapping (x86_64 PDPT cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_pdpt_mapping.frame,
+                                  cap->u.vnode_x86_64_pdpt_mapping.cap,
                                   cap->u.vnode_x86_64_pdpt_mapping.pte,
                                   cap->u.vnode_x86_64_pdpt_mapping.pte_count);
 
     case ObjType_VNode_x86_64_pdir_Mapping:
         return snprintf(buf, len, "x86_64 PDIR Mapping (x86_64 PDIR cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_pdir_mapping.frame,
+                                  cap->u.vnode_x86_64_pdir_mapping.cap,
                                   cap->u.vnode_x86_64_pdir_mapping.pte,
                                   cap->u.vnode_x86_64_pdir_mapping.pte_count);
 
     case ObjType_VNode_x86_64_ptable_Mapping:
         return snprintf(buf, len, "x86_64 PTABLE Mapping (x86_64 PTABLE cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_64_ptable_mapping.frame,
+                                  cap->u.vnode_x86_64_ptable_mapping.cap,
                                   cap->u.vnode_x86_64_ptable_mapping.pte,
                                   cap->u.vnode_x86_64_ptable_mapping.pte_count);
 
     case ObjType_VNode_x86_32_pdpt_Mapping:
         return snprintf(buf, len, "x86_32 PDPT Mapping (x86_32 PDPT cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_32_pdpt_mapping.frame,
+                                  cap->u.vnode_x86_32_pdpt_mapping.cap,
                                   cap->u.vnode_x86_32_pdpt_mapping.pte,
                                   cap->u.vnode_x86_32_pdpt_mapping.pte_count);
 
     case ObjType_VNode_x86_32_pdir_Mapping:
         return snprintf(buf, len, "x86_32 PDIR Mapping (x86_32 PDIR cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_32_pdir_mapping.frame,
+                                  cap->u.vnode_x86_32_pdir_mapping.cap,
                                   cap->u.vnode_x86_32_pdir_mapping.pte,
                                   cap->u.vnode_x86_32_pdir_mapping.pte_count);
 
     case ObjType_VNode_x86_32_ptable_Mapping:
         return snprintf(buf, len, "x86_32 PTABLE Mapping (x86_32 PTABLE cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_x86_32_ptable_mapping.frame,
+                                  cap->u.vnode_x86_32_ptable_mapping.cap,
                                   cap->u.vnode_x86_32_ptable_mapping.pte,
                                   cap->u.vnode_x86_32_ptable_mapping.pte_count);
 
     case ObjType_VNode_ARM_l1_Mapping:
         return snprintf(buf, len, "ARM l1 Mapping (ARM l1 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_arm_l1_mapping.frame,
+                                  cap->u.vnode_arm_l1_mapping.cap,
                                   cap->u.vnode_arm_l1_mapping.pte,
                                   cap->u.vnode_arm_l1_mapping.pte_count);
 
     case ObjType_VNode_ARM_l2_Mapping:
         return snprintf(buf, len, "ARM l2 Mapping (ARM l2 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_arm_l2_mapping.frame,
+                                  cap->u.vnode_arm_l2_mapping.cap,
                                   cap->u.vnode_arm_l2_mapping.pte,
                                   cap->u.vnode_arm_l2_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l0_Mapping:
         return snprintf(buf, len, "AARCH64 l0 Mapping (AARCH64 l0 cap @0x%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l0_mapping.frame,
+                                  cap->u.vnode_aarch64_l0_mapping.cap,
                                   cap->u.vnode_aarch64_l0_mapping.pte,
                                   cap->u.vnode_aarch64_l0_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l1_Mapping:
         return snprintf(buf, len, "AARCH64 l1 Mapping (AARCH64 l1 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l1_mapping.frame,
+                                  cap->u.vnode_aarch64_l1_mapping.cap,
                                   cap->u.vnode_aarch64_l1_mapping.pte,
                                   cap->u.vnode_aarch64_l1_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l2_Mapping:
         return snprintf(buf, len, "AARCH64 l2 Mapping (AARCH64 l2 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l2_mapping.frame,
+                                  cap->u.vnode_aarch64_l2_mapping.cap,
                                   cap->u.vnode_aarch64_l2_mapping.pte,
                                   cap->u.vnode_aarch64_l2_mapping.pte_count);
 
     case ObjType_VNode_AARCH64_l3_Mapping:
         return snprintf(buf, len, "AARCH64 l3 Mapping (AARCH64 l3 cap @%p, "
                                   "pte @0x%"PRIxLVADDR", pte_count=%hu)",
-                                  cap->u.vnode_aarch64_l3_mapping.frame,
+                                  cap->u.vnode_aarch64_l3_mapping.cap,
                                   cap->u.vnode_aarch64_l3_mapping.pte,
                                   cap->u.vnode_aarch64_l3_mapping.pte_count);