Changes in boot/arch/arm32/src/asm.S [73b3ecd:24bead17] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/src/asm.S
r73b3ecd r24bead17 27 27 # 28 28 29 #include <abi/asmtool.h>30 29 #include <arch/arch.h> 31 30 32 31 .section BOOTSTRAP 33 32 34 SYMBOL(start) 33 .global start 34 .global boot_pt 35 .global boot_stack 36 .global halt 37 .global jump_to_kernel 38 39 start: 35 40 ldr sp, =boot_stack 36 41 b bootstrap 37 42 38 43 .section BOOTPT 39 SYMBOL(boot_pt) 44 boot_pt: 40 45 .space PTL0_ENTRIES * PTL0_ENTRY_SIZE 41 46 42 47 .section BOOTSTACK 43 48 .space 4096 44 SYMBOL(boot_stack) 49 boot_stack: 45 50 46 51 .text 47 52 48 FUNCTION_BEGIN(halt) 53 halt: 49 54 b halt 50 FUNCTION_END(halt)51 55 52 FUNCTION_BEGIN(jump_to_kernel) 56 jump_to_kernel: 53 57 # 58 # TODO 54 59 # Make sure that the I-cache, D-cache and memory are mutually coherent 55 60 # before passing control to the copied code. … … 63 68 #define CP15_C1_BP 11 64 69 #define CP15_C1_DC 2 70 # Disable I-cache and D-cache before the kernel is started. 71 mrc p15, 0, r4, c1, c0, 0 72 bic r4, r4, #(1 << CP15_C1_DC) 73 bic r4, r4, #(1 << CP15_C1_IC) 74 bic r4, r4, #(1 << CP15_C1_BP) 75 mcr p15, 0, r4, c1, c0, 0 65 76 66 67 #ifndef PROCESSOR_ARCH_armv7_a68 mrc p15, 0, r4, c1, c0, 069 77 70 # D-cache before the kernel is started. 71 bic r4, r4, #(1 << CP15_C1_DC) 72 73 # Disable I-cache and Branch predictors. 74 bic r4, r4, #(1 << CP15_C1_IC) 75 #ifdef PROCESSOR_ARCH_armv6 76 bic r4, r4, #(1 << CP15_C1_BP) 77 #endif 78 79 mcr p15, 0, r4, c1, c0, 0 80 #endif 81 82 # Wait for the operations to complete 78 #Wait for the operations to complete 83 79 #ifdef PROCESSOR_ARCH_armv7_a 84 80 dsb 85 81 #else 86 # cp15 dsb, r4 is ignored (should be zero) 87 mov r4, #0 82 #cp15 dsb, r4 is ignored (should be zero) 88 83 mcr p15, 0, r4, c7, c10, 4 89 84 #endif 90 85 91 86 # Clean ICache and BPredictors, r4 ignored (SBZ) 92 mov r4, #093 87 mcr p15, 0, r4, c7, c5, 0 94 88 nop 95 89 96 # 90 #Wait for the operations to complete 97 91 #ifdef PROCESSOR_ARCH_armv7_a 98 92 isb 99 93 nop 100 #el if defined(PROCESSOR_ARCH_armv6)94 #else 101 95 # cp15 isb 102 96 mcr p15, 0, r4, c7, c5, 4 … … 104 98 #endif 105 99 mov pc, r0 106 FUNCTION_END(jump_to_kernel)107
Note:
See TracChangeset
for help on using the changeset viewer.