Changeset 89c57b6 in mainline for kernel/arch/ia32/src/mm/frame.c
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/frame.c
rcefb126 r89c57b6 44 44 #include <align.h> 45 45 #include <macros.h> 46 47 46 #include <print.h> 48 47 49 #define PHYSMEM_LIMIT32 0x07c000000ull50 #define PHYSMEM_LIMIT64 0x200000000ull48 #define PHYSMEM_LIMIT32 UINT64_C(0x07c000000) 49 #define PHYSMEM_LIMIT64 UINT64_C(0x200000000) 51 50 52 51 size_t hardcoded_unmapped_ktext_size = 0; … … 131 130 if (last_frame < ALIGN_UP(new_base + new_size, FRAME_SIZE)) 132 131 last_frame = ALIGN_UP(new_base + new_size, FRAME_SIZE); 133 } 134 135 if (e820table[i].type == MEMMAP_MEMORY_RESERVED) { 132 } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) || 133 (e820table[i].type == MEMMAP_MEMORY_NVS)) { 134 /* To be safe, make the firmware zone possibly larger */ 135 uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE); 136 uint64_t new_size = ALIGN_UP(size + (base - new_base), 137 FRAME_SIZE); 138 139 zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0, 140 ZONE_FIRMWARE); 141 } else { 136 142 /* To be safe, make the reserved zone possibly larger */ 137 143 uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE); … … 141 147 zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0, 142 148 ZONE_RESERVED); 143 }144 145 if (e820table[i].type == MEMMAP_MEMORY_ACPI) {146 /* To be safe, make the firmware zone possibly larger */147 uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE);148 uint64_t new_size = ALIGN_UP(size + (base - new_base),149 FRAME_SIZE);150 151 zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,152 ZONE_FIRMWARE);153 149 } 154 150 } … … 203 199 #ifdef CONFIG_SMP 204 200 /* Reserve AP real mode bootstrap memory */ 205 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 201 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 206 202 (hardcoded_unmapped_ktext_size + 207 203 hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
Note:
See TracChangeset
for help on using the changeset viewer.