Rev 2071 | Rev 2106 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2089 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | #ifndef __ASM__ |
52 | #ifndef __ASM__ |
53 | 53 | ||
54 | #include <arch/mm/tte.h> |
54 | #include <arch/mm/tte.h> |
55 | #include <arch/mm/mmu.h> |
55 | #include <arch/mm/mmu.h> |
56 | #include <arch/types.h> |
56 | #include <arch/types.h> |
57 | #include <typedefs.h> |
57 | #include <mm/as.h> |
58 | - | ||
59 | /** TSB Tag Target register. */ |
- | |
60 | union tsb_tag_target { |
- | |
61 | uint64_t value; |
- | |
62 | struct { |
- | |
63 | unsigned invalid : 1; /**< Invalidated by software. */ |
- | |
64 | unsigned : 2; |
- | |
65 | unsigned context : 13; /**< Software ASID. */ |
- | |
66 | unsigned : 6; |
- | |
67 | uint64_t va_tag : 42; /**< Virtual address bits <63:22>. */ |
- | |
68 | } __attribute__ ((packed)); |
- | |
69 | }; |
- | |
70 | typedef union tsb_tag_target tsb_tag_target_t; |
- | |
71 | - | ||
72 | /** TSB entry. */ |
- | |
73 | struct tsb_entry { |
- | |
74 | tsb_tag_target_t tag; |
- | |
75 | tte_data_t data; |
- | |
76 | } __attribute__ ((packed)); |
- | |
77 | typedef struct tsb_entry tsb_entry_t; |
- | |
78 | 58 | ||
79 | /** TSB Base register. */ |
59 | /** TSB Base register. */ |
80 | union tsb_base_reg { |
60 | typedef union tsb_base_reg { |
81 | uint64_t value; |
61 | uint64_t value; |
82 | struct { |
62 | struct { |
83 | uint64_t base : 51; /**< TSB base address, bits 63:13. */ |
63 | uint64_t base : 51; /**< TSB base address, bits 63:13. */ |
84 | unsigned split : 1; /**< Split vs. common TSB for 8K and 64K |
64 | unsigned split : 1; /**< Split vs. common TSB for 8K and 64K |
85 | * pages. HelenOS uses only 8K pages |
65 | * pages. HelenOS uses only 8K pages |
Line 88... | Line 68... | ||
88 | */ |
68 | */ |
89 | unsigned : 9; |
69 | unsigned : 9; |
90 | unsigned size : 3; /**< TSB size. Number of entries is |
70 | unsigned size : 3; /**< TSB size. Number of entries is |
91 | * 512 * 2^size. */ |
71 | * 512 * 2^size. */ |
92 | } __attribute__ ((packed)); |
72 | } __attribute__ ((packed)); |
93 | }; |
- | |
94 | typedef union tsb_base_reg tsb_base_reg_t; |
73 | } tsb_base_reg_t; |
95 | 74 | ||
96 | /** Read ITSB Base register. |
75 | /** Read ITSB Base register. |
97 | * |
76 | * |
98 | * @return Content of the ITSB Base register. |
77 | * @return Content of the ITSB Base register. |
99 | */ |
78 | */ |