Subversion Repositories HelenOS-historic

Rev

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

Rev 825 Rev 831
Line 75... Line 75...
75
#include <mm/page.h>
75
#include <mm/page.h>
76
#include <arch/types.h>
76
#include <arch/types.h>
77
#include <arch/mm/frame.h>
77
#include <arch/mm/frame.h>
78
#include <typedefs.h>
78
#include <typedefs.h>
79
 
79
 
-
 
80
/** Page Table Entry. */
80
struct page_specifier {
81
struct page_specifier {
81
    unsigned present : 1;
82
    unsigned present : 1;
82
    unsigned writeable : 1;
83
    unsigned writeable : 1;
83
    unsigned uaccessible : 1;
84
    unsigned uaccessible : 1;
84
    unsigned page_write_through : 1;
85
    unsigned page_write_through : 1;
85
    unsigned page_cache_disable : 1;
86
    unsigned page_cache_disable : 1;
86
    unsigned accessed : 1;
87
    unsigned accessed : 1;
87
    unsigned dirty : 1;
88
    unsigned dirty : 1;
88
    unsigned pat : 1;
89
    unsigned pat : 1;
89
    unsigned global : 1;
90
    unsigned global : 1;
-
 
91
    unsigned soft_valid : 1;    /**< Valid content even if the present bit is not set. */
90
    unsigned avl : 3;
92
    unsigned avl : 2;
91
    unsigned frame_address : 20;
93
    unsigned frame_address : 20;
92
} __attribute__ ((packed));
94
} __attribute__ ((packed));
93
 
95
 
94
static inline int get_pt_flags(pte_t *pt, index_t i)
96
static inline int get_pt_flags(pte_t *pt, index_t i)
95
{
97
{
Line 113... Line 115...
113
    p->page_cache_disable = !(flags & PAGE_CACHEABLE);
115
    p->page_cache_disable = !(flags & PAGE_CACHEABLE);
114
    p->present = !(flags & PAGE_NOT_PRESENT);
116
    p->present = !(flags & PAGE_NOT_PRESENT);
115
    p->uaccessible = (flags & PAGE_USER) != 0;
117
    p->uaccessible = (flags & PAGE_USER) != 0;
116
    p->writeable = (flags & PAGE_WRITE) != 0;
118
    p->writeable = (flags & PAGE_WRITE) != 0;
117
    p->global = (flags & PAGE_GLOBAL) != 0;
119
    p->global = (flags & PAGE_GLOBAL) != 0;
-
 
120
   
-
 
121
    /*
-
 
122
     * Ensure that there is at least one bit set even if the present bit is cleared.
-
 
123
     */
-
 
124
    p->soft_valid = true;
118
}
125
}
119
 
126
 
120
extern void page_arch_init(void);
127
extern void page_arch_init(void);
121
 
128
 
122
#endif /* __ASM__ */
129
#endif /* __ASM__ */