Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 232 → Rev 233

/SPARTAN/trunk/arch/ia32/src/mm/memory_init.c
28,6 → 28,7
 
#include <arch/boot/memmap.h>
#include <arch/mm/memory_init.h>
#include <arch/mm/page.h>
#include <print.h>
 
size_t get_memory_size(void)
39,9 → 40,16
{
__u8 i;
for (i=e820counter;i>0;i--) {
printf("E820 base: %Q size: %Q type: ", e820table[i-1].base_address, e820table[i-1].size);
switch (e820table[i-1].type) {
/*
* We must not work with the original addresses for they are not mapped anymore.
*/
struct e820memmap_ *memtable = (struct e820memmap_ *) PA2KA(e820table);
__u32 *counter_p = (__u32 *) PA2KA(&e820counter);
for (i=*counter_p;i>0;i--) {
printf("E820 base: %Q size: %Q type: ", memtable[i-1].base_address, memtable[i-1].size);
switch (memtable[i-1].type) {
case MEMMAP_MEMORY_AVAILABLE:
printf("available memory\n");
break;