Changeset 83742a4 in mainline
- Timestamp:
- 2013-01-20T16:02:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b8bb2bc
- Parents:
- 4a79e6f
- Location:
- boot/arch/arm32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/include/asm.h
r4a79e6f r83742a4 49 49 * 50 50 */ 51 extern void jump_to_kernel(void *entry, void *bootinfo )51 extern void jump_to_kernel(void *entry, void *bootinfo, void *kernel_end) 52 52 __attribute__((noreturn)); 53 53 -
boot/arch/arm32/src/asm.S
r4a79e6f r83742a4 61 61 # 62 62 63 # 64 # r0 is kernel entry point 65 # r1 is pointer to the bootinfo structure 66 # r2 is a kernel text end 67 68 # make sure kernel is flushed and available in memory 69 # Disable I-cache and D-cache before the kernel is started. 70 # TODO disabling DCache should not be necessary... 71 #define CP15_C1_IC 12 72 #define CP15_C1_DC 2 73 mrc p15, 0, r4, c1, c0, 0 74 bic r4, r4, #(1 << CP15_C1_DC) 75 bic r4, r4, #(1 << CP15_C1_IC) 76 mcr p15, 0, r4, c1, c0, 0 77 78 # use r4 as a moving pointer 79 mov r4, r0 80 3: 81 # DCCMVAC (flush by virt address, to the point of coherence) 82 mcr p15, 0, r4, c7, c10, 1 83 # TODO: it would be better to use cacheline size 84 add r4, r4, #4 85 # are we there yet? 86 cmp r4, r2 87 blt 3b 88 nop 89 mov r4, #0 90 91 #Wait for the operations to complete 92 #ifdef PROCESSOR_ARCH_armv7_a 93 dsb 94 #else 95 #cp15 dsb, r4 is ignored (should be zero) 96 mcr p15, 0, r4, c7, c10, 4 97 #endif 98 99 # Clean ICache and BPredictors, r4 ignored (SBZ) 100 mcr p15, 0, r4, c7, c5, 0 101 102 #Wait for the operations to complete 103 #ifdef PROCESSOR_ARCH_armv7_a 104 isb 105 #else 106 # cp15 isb 107 mcr p15, 0, r4, c7, c5, 4 108 #endif 109 110 63 111 #if defined(MACHINE_gta02) 64 112 -
boot/arch/arm32/src/main.c
r4a79e6f r83742a4 115 115 printf(".\n"); 116 116 117 printf("Booting the kernel... \n"); 118 jump_to_kernel((void *) PA2KA(BOOT_OFFSET), &bootinfo); 117 void *kernel_end = (void *) PA2KA(BOOT_OFFSET + components[0].inflated); 118 printf("Booting the kernel...\n"); 119 jump_to_kernel((void *) PA2KA(BOOT_OFFSET), &bootinfo, kernel_end); 119 120 } 120 121 -
boot/arch/arm32/src/mm.c
r4a79e6f r83742a4 59 59 const unsigned long address = section << PTE_SECTION_SHIFT; 60 60 if (address >= BBXM_RAM_START && address < BBXM_RAM_END) 61 return 0;61 return 1; 62 62 #endif 63 63 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.