Rev 2170 | Rev 3672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2170 | Rev 2272 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | * The order must be calculated with respect to the emulated |
64 | * The order must be calculated with respect to the emulated |
65 | * 16K page size. |
65 | * 16K page size. |
66 | */ |
66 | */ |
67 | int order = fnzb32(((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * |
67 | int order = fnzb32(((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * |
68 | sizeof(tsb_entry_t)) >> FRAME_WIDTH); |
68 | sizeof(tsb_entry_t)) >> FRAME_WIDTH); |
- | 69 | ||
69 | uintptr_t tsb = (uintptr_t) frame_alloc(order, flags | FRAME_KA); |
70 | uintptr_t tsb = (uintptr_t) frame_alloc(order, flags | FRAME_KA); |
70 | 71 | ||
71 | if (!tsb) |
72 | if (!tsb) |
72 | return -1; |
73 | return -1; |
73 | 74 | ||
74 | as->arch.itsb = (tsb_entry_t *) tsb; |
75 | as->arch.itsb = (tsb_entry_t *) tsb; |
75 | as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT * |
76 | as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT * |
76 | sizeof(tsb_entry_t)); |
77 | sizeof(tsb_entry_t)); |
- | 78 | ||
77 | memsetb((uintptr_t) as->arch.itsb, |
79 | memsetb((uintptr_t) as->arch.itsb, |
78 | (ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * sizeof(tsb_entry_t), 0); |
80 | (ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * sizeof(tsb_entry_t), 0); |
79 | #endif |
81 | #endif |
80 | return 0; |
82 | return 0; |
81 | } |
83 | } |