Subversion Repositories HelenOS-historic

Rev

Rev 765 | Rev 831 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 765 Rev 825
Line 83... Line 83...
83
    unsigned uaccessible : 1;
83
    unsigned uaccessible : 1;
84
    unsigned page_write_through : 1;
84
    unsigned page_write_through : 1;
85
    unsigned page_cache_disable : 1;
85
    unsigned page_cache_disable : 1;
86
    unsigned accessed : 1;
86
    unsigned accessed : 1;
87
    unsigned dirty : 1;
87
    unsigned dirty : 1;
88
    unsigned : 2;
88
    unsigned pat : 1;
-
 
89
    unsigned global : 1;
89
    unsigned avl : 3;
90
    unsigned avl : 3;
90
    unsigned frame_address : 20;
91
    unsigned frame_address : 20;
91
} __attribute__ ((packed));
92
} __attribute__ ((packed));
92
 
93
 
93
static inline int get_pt_flags(pte_t *pt, index_t i)
94
static inline int get_pt_flags(pte_t *pt, index_t i)
Line 98... Line 99...
98
        (!p->page_cache_disable)<<PAGE_CACHEABLE_SHIFT |
99
        (!p->page_cache_disable)<<PAGE_CACHEABLE_SHIFT |
99
        (!p->present)<<PAGE_PRESENT_SHIFT |
100
        (!p->present)<<PAGE_PRESENT_SHIFT |
100
        p->uaccessible<<PAGE_USER_SHIFT |
101
        p->uaccessible<<PAGE_USER_SHIFT |
101
        1<<PAGE_READ_SHIFT |
102
        1<<PAGE_READ_SHIFT |
102
        p->writeable<<PAGE_WRITE_SHIFT |
103
        p->writeable<<PAGE_WRITE_SHIFT |
103
        1<<PAGE_EXEC_SHIFT
104
        1<<PAGE_EXEC_SHIFT |
-
 
105
        p->global<<PAGE_GLOBAL_SHIFT
104
    );
106
    );
105
}
107
}
106
 
108
 
107
static inline void set_pt_flags(pte_t *pt, index_t i, int flags)
109
static inline void set_pt_flags(pte_t *pt, index_t i, int flags)
108
{
110
{
Line 110... Line 112...
110
   
112
   
111
    p->page_cache_disable = !(flags & PAGE_CACHEABLE);
113
    p->page_cache_disable = !(flags & PAGE_CACHEABLE);
112
    p->present = !(flags & PAGE_NOT_PRESENT);
114
    p->present = !(flags & PAGE_NOT_PRESENT);
113
    p->uaccessible = (flags & PAGE_USER) != 0;
115
    p->uaccessible = (flags & PAGE_USER) != 0;
114
    p->writeable = (flags & PAGE_WRITE) != 0;
116
    p->writeable = (flags & PAGE_WRITE) != 0;
-
 
117
    p->global = (flags & PAGE_GLOBAL) != 0;
115
}
118
}
116
 
119
 
117
extern void page_arch_init(void);
120
extern void page_arch_init(void);
118
 
121
 
119
#endif /* __ASM__ */
122
#endif /* __ASM__ */