Subversion Repositories HelenOS

Rev

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

Rev 391 Rev 394
Line 45... Line 45...
45
    unsigned g : 1;     /* global bit */
45
    unsigned g : 1;     /* global bit */
46
    unsigned v : 1;     /* valid bit */
46
    unsigned v : 1;     /* valid bit */
47
    unsigned d : 1;     /* dirty/write-protect bit */
47
    unsigned d : 1;     /* dirty/write-protect bit */
48
    unsigned c : 3;     /* cache coherency attribute */
48
    unsigned c : 3;     /* cache coherency attribute */
49
    unsigned pfn : 24;  /* frame number */
49
    unsigned pfn : 24;  /* frame number */
50
    unsigned : 2;
50
    unsigned zero: 2;   /* zero */
-
 
51
} __attribute__ ((packed));
-
 
52
 
-
 
53
struct pte {
-
 
54
    unsigned g : 1;     /* global bit */
-
 
55
    unsigned v : 1;     /* valid bit */
-
 
56
    unsigned d : 1;     /* dirty/write-protect bit */
-
 
57
    unsigned c : 3;     /* cache coherency attribute */
-
 
58
    unsigned pfn : 24;  /* frame number */
-
 
59
    unsigned w : 1;     /* writable */
-
 
60
    unsigned a : 1;     /* accessed */
51
} __attribute__ ((packed));
61
} __attribute__ ((packed));
52
 
62
 
53
struct entry_hi {
63
struct entry_hi {
54
    unsigned asid : 8;
64
    unsigned asid : 8;
55
    unsigned : 5;
65
    unsigned : 5;
Line 60... Line 70...
60
    unsigned : 13;
70
    unsigned : 13;
61
    unsigned mask : 12;
71
    unsigned mask : 12;
62
    unsigned : 7;
72
    unsigned : 7;
63
} __attribute__ ((packed));
73
} __attribute__ ((packed));
64
 
74
 
65
struct tlb_entry {
75
struct index {
66
    struct entry_lo lo0;
76
    unsigned index : 4;
67
    struct entry_lo lo1;
77
    unsigned : 27;
68
    struct entry_hi hi;
78
    unsigned p : 1;
69
    struct page_mask mask;
-
 
70
} __attribute__ ((packed));
79
} __attribute__ ((packed));
71
 
80
 
-
 
81
/** Probe TLB for Matching Entry
-
 
82
 *
-
 
83
 * Probe TLB for Matching Entry.
-
 
84
 */
-
 
85
static inline void tlbp(void)
-
 
86
{
-
 
87
    __asm__ volatile ("tlbp\n\t");
-
 
88
}
-
 
89
 
72
 
90
 
73
/** Read Indexed TLB Entry
91
/** Read Indexed TLB Entry
74
 *
92
 *
75
 * Read Indexed TLB Entry.
93
 * Read Indexed TLB Entry.
76
 */
94
 */