Rev 3230 | Rev 3232 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3230 | Rev 3231 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | #include <config.h> |
41 | #include <config.h> |
42 | #include <arch/drivers/msim.h> |
42 | #include <arch/drivers/msim.h> |
43 | #include <arch/drivers/serial.h> |
43 | #include <arch/drivers/serial.h> |
44 | #include <print.h> |
44 | #include <print.h> |
45 | 45 | ||
46 | #define ZERO_PAGE_MASK TLB_PAGE_MASK_1M |
46 | #define ZERO_PAGE_MASK TLB_PAGE_MASK_256K |
47 | #define ZERO_FRAMES 4096 |
47 | #define ZERO_FRAMES 16384 |
48 | #define ZERO_PAGE_WIDTH 20 /* 1M */ |
48 | #define ZERO_PAGE_WIDTH 18 /* 256K */ |
49 | #define ZERO_PAGE_SIZE (1 << ZERO_PAGE_WIDTH) |
49 | #define ZERO_PAGE_SIZE (1 << ZERO_PAGE_WIDTH) |
50 | #define ZERO_PAGE_ASID ASID_INVALID |
50 | #define ZERO_PAGE_ASID ASID_INVALID |
51 | #define ZERO_PAGE_TLBI 0 |
51 | #define ZERO_PAGE_TLBI 0 |
52 | #define ZERO_PAGE_ADDR 0 |
52 | #define ZERO_PAGE_ADDR 0 |
53 | #define ZERO_PAGE_OFFSET (ZERO_PAGE_SIZE / sizeof(uint32_t) - 1) |
53 | #define ZERO_PAGE_OFFSET (ZERO_PAGE_SIZE / sizeof(uint32_t) - 1) |
Line 93... | Line 93... | ||
93 | * |
93 | * |
94 | * Returns true if given frame is safe for read/write test. |
94 | * Returns true if given frame is safe for read/write test. |
95 | * Returns false if given frame should not be touched. |
95 | * Returns false if given frame should not be touched. |
96 | * |
96 | * |
97 | */ |
97 | */ |
98 | static bool frame_safe(pfn_t frame) __attribute__((unused)); |
- | |
99 | static bool frame_safe(pfn_t frame) |
98 | static bool frame_safe(pfn_t frame) |
100 | { |
99 | { |
101 | /* Kernel structures */ |
100 | /* Kernel structures */ |
102 | if ((frame << ZERO_PAGE_WIDTH) < KA2PA(config.base)) |
101 | if ((frame << ZERO_PAGE_WIDTH) < KA2PA(config.base)) |
103 | return false; |
102 | return false; |
Line 239... | Line 238... | ||
239 | printf("Base Size\n"); |
238 | printf("Base Size\n"); |
240 | printf("---------- ----------\n"); |
239 | printf("---------- ----------\n"); |
241 | 240 | ||
242 | count_t i; |
241 | count_t i; |
243 | for (i = 0; i < phys_regions_count; i++) { |
242 | for (i = 0; i < phys_regions_count; i++) { |
244 | printf("%#10x %10u\n", |
243 | printf("%#010x %10u\n", |
245 | PFN2ADDR(phys_regions[i].start), PFN2ADDR(phys_regions[i].count)); |
244 | PFN2ADDR(phys_regions[i].start), PFN2ADDR(phys_regions[i].count)); |
246 | } |
245 | } |
247 | } |
246 | } |
248 | 247 | ||
249 | /** @} |
248 | /** @} |