Rev 1954 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1954 | Rev 2048 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | * is a nice number considered that it is one of |
40 | * is a nice number considered that it is one of |
41 | * the page sizes supported by hardware, which, |
41 | * the page sizes supported by hardware, which, |
42 | * again, is nice because TSBs need to be locked |
42 | * again, is nice because TSBs need to be locked |
43 | * in TLBs - only one TLB entry will do. |
43 | * in TLBs - only one TLB entry will do. |
44 | */ |
44 | */ |
45 | #define TSB_SIZE 2 /* when changing this, change as.c as well */ |
45 | #define TSB_SIZE 2 /* when changing this, change |
- | 46 | * as.c as well */ |
|
46 | #define ITSB_ENTRY_COUNT (512*(1<<TSB_SIZE)) |
47 | #define ITSB_ENTRY_COUNT (512 * (1 << TSB_SIZE)) |
47 | #define DTSB_ENTRY_COUNT (512*(1<<TSB_SIZE)) |
48 | #define DTSB_ENTRY_COUNT (512 * (1 << TSB_SIZE)) |
48 | 49 | ||
49 | #define TSB_TAG_TARGET_CONTEXT_SHIFT 48 |
50 | #define TSB_TAG_TARGET_CONTEXT_SHIFT 48 |
50 | 51 | ||
51 | #ifndef __ASM__ |
52 | #ifndef __ASM__ |
52 | 53 | ||
Line 78... | Line 79... | ||
78 | /** TSB Base register. */ |
79 | /** TSB Base register. */ |
79 | union tsb_base_reg { |
80 | union tsb_base_reg { |
80 | uint64_t value; |
81 | uint64_t value; |
81 | struct { |
82 | struct { |
82 | uint64_t base : 51; /**< TSB base address, bits 63:13. */ |
83 | uint64_t base : 51; /**< TSB base address, bits 63:13. */ |
83 | unsigned split : 1; /**< Split vs. common TSB for 8K and 64K pages. |
84 | unsigned split : 1; /**< Split vs. common TSB for 8K and 64K |
84 | * HelenOS uses only 8K pages for user mappings, |
85 | * pages. HelenOS uses only 8K pages |
- | 86 | * for user mappings, so we always set |
|
85 | * so we always set this to 0. |
87 | * this to 0. |
86 | */ |
88 | */ |
87 | unsigned : 9; |
89 | unsigned : 9; |
88 | unsigned size : 3; /**< TSB size. Number of entries is 512*2^size. */ |
90 | unsigned size : 3; /**< TSB size. Number of entries is |
- | 91 | * 512 * 2^size. */ |
|
89 | } __attribute__ ((packed)); |
92 | } __attribute__ ((packed)); |
90 | }; |
93 | }; |
91 | typedef union tsb_base_reg tsb_base_reg_t; |
94 | typedef union tsb_base_reg tsb_base_reg_t; |
92 | 95 | ||
93 | /** Read ITSB Base register. |
96 | /** Read ITSB Base register. |