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