Subversion Repositories HelenOS-historic

Rev

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

Rev 819 Rev 869
Line 28... Line 28...
28
 */
28
 */
29
 
29
 
30
#ifndef __ia64_PAGE_H__
30
#ifndef __ia64_PAGE_H__
31
#define __ia64_PAGE_H__
31
#define __ia64_PAGE_H__
32
 
32
 
-
 
33
#ifndef __ASM__
-
 
34
 
-
 
35
 
33
#include <arch/mm/frame.h>
36
#include <arch/mm/frame.h>
-
 
37
#include <arch/barrier.h>
34
#include <genarch/mm/page_ht.h>
38
#include <genarch/mm/page_ht.h>
35
#include <arch/mm/asid.h>
39
#include <arch/mm/asid.h>
36
#include <arch/types.h>
40
#include <arch/types.h>
37
#include <typedefs.h>
41
#include <typedefs.h>
38
#include <debug.h>
42
#include <debug.h>
39
 
43
 
-
 
44
#endif
-
 
45
 
40
#define PAGE_SIZE   FRAME_SIZE
46
#define PAGE_SIZE   FRAME_SIZE
41
#define PAGE_WIDTH  FRAME_WIDTH
47
#define PAGE_WIDTH  FRAME_WIDTH
-
 
48
#define KERNEL_PAGE_WIDTH   26
-
 
49
 
42
 
50
 
43
#define KA2PA(x)    ((__address) (x))
-
 
44
#define PA2KA(x)    ((__address) (x))
-
 
45
 
51
 
46
#define SET_PTL0_ADDRESS_ARCH(x)    /**< To be removed as situation permits. */
52
#define SET_PTL0_ADDRESS_ARCH(x)    /**< To be removed as situation permits. */
47
 
53
 
48
#define PPN_SHIFT           12
54
#define PPN_SHIFT           12
49
 
55
 
50
#define VRN_SHIFT           61
56
#define VRN_SHIFT           61
51
#define VRN_MASK            (7LL << VRN_SHIFT)
57
#define VRN_MASK            (7LL << VRN_SHIFT)
-
 
58
 
-
 
59
#ifdef __ASM__
52
#define VRN_KERNEL          0
60
#define VRN_KERNEL          7
-
 
61
#else
-
 
62
#define VRN_KERNEL          7LL
-
 
63
#endif
-
 
64
 
53
#define REGION_REGISTERS        8
65
#define REGION_REGISTERS        8
54
 
66
 
-
 
67
#define KA2PA(x)    ((__address) (x-(VRN_KERNEL<<VRN_SHIFT)))
-
 
68
#define PA2KA(x)    ((__address) (x+(VRN_KERNEL<<VRN_SHIFT)))
-
 
69
 
-
 
70
 
55
#define VHPT_WIDTH          20          /* 1M */
71
#define VHPT_WIDTH          20          /* 1M */
56
#define VHPT_SIZE           (1 << VHPT_WIDTH)
72
#define VHPT_SIZE           (1 << VHPT_WIDTH)
57
#define VHPT_BASE           0       /* Must be aligned to VHPT_SIZE */
73
#define VHPT_BASE           0       /* Must be aligned to VHPT_SIZE */
58
 
74
 
59
#define PTA_BASE_SHIFT          15
75
#define PTA_BASE_SHIFT          15
Line 74... Line 90...
74
 
90
 
75
#define VA_REGION_INDEX 61
91
#define VA_REGION_INDEX 61
76
 
92
 
77
#define VA_REGION(va) (va>>VA_REGION_INDEX)
93
#define VA_REGION(va) (va>>VA_REGION_INDEX)
78
 
94
 
79
 
95
#ifndef __ASM__
80
 
96
 
81
struct vhpt_tag_info {
97
struct vhpt_tag_info {
82
    unsigned long long tag : 63;
98
    unsigned long long tag : 63;
83
    unsigned ti : 1;
99
    unsigned ti : 1;
84
} __attribute__ ((packed));
100
} __attribute__ ((packed));
Line 261... Line 277...
261
 
277
 
262
extern vhpt_entry_t *vhpt_hash(__address page, asid_t asid);
278
extern vhpt_entry_t *vhpt_hash(__address page, asid_t asid);
263
extern bool vhpt_compare(__address page, asid_t asid, vhpt_entry_t *v);
279
extern bool vhpt_compare(__address page, asid_t asid, vhpt_entry_t *v);
264
extern void vhpt_set_record(vhpt_entry_t *v, __address page, asid_t asid, __address frame, int flags);
280
extern void vhpt_set_record(vhpt_entry_t *v, __address page, asid_t asid, __address frame, int flags);
265
 
281
 
-
 
282
 
-
 
283
static inline void pokus(void)
-
 
284
{
-
 
285
    region_register rr;
-
 
286
    rr.word=rr_read(0);
-
 
287
    srlz_d();
-
 
288
    rr_write(0,rr.word);
-
 
289
    srlz_d();
-
 
290
 
-
 
291
}
-
 
292
 
-
 
293
#endif
-
 
294
 
266
#endif
295
#endif
-
 
296
 
-
 
297