Changeset 802898f in mainline for kernel/arch/ia32/src/mm/frame.c


Ignore:
Timestamp:
2013-09-02T20:14:11Z (11 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c95dff
Parents:
0435fe41 (diff), 61ab4a9 (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 update

File:
1 edited

Legend:

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

    r0435fe41 r802898f  
    4747
    4848#define PHYSMEM_LIMIT32  UINT64_C(0x100000000)
     49#define PHYSMEM_LIMIT_DMA   UINT64_C(0x1000000)
    4950
    5051size_t hardcoded_unmapped_ktext_size = 0;
     
    9192                                else
    9293                                        conf = minconf;
    93                                 zone_create(pfn, count, conf,
    94                                     ZONE_AVAILABLE | ZONE_LOWMEM);
     94
     95                                if ((pfn * PAGE_SIZE) < PHYSMEM_LIMIT_DMA) {
     96                                        size_t dma_count = min(
     97                                            PHYSMEM_LIMIT_DMA / PAGE_SIZE - pfn,
     98                                            count);
     99                                        zone_create(pfn, dma_count, conf,
     100                                            ZONE_AVAILABLE | ZONE_DMA);
     101                                        count -= dma_count;
     102                                        pfn += dma_count;
     103                                }
     104
     105                                conf = pfn;
     106                                if (count) {
     107                                        zone_create(pfn, count, conf,
     108                                            ZONE_AVAILABLE | ZONE_LOWMEM);
     109                                }
    95110                        } else {
    96111                                conf = zone_external_conf_alloc(count);
    97                                 if (conf != 0)
     112                                if (conf != 0) {
    98113                                        zone_create(pfn, count, conf,
    99114                                            ZONE_AVAILABLE | ZONE_HIGHMEM);
     115                                }
    100116                        }
    101117                } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) ||
Note: See TracChangeset for help on using the changeset viewer.