Changes in kernel/arch/arm32/src/mm/page.c [7e752b2:00287cc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mm/page.c
r7e752b2 r00287cc 27 27 */ 28 28 29 /** @addtogroup arm32mm 29 /** @addtogroup arm32mm 30 30 * @{ 31 31 */ … … 41 41 #include <arch/exception.h> 42 42 #include <typedefs.h> 43 #include <arch/types.h> 43 44 #include <interrupt.h> 44 45 #include <arch/mm/frame.h> … … 53 54 int flags = PAGE_CACHEABLE; 54 55 page_mapping_operations = &pt_mapping_operations; 55 56 page_table_lock(AS_KERNEL, true);57 56 58 57 uintptr_t cur; 59 58 /* Kernel identity mapping */ 60 for (cur = PHYSMEM_START_ADDR; cur < last_frame; cur += FRAME_SIZE)59 for (cur = 0; cur < last_frame; cur += FRAME_SIZE) 61 60 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); 62 61 … … 68 67 #error "Only high exception vector supported now" 69 68 #endif 70 cur = ALIGN_DOWN(0x50008010, FRAME_SIZE);71 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);72 73 page_table_unlock(AS_KERNEL, true);74 69 75 70 as_switch(NULL, AS_KERNEL); … … 93 88 KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) { 94 89 panic("Unable to map physical memory %p (%d bytes).", 95 (void *) physaddr, size);90 physaddr, size) 96 91 } 97 92 98 93 uintptr_t virtaddr = PA2KA(last_frame); 99 94 pfn_t i; 100 101 page_table_lock(AS_KERNEL, true);102 95 for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) { 103 96 page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i), … … 105 98 PAGE_NOT_CACHEABLE | PAGE_READ | PAGE_WRITE | PAGE_KERNEL); 106 99 } 107 page_table_unlock(AS_KERNEL, true);108 100 109 101 last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note:
See TracChangeset
for help on using the changeset viewer.