Changeset 40c8c17 in mainline
- Timestamp:
- 2011-11-26T21:37:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 38ff925
- Parents:
- 056ddc30
- Location:
- kernel
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/mm/frame.h
r056ddc30 r40c8c17 43 43 #include <typedefs.h> 44 44 45 extern uintptr_t last_frame;46 45 extern void frame_low_arch_init(void); 47 46 extern void frame_high_arch_init(void); -
kernel/arch/amd64/src/mm/page.c
r056ddc30 r40c8c17 64 64 65 65 /* 66 * PA2KA(identity) mapping for all frames.66 * PA2KA(identity) mapping for all low-memory frames. 67 67 */ 68 for (cur = 0; cur < min(config.identity_size, last_frame);68 for (cur = 0; cur < min(config.identity_size, config.physmem_end); 69 69 cur += FRAME_SIZE) 70 70 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, identity_flags); -
kernel/arch/arm32/include/mm/frame.h
r056ddc30 r40c8c17 61 61 #endif 62 62 63 extern uintptr_t last_frame;64 65 63 extern void frame_low_arch_init(void); 66 64 extern void frame_high_arch_init(void); -
kernel/arch/arm32/src/mm/frame.c
r056ddc30 r40c8c17 41 41 #include <macros.h> 42 42 43 // TODO: remove me44 /** Address of the last frame in the memory. */45 uintptr_t last_frame = 0;46 47 43 static void frame_common_arch_init(bool low) 48 44 { … … 74 70 void frame_low_arch_init(void) 75 71 { 76 uintptr_t mem_start;77 size_t mem_size;78 79 machine_get_memory_extents(&mem_start, &mem_size);80 // TODO: remove me81 last_frame = ALIGN_DOWN(mem_start + mem_size, FRAME_SIZE);82 83 72 frame_common_arch_init(true); 84 73 -
kernel/arch/arm32/src/mm/page.c
r056ddc30 r40c8c17 58 58 59 59 uintptr_t cur; 60 60 61 /* Kernel identity mapping */ 61 62 for (cur = PHYSMEM_START_ADDR; 62 cur < min(config.identity_base, last_frame); cur += FRAME_SIZE) 63 cur < min(config.identity_size, config.physmem_end); 64 cur += FRAME_SIZE) 63 65 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); 64 66 -
kernel/arch/ia32/include/mm/frame.h
r056ddc30 r40c8c17 43 43 #include <typedefs.h> 44 44 45 extern uintptr_t last_frame;46 47 45 extern void frame_low_arch_init(void); 48 46 extern void frame_high_arch_init(void); -
kernel/arch/ia32/src/mm/frame.c
r056ddc30 r40c8c17 49 49 size_t hardcoded_unmapped_kdata_size = 0; 50 50 51 // XXX: remove me52 uintptr_t last_frame = 0;53 54 51 static void init_e820_memory(pfn_t minconf, bool low) 55 52 { … … 85 82 ZONE_AVAILABLE | ZONE_HIGHMEM); 86 83 } 87 88 // XXX: remove me89 if (last_frame < new_base + new_size)90 last_frame = new_base + new_size;91 84 } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) || 92 85 (e820table[i].type == MEMMAP_MEMORY_NVS)) { -
kernel/arch/ia32/src/mm/page.c
r056ddc30 r40c8c17 66 66 67 67 /* 68 * PA2KA(identity) mapping for all frames until last_frame.68 * PA2KA(identity) mapping for all low-memory frames. 69 69 */ 70 70 page_table_lock(AS_KERNEL, true); 71 for (cur = 0; cur < min(config.identity_size, last_frame);71 for (cur = 0; cur < min(config.identity_size, config.physmem_end); 72 72 cur += FRAME_SIZE) { 73 73 flags = PAGE_CACHEABLE | PAGE_WRITE; 74 if ((PA2KA(cur) >= config.base) && (PA2KA(cur) <75 config.base + config.kernel_size))74 if ((PA2KA(cur) >= config.base) && 75 (PA2KA(cur) < config.base + config.kernel_size)) 76 76 flags |= PAGE_GLOBAL; 77 77 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); -
kernel/arch/ia64/include/mm/frame.h
r056ddc30 r40c8c17 43 43 #include <typedefs.h> 44 44 45 extern uintptr_t last_frame;46 47 45 extern void frame_low_arch_init(void); 48 46 extern void frame_high_arch_init(void); -
kernel/arch/ia64/src/mm/frame.c
r056ddc30 r40c8c17 51 51 #define MINCONF 1 52 52 53 // XXX: remove me54 uintptr_t last_frame = 0;55 56 53 static void frame_common_arch_init(bool low) 57 54 { … … 68 65 if (size > FRAME_SIZE) 69 66 size -= abase - base; 70 71 // FIXME: remove me72 if (abase + size > last_frame)73 last_frame = abase + size;74 67 75 68 if (!frame_adjust_zone_bounds(low, &abase, &size)) -
kernel/arch/ppc32/include/mm/frame.h
r056ddc30 r40c8c17 44 44 #include <trace.h> 45 45 46 extern uintptr_t last_frame;47 48 46 NO_TRACE static inline uint32_t physmem_top(void) 49 47 { -
kernel/arch/ppc32/src/mm/frame.c
r056ddc30 r40c8c17 40 40 #include <print.h> 41 41 42 // XXX: remove me43 uintptr_t last_frame = 0;44 45 42 memmap_t memmap; 46 43 … … 67 64 size_t size = ALIGN_DOWN(memmap.zones[i].size - 68 65 (base - ((uintptr_t) memmap.zones[i].start)), FRAME_SIZE); 69 70 // XXX: remove me71 if (last_frame < ALIGN_UP(base + size, FRAME_SIZE))72 last_frame = ALIGN_UP(base + size, FRAME_SIZE);73 66 74 67 if (!frame_adjust_zone_bounds(low, &base, &size)) -
kernel/arch/sparc64/include/mm/sun4u/frame.h
r056ddc30 r40c8c17 72 72 typedef union frame_address frame_address_t; 73 73 74 extern uintptr_t last_frame;75 74 extern uintptr_t end_of_identity; 76 75 -
kernel/arch/sparc64/include/mm/sun4v/frame.h
r056ddc30 r40c8c17 46 46 #include <typedefs.h> 47 47 48 extern uintptr_t last_frame;49 48 extern void frame_low_arch_init(void); 50 49 extern void frame_high_arch_init(void); -
kernel/arch/sparc64/src/mm/sun4u/frame.c
r056ddc30 r40c8c17 41 41 #include <macros.h> 42 42 43 // TODO: remove me44 uintptr_t last_frame = (uintptr_t) NULL;45 46 43 /** Create memory zones according to information stored in memmap. 47 44 * … … 66 63 (base - ((uintptr_t) memmap.zones[i].start)), FRAME_SIZE); 67 64 68 // TODO: remove me69 last_frame = max(last_frame, base + size);70 71 65 if (!frame_adjust_zone_bounds(low, &base, &size)) 72 66 continue; … … 106 100 */ 107 101 frame_mark_unavailable(ADDR2PFN(KA2PA(PFN2ADDR(0))), 1); 108 109 end_of_identity = PA2KA(last_frame); 102 103 /* PA2KA will work only on low-memory. */ 104 end_of_identity = PA2KA(config.physmem_end - FRAME_SIZE) + PAGE_SIZE; 110 105 } 111 106 -
kernel/generic/include/config.h
r056ddc30 r40c8c17 95 95 96 96 bool non_identity_configured; 97 98 /** End of physical memory. */ 99 uint64_t physmem_end; 97 100 } config_t; 98 101 -
kernel/generic/src/main/main.c
r056ddc30 r40c8c17 91 91 config_t config = { 92 92 .identity_configured = false, 93 .non_identity_configured = false 93 .non_identity_configured = false, 94 .physmem_end = 0 94 95 }; 95 96 -
kernel/generic/src/mm/frame.c
r056ddc30 r40c8c17 900 900 */ 901 901 ASSERT(confframe != ADDR2PFN((uintptr_t ) NULL)); 902 903 /* Update the known end of physical memory. */ 904 config.physmem_end = max(config.physmem_end, PFN2ADDR(start + count)); 902 905 903 906 /* If confframe is supposed to be inside our zone, then make sure
Note:
See TracChangeset
for help on using the changeset viewer.