66#include "soc_AM1808.h"
77
88 . global Entry
9- . global pbdrv_stack_end
9+ . global pbdrv_stack_end
1010 . global _bss_start
1111 . global _bss_end
1212
2323
2424@
2525@ to set the mode bits in CPSR for different modes
26- @
27- .set MODE_USR , 0x10
26+ @
27+ .set MODE_USR , 0x10
2828 .set MODE_FIQ , 0x11
2929 .set MODE_IRQ , 0x12
3030 .set MODE_SVC , 0x13
3131 .set MODE_ABT , 0x17
3232 .set MODE_UND , 0x1B
33- .set MODE_SYS , 0x1F
33+ .set MODE_SYS , 0x1F
3434
35- . equ I_F_BIT , 0xC0
35+ . equ I_F_BIT , 0xC0
3636
3737@ **************************** Code Seection ***********************************
3838 .text
4848@
4949@ The reset handler sets up the stack pointers for all the modes. The FIQ and
5050@ IRQ shall be disabled during this. Then , clearthe BSS sections , switch to the
51- @ main() function.
51+ @ main() function.
5252@
5353Entry:
5454 MRC p15 , 0 , r0 , c1 , c0 , 0 @ Load Coprocessor Register C1 to ARM Register r0
@@ -57,37 +57,37 @@ Entry:
5757@
5858@ Set up the Stack for Undefined mode
5959@
60- LDR r0 , =pbdrv_stack_end @ Read the stack address
60+ LDR r0 , =pbdrv_stack_end @ Read the stack address
6161 MSR cpsr_c , #MODE_UND|I_F_BIT @ switch to undef mode
6262 MOV sp , r0 @ write the stack pointer
6363 SUB r0 , r0 , #UND_STACK_SIZE @ give stack space
6464@
6565@ Set up the Stack for abort mode
66- @
66+ @
6767 MSR cpsr_c , #MODE_ABT|I_F_BIT @ Change to abort mode
6868 MOV sp , r0 @ write the stack pointer
6969 SUB r0 , r0 , #ABT_STACK_SIZE @ give stack space
7070@
7171@ Set up the Stack for FIQ mode
72- @
72+ @
7373 MSR cpsr_c , #MODE_FIQ|I_F_BIT @ change to FIQ mode
7474 MOV sp , r0 @ write the stack pointer
7575 SUB r0 , r0 , #FIQ_STACK_SIZE @ give stack space
7676@
7777@ Set up the Stack for IRQ mode
78- @
78+ @
7979 MSR cpsr_c , #MODE_IRQ|I_F_BIT @ change to IRQ mode
8080 MOV sp , r0 @ write the stack pointer
8181 SUB r0 , r0 , #IRQ_STACK_SIZE @ give stack space
8282@
8383@ Set up the Stack for SVC mode
84- @
84+ @
8585 MSR cpsr_c , #MODE_SVC|I_F_BIT @ change to SVC mode
8686 MOV sp , r0 @ write the stack pointer
8787 SUB r0 , r0 , #SVC_STACK_SIZE @ give stack space
8888@
8989@ Set up the Stack for USer/System mode
90- @
90+ @
9191 MSR cpsr_c , #MODE_SYS|I_F_BIT @ change to system mode
9292 MOV sp , r0 @ write the stack pointer
9393
@@ -98,13 +98,13 @@ Clear_Bss_Section:
9898
9999 LDR r0 , =_bss_start @ Start address of BSS
100100 LDR r1 , =(_bss_end - 0x04 ) @ End address of BSS
101- MOV r2 , # 0
102- Loop :
101+ MOV r2 , # 0
102+ Loop :
103103 STR r2 , [ r0 ], # 4 @ Clear one word in BSS
104104 CMP r0 , r1
105105 BLE Loop @ Clear till BSS end
106-
107-
106+
107+
108108@
109109@ Enter the start_boot function. The execution still happens in system mode
110110@
@@ -120,7 +120,7 @@ Enter_main:
120120 BLX r10 @ Branch to main
121121
122122 SUB pc , pc , # 0x08 @ looping
123-
123+
124124@ *****************************************************************************
125125@
126126@ End of the file
0 commit comments