Rev 699 | Rev 715 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 699 | Rev 710 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | #define HT_SLOT_EMPTY_ARCH(t) 1 |
46 | #define HT_SLOT_EMPTY_ARCH(t) 1 |
47 | #define HT_GET_NEXT_ARCH(t) 0 |
47 | #define HT_GET_NEXT_ARCH(t) 0 |
48 | #define HT_SET_NEXT_ARCH(t, s) |
48 | #define HT_SET_NEXT_ARCH(t, s) |
49 | #define HT_SET_RECORD_ARCH(t, page, asid, frame, flags) |
49 | #define HT_SET_RECORD_ARCH(t, page, asid, frame, flags) |
50 | 50 | ||
- | 51 | struct VHPT_tag_info |
|
- | 52 | { |
|
- | 53 | unsigned long long tag :63; |
|
- | 54 | unsigned ti : 1; |
|
- | 55 | }__attribute__ ((packed)); |
|
- | 56 | ||
- | 57 | union VHPT_tag |
|
- | 58 | { |
|
- | 59 | struct VHPT_tag_info tag_info; |
|
- | 60 | unsigned tag_word; |
|
- | 61 | }; |
|
- | 62 | ||
- | 63 | struct VHPT_entry_present |
|
- | 64 | { |
|
- | 65 | ||
- | 66 | /* Word 0 */ |
|
- | 67 | unsigned p : 1; |
|
- | 68 | unsigned rv0 : 1; |
|
- | 69 | unsigned ma : 3; |
|
- | 70 | unsigned a : 1; |
|
- | 71 | unsigned d : 1; |
|
- | 72 | unsigned pl : 2; |
|
- | 73 | unsigned ar : 3; |
|
- | 74 | unsigned long long ppn :38; |
|
- | 75 | unsigned rv1 : 2; |
|
- | 76 | unsigned ed : 1; |
|
- | 77 | unsigned ig1 :11; |
|
- | 78 | ||
- | 79 | /* Word 1 */ |
|
- | 80 | unsigned rv2 : 2; |
|
- | 81 | unsigned ps : 6; |
|
- | 82 | unsigned key :24; |
|
- | 83 | unsigned rv3 :32; |
|
- | 84 | ||
- | 85 | /* 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*/ |
|
- | 87 | /* But I'm almost sure we nead access to whole word so there are both possibilities*/ |
|
- | 88 | /* Word 3 */ |
|
- | 89 | unsigned long long next :64; |
|
- | 90 | ||
- | 91 | }__attribute__ ((packed)); |
|
- | 92 | ||
- | 93 | struct VHPT_entry_not_present |
|
- | 94 | { |
|
- | 95 | /* Word 0 */ |
|
- | 96 | unsigned p : 1; |
|
- | 97 | unsigned long long ig0 :52; |
|
- | 98 | unsigned ig1 :11; |
|
- | 99 | ||
- | 100 | /* Word 1 */ |
|
- | 101 | unsigned rv2 : 2; |
|
- | 102 | unsigned ps : 6; |
|
- | 103 | unsigned long long ig2 :56; |
|
- | 104 | ||
- | 105 | ||
- | 106 | /* 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*/ |
|
- | 108 | /* But I'm almost sure we nead access to whole word so there are both possibilities*/ |
|
- | 109 | /* Word 3 */ |
|
- | 110 | unsigned long long next :64; |
|
- | 111 | ||
- | 112 | }__attribute__ ((packed)); |
|
- | 113 | ||
- | 114 | typedef union VHPT_entry |
|
- | 115 | { |
|
- | 116 | struct VHPT_entry_present present; |
|
- | 117 | struct VHPT_entry_not_present not_present; |
|
- | 118 | }VHPT_entry; |
|
- | 119 | ||
51 | extern void page_arch_init(void); |
120 | extern void page_arch_init(void); |
52 | 121 | ||
53 | #endif |
122 | #endif |