Changeset cc51c27 in mainline for kernel/arch/arm32/include/mm/page.h


Ignore:
Timestamp:
2012-07-06T14:51:02Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d3d75a5
Parents:
96606fe (diff), 5e4f22b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/mm/page.h

    r96606fe rcc51c27  
    4040#include <mm/mm.h>
    4141#include <arch/exception.h>
     42#include <arch/barrier.h>
    4243#include <trace.h>
    4344
     
    109110#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \
    110111        set_pt_level1_flags((pte_t *) (ptl3), (size_t) (i), (x))
     112
     113/* Set PTE present bit accessors for each level. */
     114#define SET_PTL1_PRESENT_ARCH(ptl0, i) \
     115        set_pt_level0_present((pte_t *) (ptl0), (size_t) (i))
     116#define SET_PTL2_PRESENT_ARCH(ptl1, i)
     117#define SET_PTL3_PRESENT_ARCH(ptl2, i)
     118#define SET_FRAME_PRESENT_ARCH(ptl3, i) \
     119        set_pt_level1_present((pte_t *) (ptl3), (size_t) (i))
    111120
    112121/* Macros for querying the last-level PTE entries. */
     
    267276}
    268277
     278NO_TRACE static inline void set_pt_level0_present(pte_t *pt, size_t i)
     279{
     280        pte_level0_t *p = &pt[i].l0;
     281
     282        p->should_be_zero = 0;
     283        write_barrier();
     284        p->descriptor_type = PTE_DESCRIPTOR_COARSE_TABLE;
     285}
    269286
    270287/** Sets flags of level 1 page table entry.
     
    283300        pte_level1_t *p = &pt[i].l1;
    284301       
    285         if (flags & PAGE_NOT_PRESENT) {
     302        if (flags & PAGE_NOT_PRESENT)
    286303                p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT;
    287                 p->access_permission_3 = 1;
    288         } else {
     304        else
    289305                p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE;
    290                 p->access_permission_3 = p->access_permission_0;
    291         }
    292306       
    293307        p->cacheable = p->bufferable = (flags & PAGE_CACHEABLE) != 0;
     
    312326}
    313327
    314 
     328NO_TRACE static inline void set_pt_level1_present(pte_t *pt, size_t i)
     329{
     330        pte_level1_t *p = &pt[i].l1;
     331
     332        p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE;
     333}
     334       
    315335extern void page_arch_init(void);
    316336
    317 
    318337#endif /* __ASM__ */
    319338
Note: See TracChangeset for help on using the changeset viewer.