Subversion Repositories HelenOS-historic

Rev

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

Rev 684 Rev 687
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#ifndef __PAGE_H__
29
#ifndef __PAGE_H__
30
#define __PAGE_H__
30
#define __PAGE_H__
31
 
31
 
-
 
32
#include <arch/mm/asid.h>
32
#include <arch/types.h>
33
#include <arch/types.h>
33
#include <typedefs.h>
34
#include <typedefs.h>
34
 
35
 
35
#define PAGE_CACHEABLE_SHIFT        0
36
#define PAGE_CACHEABLE_SHIFT        0
36
#define PAGE_NOT_CACHEABLE_SHIFT    PAGE_CACHEABLE_SHIFT
37
#define PAGE_NOT_CACHEABLE_SHIFT    PAGE_CACHEABLE_SHIFT
Line 54... Line 55...
54
#define PAGE_READ       (1<<PAGE_READ_SHIFT)
55
#define PAGE_READ       (1<<PAGE_READ_SHIFT)
55
#define PAGE_WRITE      (1<<PAGE_WRITE_SHIFT)
56
#define PAGE_WRITE      (1<<PAGE_WRITE_SHIFT)
56
#define PAGE_EXEC       (1<<PAGE_EXEC_SHIFT)
57
#define PAGE_EXEC       (1<<PAGE_EXEC_SHIFT)
57
 
58
 
58
struct page_operations {
59
struct page_operations {
59
    void (* mapping_insert)(__address page, __address frame, int flags, __address root);
60
    void (* mapping_insert)(__address page, asid_t asid, __address frame, int flags, __address root);
60
    pte_t *(* mapping_find)(__address page, __address root);
61
    pte_t *(* mapping_find)(__address page, asid_t asid, __address root);
61
};
62
};
62
typedef struct page_operations page_operations_t;
63
typedef struct page_operations page_operations_t;
63
 
64
 
64
extern page_operations_t *page_operations;
65
extern page_operations_t *page_operations;
65
 
66
 
66
extern void page_init(void);
67
extern void page_init(void);
67
extern void page_mapping_insert(__address page, __address frame, int flags, __address root);
68
extern void page_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root);
68
extern pte_t *page_mapping_find(__address page, __address root);
69
extern pte_t *page_mapping_find(__address page, asid_t asid, __address root);
69
extern void map_structure(__address s, size_t size);
70
extern void map_structure(__address s, size_t size);
70
 
71
 
71
#endif
72
#endif