Changeset cae5404 in mainline


Ignore:
Timestamp:
2010-06-26T21:59:52Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
720db0c
Parents:
decfbe56
Message:

add simple temporary workaround (far from any proper solution) for the infamous ticket #3

File:
1 edited

Legend:

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

    rdecfbe56 rcae5404  
    4747#include <print.h>
    4848
     49#define PHYSMEM_LIMIT  0x7C000000
     50
    4951size_t hardcoded_unmapped_ktext_size = 0;
    5052size_t hardcoded_unmapped_kdata_size = 0;
     
    5557{
    5658        unsigned int i;
    57 
     59       
    5860        for (i = 0; i < e820counter; i++) {
    5961                uint64_t base = e820table[i].base_address;
     
    6163               
    6264#ifdef __32_BITS__
    63                 /* Ignore physical memory above 4 GB */
    64                 if ((base >> 32) != 0)
     65                /*
     66                 * XXX FIXME:
     67                 *
     68                 * Ignore zones which start above PHYSMEM_LIMIT
     69                 * or clip zones which go beyond PHYSMEM_LIMIT.
     70                 *
     71                 * The PHYSMEM_LIMIT (2 GB - 64 MB) is a rather
     72                 * arbitrary constant which allows to have at
     73                 * least 64 MB in the kernel address space to
     74                 * map hardware resources.
     75                 *
     76                 * The kernel uses fixed 1:1 identity mapping
     77                 * of the physical memory with 2:2 GB split.
     78                 * This is a severe limitation of the current
     79                 * kernel memory management.
     80                 *
     81                 */
     82               
     83                if (base > PHYSMEM_LIMIT)
    6584                        continue;
    6685               
    67                 /* Clip regions above 4 GB */
    68                 if (((base + size) >> 32) != 0)
    69                         size = 0xffffffff - base;
     86                if (base + size > PHYSMEM_LIMIT)
     87                        size = PHYSMEM_LIMIT - base;
    7088#endif
    71 
     89               
    7290                pfn_t pfn;
    7391                size_t count;
Note: See TracChangeset for help on using the changeset viewer.