Rev 1793 | Rev 1983 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1793 | Rev 1903 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | void frame_arch_init(void) |
51 | void frame_arch_init(void) |
52 | { |
52 | { |
53 | int i; |
53 | int i; |
54 | pfn_t confdata; |
54 | pfn_t confdata; |
55 | 55 | ||
- | 56 | if (config.cpu_active == 1) { |
|
56 | for (i = 0; i < bootinfo.memmap.count; i++) { |
57 | for (i = 0; i < bootinfo.memmap.count; i++) { |
57 | uintptr_t start = bootinfo.memmap.zones[i].start; |
58 | uintptr_t start = bootinfo.memmap.zones[i].start; |
58 | size_t size = bootinfo.memmap.zones[i].size; |
59 | size_t size = bootinfo.memmap.zones[i].size; |
59 | 60 | ||
60 | /* |
61 | /* |
61 | * The memmap is created by HelenOS boot loader. |
62 | * The memmap is created by HelenOS boot loader. |
62 | * It already contains no holes. |
63 | * It already contains no holes. |
63 | */ |
64 | */ |
64 | 65 | ||
65 | confdata = ADDR2PFN(start); |
66 | confdata = ADDR2PFN(start); |
66 | if (confdata == 0) |
67 | if (confdata == 0) |
67 | confdata = 2; |
68 | confdata = 2; |
68 | zone_create(ADDR2PFN(start), SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)), confdata, 0); |
69 | zone_create(ADDR2PFN(start), SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)), confdata, 0); |
69 | 70 | ||
70 | last_frame = max(last_frame, start + ALIGN_UP(size, FRAME_SIZE)); |
71 | last_frame = max(last_frame, start + ALIGN_UP(size, FRAME_SIZE)); |
- | 72 | } |
|
71 | } |
73 | } |
72 | 74 | ||
73 | } |
75 | } |
74 | 76 | ||
75 | /** @} |
77 | /** @} |