Ignore:
File:
1 edited

Legend:

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

    r49ec568 r9117ef9b  
    4646#include <print.h>
    4747
    48 #define PHYSMEM_LIMIT32  UINT64_C(0x100000000)
    49 
    5048size_t hardcoded_unmapped_ktext_size = 0;
    5149size_t hardcoded_unmapped_kdata_size = 0;
     
    5856                uint64_t base64 = e820table[i].base_address;
    5957                uint64_t size64 = e820table[i].size;
    60                
     58
    6159#ifdef KARCH_ia32
    6260                /*
    6361                 * Restrict the e820 table entries to 32-bits.
    6462                 */
    65                 if (base64 >= PHYSMEM_LIMIT32)
     63                if (base64 >= 0x100000000ULL)
    6664                        continue;
    67                
    68                 if (base64 + size64 > PHYSMEM_LIMIT32)
    69                         size64 = PHYSMEM_LIMIT32 - base64;
     65                if (base64 + size64 > 0x100000000ULL)
     66                        size64 -= base64 + size64 - 0x100000000ULL;
    7067#endif
    71                
     68
    7269                uintptr_t base = (uintptr_t) base64;
    7370                size_t size = (size_t) size64;
     
    9592                        } else {
    9693                                conf = zone_external_conf_alloc(count);
    97                                 if (conf != 0)
    98                                         zone_create(pfn, count, conf,
    99                                             ZONE_AVAILABLE | ZONE_HIGHMEM);
     94                                zone_create(pfn, count, conf,
     95                                    ZONE_AVAILABLE | ZONE_HIGHMEM);
    10096                        }
    10197                } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) ||
Note: See TracChangeset for help on using the changeset viewer.