Changeset 25a76ab8 in mainline for boot/arch/arm32/src/asm.S
- Timestamp:
- 2010-05-08T07:53:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 051bc69a
- Parents:
- 6c39a907 (diff), 1317380 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/src/asm.S
r6c39a907 r25a76ab8 27 27 # 28 28 29 30 #include "mm.h" 29 #include <arch/arch.h> 31 30 32 31 .section BOOTSTRAP 33 32 34 33 .global start 34 .global boot_pt 35 .global boot_stack 36 .global halt 37 .global memcpy 35 38 .global jump_to_kernel 36 .global page_table37 .global boot_stack38 39 39 40 start: 40 41 ldr sp, =boot_stack 41 42 b bootstrap 43 44 .section BOOTPT 45 boot_pt: 46 .space PTL0_ENTRIES * PTL0_ENTRY_SIZE 47 48 .section BOOTSTACK 49 .space 4096 50 boot_stack: 51 52 .text 53 54 halt: 55 b halt 56 57 memcpy: 58 add r3, r1, #3 59 bic r3, r3, #3 60 cmp r1, r3 61 stmdb sp!, {r4, r5, lr} 62 mov r5, r0 63 beq 4f 64 65 1: 66 cmp r2, #0 67 movne ip, #0 68 beq 3f 69 70 2: 71 ldrb r3, [ip, r1] 72 strb r3, [ip, r0] 73 add ip, ip, #1 74 cmp ip, r2 75 bne 2b 76 77 3: 78 mov r0, r5 79 ldmia sp!, {r4, r5, pc} 80 81 4: 82 add r3, r0, #3 83 bic r3, r3, #3 84 cmp r0, r3 85 bne 1b 86 movs r4, r2, lsr #2 87 moveq lr, r4 88 beq 6f 89 mov lr, #0 90 mov ip, lr 91 92 5: 93 ldr r3, [ip, r1] 94 add lr, lr, #1 95 cmp lr, r4 96 str r3, [ip, r0] 97 add ip, ip, #4 98 bne 5b 99 100 6: 101 ands r4, r2, #3 102 beq 3b 103 mov r3, lr, lsl #2 104 add r0, r3, r0 105 add ip, r3, r1 106 mov r2, #0 107 108 7: 109 ldrb r3, [r2, ip] 110 strb r3, [r2, r0] 111 add r2, r2, #1 112 cmp r2, r4 113 bne 7b 114 b 3b 42 115 43 116 jump_to_kernel: … … 48 121 # 49 122 bx r0 50 51 #bootloader stack52 .section ST53 .space 409654 boot_stack:55 56 # place page_table to PT section57 .section PT58 59 # make place for PTL0 page table60 page_table:61 .skip PTL0_ENTRIES * PTL0_ENTRY_SIZE
Note:
See TracChangeset
for help on using the changeset viewer.