Rev 537 | Rev 564 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 537 | Rev 540 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #include <config.h> |
32 | #include <config.h> |
33 | #include <arch/boot/boot.h> |
33 | #include <arch/boot/boot.h> |
34 | #include <arch/boot/memmap.h> |
34 | #include <arch/boot/memmap.h> |
35 | #include <panic.h> |
35 | #include <panic.h> |
36 | #include <debug.h> |
36 | #include <debug.h> |
- | 37 | #include <align.h> |
|
37 | 38 | ||
38 | size_t hardcoded_unmapped_ktext_size = 0; |
39 | size_t hardcoded_unmapped_ktext_size = 0; |
39 | size_t hardcoded_unmapped_kdata_size = 0; |
40 | size_t hardcoded_unmapped_kdata_size = 0; |
40 | 41 | ||
- | 42 | __address last_frame = 0; |
|
- | 43 | ||
41 | void frame_arch_init(void) |
44 | void frame_arch_init(void) |
42 | { |
45 | { |
43 | zone_t *z; |
46 | zone_t *z; |
44 | __u8 i; |
47 | __u8 i; |
45 | 48 | ||
Line 51... | Line 54... | ||
51 | /* Reserve real mode bootstrap memory */ |
54 | /* Reserve real mode bootstrap memory */ |
52 | frame_region_not_free(BOOTSTRAP_OFFSET, hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size); |
55 | frame_region_not_free(BOOTSTRAP_OFFSET, hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size); |
53 | 56 | ||
54 | for (i = 0; i < e820counter; i++) { |
57 | for (i = 0; i < e820counter; i++) { |
55 | if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { |
58 | if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { |
56 | zone_create_in_region(e820table[i].base_address, e820table[i].size & ~(FRAME_SIZE-1)); |
59 | zone_create_in_region(e820table[i].base_address, e820table[i].size & ~(FRAME_SIZE-1)); |
- | 60 | if (last_frame < ALIGN(e820table[i].base_address + e820table[i].size, FRAME_SIZE)) |
|
- | 61 | last_frame = ALIGN(e820table[i].base_address + e820table[i].size, FRAME_SIZE); |
|
57 | } |
62 | } |
58 | } |
63 | } |
59 | } |
64 | } |
60 | } |
65 | } |