Changeset 948911d in mainline for kernel/arch/ia32/src/mm/frame.c


Ignore:
Timestamp:
2012-01-24T02:27:43Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
230385c
Parents:
8afeb04 (diff), 2df6f6fe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/mm/frame.c

    r8afeb04 r948911d  
    4646#include <print.h>
    4747
     48#define PHYSMEM_LIMIT32  UINT64_C(0x100000000)
     49
    4850size_t hardcoded_unmapped_ktext_size = 0;
    4951size_t hardcoded_unmapped_kdata_size = 0;
     
    5456       
    5557        for (i = 0; i < e820counter; i++) {
    56                 uintptr_t base = (uintptr_t) e820table[i].base_address;
    57                 size_t size = (size_t) e820table[i].size;
     58                uint64_t base64 = e820table[i].base_address;
     59                uint64_t size64 = e820table[i].size;
     60               
     61#ifdef KARCH_ia32
     62                /*
     63                 * Restrict the e820 table entries to 32-bits.
     64                 */
     65                if (base64 >= PHYSMEM_LIMIT32)
     66                        continue;
     67               
     68                if (base64 + size64 > PHYSMEM_LIMIT32)
     69                        size64 = PHYSMEM_LIMIT32 - base64;
     70#endif
     71               
     72                uintptr_t base = (uintptr_t) base64;
     73                size_t size = (size_t) size64;
    5874               
    5975                if (!frame_adjust_zone_bounds(low, &base, &size))
     
    7995                        } else {
    8096                                conf = zone_external_conf_alloc(count);
    81                                 zone_create(pfn, count, conf,
    82                                     ZONE_AVAILABLE | ZONE_HIGHMEM);
     97                                if (conf != 0)
     98                                        zone_create(pfn, count, conf,
     99                                            ZONE_AVAILABLE | ZONE_HIGHMEM);
    83100                        }
    84101                } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) ||
Note: See TracChangeset for help on using the changeset viewer.