summaryrefslogtreecommitdiff
path: root/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 01:54:09 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 01:54:09 +0000
commit97e9818a67e8d3cc221d543e6badd5d1dd770d8d (patch)
treea82c5e3dbab9fa25ddc5d6c7197986e61b23f028 /BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S
parent1fc17d768f44860bebeba03bf2e996c20c9dd08d (diff)
downloadedk2-platforms-97e9818a67e8d3cc221d543e6badd5d1dd770d8d.tar.xz
Sync with ARMASM version.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10172 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S')
-rw-r--r--BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S34
1 files changed, 3 insertions, 31 deletions
diff --git a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S
index 89bcab77ef..882aed469c 100644
--- a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S
+++ b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S
@@ -35,12 +35,11 @@ ASM_PFX(_ModuleEntryPoint):
orr r0, r0, #0x00000002 /* set bit 1 (A) Align */
orr r0, r0, #0x00001000 /* set bit 12 (I) enable I-Cache */
mcr p15, 0, r0, c1, c0, 0
-
+
// Set CPU vectors to start of DRAM
mov r0, #0x80000000
mcr p15, 0, r0, c12, c0, 0
-
- /* before we call C code, lets setup the stack pointer */
+ /* before we call C code, lets setup the stack pointer in internal RAM*/
stack_pointer_setup:
//
@@ -51,44 +50,17 @@ stack_pointer_setup:
LoadConstantToReg (FixedPcdGet32(PcdPrePiStackSize) ,r3) /* stack size arg3 */
add r4, r2, r3
- //Enter IRQ mode and set up IRQ stack pointer
- mov r0,#0x12|0x80|0x40
- msr CPSR_c,r0
- mov r13,r4
-
- //Enter Abort mode and set up Abort stack pointer
- mov r0,#0x17|0x80|0x40
- msr CPSR_c,r0
- sub r4, r4, #0x400
- mov r13,r4
-
- //Enter Undefined mode and set up Undefined stack pointer
- mov r0,#0x1b|0x80|0x40
- msr CPSR_c,r0
- sub r4, r4, #0x400
- mov r13,r4
-
//Enter SVC mode and set up SVC stack pointer
mov r0,#0x13|0x80|0x40
msr CPSR_c,r0
- sub r4, r4, #0x400
- mov r13,r4
-
- //Enter System mode and set up System stack pointer
- mov r0,#0x1f|0x80|0x40
- msr CPSR_c,r0
- sub r4, r4, #0x400
mov r13,r4
// Call C entry point
LoadConstantToReg (FixedPcdGet32(PcdMemorySize) ,r1) /* memory size arg1 */
LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) /* memory size arg0 */
-
-
- blx ASM_PFX(CEntryPoint) /* Assume C code is ARM */
+ blx ASM_PFX(CEntryPoint) /* Assume C code is thumb */
ShouldNeverGetHere:
/* _CEntryPoint should never return */
b ShouldNeverGetHere
-