Subversion Repositories HelenOS-historic

Rev

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

Rev 710 Rev 715
Line 31... Line 31...
31
 
31
 
32
#include <arch/types.h>
32
#include <arch/types.h>
33
#include <arch/mm/frame.h>
33
#include <arch/mm/frame.h>
34
 
34
 
35
#define PAGE_SIZE   FRAME_SIZE
35
#define PAGE_SIZE   FRAME_SIZE
-
 
36
#define PAGE_WIDTH  FRAME_WIDTH
36
 
37
 
37
#define KA2PA(x)    ((__address) (x))
38
#define KA2PA(x)    ((__address) (x))
38
#define PA2KA(x)    ((__address) (x))
39
#define PA2KA(x)    ((__address) (x))
39
 
40
 
40
#define GET_PTL0_ADDRESS_ARCH()         ((pte_t *) 0)
41
#define GET_PTL0_ADDRESS_ARCH()         ((pte_t *) 0)
Line 46... Line 47...
46
#define HT_SLOT_EMPTY_ARCH(t)       1
47
#define HT_SLOT_EMPTY_ARCH(t)       1
47
#define HT_GET_NEXT_ARCH(t)     0
48
#define HT_GET_NEXT_ARCH(t)     0
48
#define HT_SET_NEXT_ARCH(t, s)
49
#define HT_SET_NEXT_ARCH(t, s)
49
#define HT_SET_RECORD_ARCH(t, page, asid, frame, flags)
50
#define HT_SET_RECORD_ARCH(t, page, asid, frame, flags)
50
 
51
 
-
 
52
#define REGION_RID_MAIN 0
-
 
53
#define REGION_RID_FIRST_INVALID 16
-
 
54
#define REGION_REGISTERS 8
-
 
55
 
-
 
56
#define VHPT_WIDTH 16         /*64kB*/
-
 
57
#define VHPT_SIZE (1<<VHPT_WIDTH)
-
 
58
 
-
 
59
#define VHPT_BASE 0           /* Must be aligned to VHPT_SIZE */
-
 
60
 
51
struct VHPT_tag_info
61
struct VHPT_tag_info
52
{
62
{
53
    unsigned long long tag       :63;
63
    unsigned long long tag       :63;
54
    unsigned           ti        : 1;
64
    unsigned           ti        : 1;
55
}__attribute__ ((packed));
65
}__attribute__ ((packed));
Line 84... Line 94...
84
   
94
   
85
    /* Word 2 */
95
    /* Word 2 */
86
    union VHPT_tag tag;       /*This data is here as union because I'm not sure if anybody nead access to areas ti and tag in VHPT entry*/
96
    union VHPT_tag tag;       /*This data is here as union because I'm not sure if anybody nead access to areas ti and tag in VHPT entry*/
87
                            /* But I'm almost sure we nead access to whole word so there are both possibilities*/
97
                            /* But I'm almost sure we nead access to whole word so there are both possibilities*/
88
    /* Word 3 */                                                   
98
    /* Word 3 */                                                   
89
    unsigned long long next :64;
99
    unsigned long long next :64; /* This ignored field will be (in my hopes ;-) ) used as pointer in link list of entries with same hash value*/
90
   
100
   
91
}__attribute__ ((packed));
101
}__attribute__ ((packed));
92
 
102
 
93
struct VHPT_entry_not_present
103
struct VHPT_entry_not_present
94
{
104
{
Line 105... Line 115...
105
   
115
   
106
    /* Word 2 */
116
    /* Word 2 */
107
    union VHPT_tag tag;       /*This data is here as union because I'm not sure if anybody nead access to areas ti and tag in VHPT entry*/
117
    union VHPT_tag tag;       /*This data is here as union because I'm not sure if anybody nead access to areas ti and tag in VHPT entry*/
108
                            /* But I'm almost sure we nead access to whole word so there are both possibilities*/
118
                            /* But I'm almost sure we nead access to whole word so there are both possibilities*/
109
    /* Word 3 */                                                   
119
    /* Word 3 */                                                   
110
    unsigned long long next :64;
120
    unsigned long long next :64; /* This ignored field will be (in my hopes ;-) ) used as pointer in link list of entries with same hash value*/
111
   
121
   
112
}__attribute__ ((packed));
122
}__attribute__ ((packed));
113
 
123
 
114
typedef union VHPT_entry
124
typedef union VHPT_entry
115
{
125
{
Line 117... Line 127...
117
    struct VHPT_entry_not_present    not_present;
127
    struct VHPT_entry_not_present    not_present;
118
}VHPT_entry;
128
}VHPT_entry;
119
 
129
 
120
extern void page_arch_init(void);
130
extern void page_arch_init(void);
121
 
131
 
-
 
132
 
-
 
133
struct region_register_map
-
 
134
{
-
 
135
  unsigned ve            : 1;
-
 
136
    unsigned r0            : 1;
-
 
137
    unsigned ps            : 6;
-
 
138
    unsigned rid           :24;
-
 
139
    unsigned r1            :32;
-
 
140
}__attribute__ ((packed));
-
 
141
 
-
 
142
 
-
 
143
typedef union region_register
-
 
144
{
-
 
145
    struct region_register_map   map;
-
 
146
    unsigned long long           word;
-
 
147
}region_register;
-
 
148
 
-
 
149
struct PTA_register_map
-
 
150
{
-
 
151
  unsigned ve            : 1;
-
 
152
    unsigned r0            : 1;
-
 
153
    unsigned size          : 6;
-
 
154
    unsigned vf            : 1;
-
 
155
    unsigned r1            : 6;
-
 
156
    unsigned long long base:49;
-
 
157
}__attribute__ ((packed));
-
 
158
 
-
 
159
 
-
 
160
typedef union PTA_register
-
 
161
{
-
 
162
    struct PTA_register_map   map;
-
 
163
    unsigned long long        word;
-
 
164
}PTA_register;
-
 
165
 
-
 
166
 
122
#endif
167
#endif