Changeset 25a76ab8 in mainline for boot/arch/arm32/src/asm.S


Ignore:
Timestamp:
2010-05-08T07:53:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
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.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/src/asm.S

    r6c39a907 r25a76ab8  
    2727#
    2828
    29 
    30 #include "mm.h"
     29#include <arch/arch.h>
    3130
    3231.section BOOTSTRAP
    3332
    3433.global start
     34.global boot_pt
     35.global boot_stack
     36.global halt
     37.global memcpy
    3538.global jump_to_kernel
    36 .global page_table
    37 .global boot_stack
    3839
    3940start:
    4041        ldr sp, =boot_stack
    4142        b bootstrap
     43
     44.section BOOTPT
     45boot_pt:
     46        .space PTL0_ENTRIES * PTL0_ENTRY_SIZE
     47
     48.section BOOTSTACK
     49        .space 4096
     50boot_stack:
     51
     52.text
     53
     54halt:
     55        b halt
     56
     57memcpy:
     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
    42115
    43116jump_to_kernel:
     
    48121        #
    49122        bx r0
    50 
    51 #bootloader stack
    52 .section ST
    53         .space 4096
    54 boot_stack:
    55 
    56 # place page_table to PT section
    57 .section PT
    58 
    59 # make place for PTL0 page table
    60 page_table:
    61         .skip PTL0_ENTRIES * PTL0_ENTRY_SIZE
Note: See TracChangeset for help on using the changeset viewer.