Changeset 3772af6 in mainline
- Timestamp:
- 2013-09-09T20:25:27Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ee7f78a
- Parents:
- c501bc4
- Location:
- kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/frame.c
rc501bc4 r3772af6 47 47 48 48 #define PHYSMEM_LIMIT32 UINT64_C(0x100000000) 49 #define PHYSMEM_LIMIT_DMA UINT64_C(0x1000000)50 49 51 50 size_t hardcoded_unmapped_ktext_size = 0; … … 92 91 else 93 92 conf = minconf; 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 } 93 zone_create(pfn, count, conf, 94 ZONE_AVAILABLE | ZONE_LOWMEM); 110 95 } else { 111 96 conf = zone_external_conf_alloc(count); 112 if (conf != 0) {97 if (conf != 0) 113 98 zone_create(pfn, count, conf, 114 99 ZONE_AVAILABLE | ZONE_HIGHMEM); 115 }116 100 } 117 101 } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) || -
kernel/generic/include/mm/frame.h
rc501bc4 r3772af6 63 63 /** Allocate a frame which cannot be identity-mapped. */ 64 64 #define FRAME_HIGHMEM 0x20 65 /** Allocate a frame which needs to be from DMA zone. */66 #define FRAME_DMA 0x4067 65 68 66 typedef uint8_t zone_flags_t; … … 79 77 /** Zone contains memory that cannot be identity-mapped */ 80 78 #define ZONE_HIGHMEM 0x10 81 /** Zone contains memory suitable for old ISA DMA */82 #define ZONE_DMA 0x2083 79 84 80 /** Mask of zone bits that must be matched exactly. */ 85 81 #define ZONE_EF_MASK 0x7 86 82 87 #define FRAME_TO_ZONE_FLAGS(ff) \ 88 ((((ff) & FRAME_DMA) ? ZONE_DMA : \ 89 (((ff) & FRAME_LOWMEM) ? ZONE_LOWMEM : \ 83 #define FRAME_TO_ZONE_FLAGS(ff) \ 84 ((((ff) & FRAME_LOWMEM) ? ZONE_LOWMEM : \ 90 85 (((ff) & FRAME_HIGHMEM) ? ZONE_HIGHMEM : \ 91 ZONE_LOWMEM /* | ZONE_HIGHMEM */)) )| \86 ZONE_LOWMEM /* | ZONE_HIGHMEM */)) | \ 92 87 ZONE_AVAILABLE) 93 88 -
kernel/generic/src/ddi/ddi.c
rc501bc4 r3772af6 336 336 order = fnzb(pages - 1) + 1; 337 337 338 *phys = frame_alloc_noreserve(order, FRAME_DMA);338 *phys = frame_alloc_noreserve(order, 0); 339 339 if (*phys == NULL) 340 340 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.