Rev 1735 | Rev 1787 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1735 | Rev 1780 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | #include <arch/boot/memmap.h> |
35 | #include <arch/boot/memmap.h> |
36 | #include <arch/mm/memory_init.h> |
36 | #include <arch/mm/memory_init.h> |
37 | #include <arch/mm/page.h> |
37 | #include <arch/mm/page.h> |
38 | #include <print.h> |
38 | #include <print.h> |
39 | 39 | ||
40 | __u8 e820counter = 0xff; |
40 | uint8_t e820counter = 0xff; |
41 | struct e820memmap_ e820table[MEMMAP_E820_MAX_RECORDS]; |
41 | struct e820memmap_ e820table[MEMMAP_E820_MAX_RECORDS]; |
42 | __u32 e801memorysize; |
42 | uint32_t e801memorysize; |
43 | 43 | ||
44 | size_t get_memory_size(void) |
44 | size_t get_memory_size(void) |
45 | { |
45 | { |
46 | return e801memorysize*1024; |
46 | return e801memorysize*1024; |
47 | } |
47 | } |
48 | 48 | ||
49 | void memory_print_map(void) |
49 | void memory_print_map(void) |
50 | { |
50 | { |
51 | __u8 i; |
51 | uint8_t i; |
52 | 52 | ||
53 | for (i=0;i<e820counter;i++) { |
53 | for (i=0;i<e820counter;i++) { |
54 | printf("E820 base: %#llx size: %#llx type: ", e820table[i].base_address, e820table[i].size); |
54 | printf("E820 base: %#llx size: %#llx type: ", e820table[i].base_address, e820table[i].size); |
55 | switch (e820table[i].type) { |
55 | switch (e820table[i].type) { |
56 | case MEMMAP_MEMORY_AVAILABLE: |
56 | case MEMMAP_MEMORY_AVAILABLE: |