Rev 125 | Rev 146 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 125 | Rev 139 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | 28 | ||
29 | #include <mm/frame.h> |
29 | #include <mm/frame.h> |
30 | #include <arch/mm/frame.h> |
30 | #include <arch/mm/frame.h> |
31 | #include <mm/vm.h> |
31 | #include <mm/vm.h> |
32 | #include <config.h> |
32 | #include <config.h> |
- | 33 | #include <arch/boot/memmap.h> |
|
- | 34 | ||
- | 35 | #include <print.h> |
|
33 | 36 | ||
34 | /* |
37 | /* |
35 | * TODO: use the memory map obtained from BIOS |
38 | * TODO: use the memory map obtained from BIOS |
36 | */ |
39 | */ |
37 | void frame_arch_init(void) |
40 | void frame_arch_init(void) |
38 | { |
41 | { |
- | 42 | __u8 i; |
|
- | 43 | ||
39 | if (config.cpu_active == 1) { |
44 | if (config.cpu_active == 1) { |
40 | frame_not_free(0x0); |
45 | frame_not_free(0x0); |
41 | 46 | ||
42 | frame_region_not_free(0xa0000,0xff000); |
47 | frame_region_not_free(0xa0000,0xff000); |
43 | frame_region_not_free(0xfec00000,0xffffffff); |
48 | frame_region_not_free(0xfec00000,0xffffffff); |
- | 49 | ||
- | 50 | for (i=e820counter;i>0;i--) { |
|
- | 51 | //printf("E820 base: %Q size: %Q type: %L \n",e820table[i-1].base_address,e820table[i-1].size,e820table[i-1].type); |
|
- | 52 | if (e820table[i-1].type!=MEMMAP_MEMORY_AVAILABLE) { |
|
- | 53 | frame_region_not_free(e820table[i-1].base_address,e820table[i-1].size); |
|
- | 54 | } |
|
- | 55 | } |
|
44 | } |
56 | } |
45 | } |
57 | } |