Rev 1766 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1766 | Rev 1767 | ||
|---|---|---|---|
| Line 52... | Line 52... | ||
| 52 | for (run = 0; run < TEST_RUNS; run++) { |
52 | for (run = 0; run < TEST_RUNS; run++) { |
| 53 | for (order = 0; order <= MAX_ORDER; order++) { |
53 | for (order = 0; order <= MAX_ORDER; order++) { |
| 54 | printf("Allocating %d frames blocks ... ", 1 << order); |
54 | printf("Allocating %d frames blocks ... ", 1 << order); |
| 55 | allocated = 0; |
55 | allocated = 0; |
| 56 | for (i = 0; i < MAX_FRAMES >> order; i++) { |
56 | for (i = 0; i < MAX_FRAMES >> order; i++) { |
| 57 | frames[allocated] = frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
57 | frames[allocated] = (__address) frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
| 58 | 58 | ||
| 59 | if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { |
59 | if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { |
| 60 | panic("Test failed. Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10); |
60 | panic("Test failed. Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10); |
| 61 | } |
61 | } |
| 62 | 62 | ||
| 63 | if (status == 0) { |
63 | if (frames[allocated]) { |
| 64 | allocated++; |
64 | allocated++; |
| 65 | } else { |
65 | } else { |
| 66 | printf("done. "); |
66 | printf("done. "); |
| 67 | break; |
67 | break; |
| 68 | } |
68 | } |