Changes in kernel/arch/sparc64/src/mm/sun4u/frame.c [4872160:720db0c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4u/frame.c
r4872160 r720db0c 49 49 void frame_arch_init(void) 50 50 { 51 unsigned int i;52 pfn_t confdata;53 54 51 if (config.cpu_active == 1) { 52 unsigned int i; 53 55 54 for (i = 0; i < memmap.cnt; i++) { 56 uintptr_t start = (uintptr_t) memmap.zones[i].start; 57 size_t size = memmap.zones[i].size; 58 55 /* To be safe, make the available zone possibly smaller */ 56 uintptr_t new_start = ALIGN_UP((uintptr_t) memmap.zones[i].start, 57 FRAME_SIZE); 58 size_t new_size = ALIGN_DOWN(memmap.zones[i].size - 59 (new_start - ((uintptr_t) memmap.zones[i].start)), FRAME_SIZE); 60 59 61 /* 60 62 * The memmap is created by HelenOS boot loader. 61 63 * It already contains no holes. 62 64 */ 63 64 confdata = ADDR2PFN(start); 65 66 pfn_t confdata = ADDR2PFN(new_start); 67 65 68 if (confdata == ADDR2PFN(KA2PA(PFN2ADDR(0)))) 66 69 confdata = ADDR2PFN(KA2PA(PFN2ADDR(2))); 67 zone_create(ADDR2PFN(start),68 SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)),70 71 zone_create(ADDR2PFN(new_start), SIZE2FRAMES(new_size), 69 72 confdata, 0); 70 last_frame = max(last_frame, start + ALIGN_UP(size,71 FRAME_SIZE));73 74 last_frame = max(last_frame, new_start + new_size); 72 75 } 73 76 74 77 /* 75 78 * On sparc64, physical memory can start on a non-zero address. … … 80 83 frame_mark_unavailable(ADDR2PFN(KA2PA(PFN2ADDR(0))), 1); 81 84 } 82 85 83 86 end_of_identity = PA2KA(last_frame); 84 87 }
Note:
See TracChangeset
for help on using the changeset viewer.