Changes in kernel/arch/arm32/src/mm/frame.c [6250c37:5ac77cc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mm/frame.c
r6250c37 r5ac77cc 38 38 #include <arch/machine_func.h> 39 39 #include <config.h> 40 #include <align.h>41 40 42 41 /** Address of the last frame in the memory. */ … … 46 45 void frame_arch_init(void) 47 46 { 48 uintptr_t mem_start, mem_size; 49 uintptr_t first_frame; 50 uintptr_t num_frames; 51 52 machine_get_memory_extents(&mem_start, &mem_size); 53 first_frame = ALIGN_UP(mem_start, FRAME_SIZE); 54 last_frame = ALIGN_DOWN(mem_start + mem_size, FRAME_SIZE); 55 num_frames = (last_frame - first_frame) >> FRAME_WIDTH; 47 last_frame = machine_get_memory_size(); 56 48 57 49 /* All memory as one zone */ 58 zone_create( first_frame >> FRAME_WIDTH, num_frames,50 zone_create(0, ADDR2PFN(last_frame), 59 51 BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); 60 52
Note:
See TracChangeset
for help on using the changeset viewer.