Subversion Repositories HelenOS

Rev

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

Rev 177 Rev 306
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#ifndef __mips_PAGE_H__
29
#ifndef __mips_PAGE_H__
30
#define __mips_PAGE_H__
30
#define __mips_PAGE_H__
31
 
31
 
32
#include <arch/mm/tlb.h>
-
 
33
#include <mm/page.h>
-
 
34
#include <arch/mm/frame.h>
-
 
35
#include <arch/types.h>
-
 
36
 
-
 
37
#define PAGE_SIZE   FRAME_SIZE
32
#define PAGE_SIZE   FRAME_SIZE
38
 
33
 
-
 
34
#ifndef __ASM__
39
#define KA2PA(x)    (((__address) (x)) - 0x80000000)
35
#  define KA2PA(x)  (((__address) (x)) - 0x80000000)
40
#define PA2KA(x)    (((__address) (x)) + 0x80000000)
36
#  define PA2KA(x)  (((__address) (x)) + 0x80000000)
-
 
37
#else
-
 
38
#  define KA2PA(x)  ((x) - 0x80000000)
-
 
39
#  define PA2KA(x)  ((x) + 0x80000000)
-
 
40
#endif
41
 
41
 
42
/*
42
/*
43
 * Implementation of generic 4-level page table interface.
43
 * Implementation of generic 4-level page table interface.
44
 * NOTE: this implementation is under construction
44
 * NOTE: this implementation is under construction
45
 *
45
 *
Line 79... Line 79...
79
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x)     set_pt_flags((pte_t *)(ptl0), (index_t)(i), (x))
79
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x)     set_pt_flags((pte_t *)(ptl0), (index_t)(i), (x))
80
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x)
80
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x)
81
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x)
81
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x)
82
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x)    set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x))
82
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x)    set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x))
83
 
83
 
-
 
84
#ifndef __ASM__
-
 
85
 
-
 
86
#include <arch/mm/tlb.h>
-
 
87
#include <mm/page.h>
-
 
88
#include <arch/mm/frame.h>
-
 
89
#include <arch/types.h>
-
 
90
 
84
static inline int get_pt_flags(pte_t *pt, index_t i)
91
static inline int get_pt_flags(pte_t *pt, index_t i)
85
{
92
{
86
    pte_t *p = &pt[i];
93
    pte_t *p = &pt[i];
87
   
94
   
88
    return (
95
    return (
Line 107... Line 114...
107
 
114
 
108
extern void page_arch_init(void);
115
extern void page_arch_init(void);
109
 
116
 
110
extern pte_t *PTL0;
117
extern pte_t *PTL0;
111
 
118
 
-
 
119
#endif /* __ASM__ */
-
 
120
 
112
#endif
121
#endif