diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-05 02:38:18 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-05 02:38:18 +0000 |
commit | 4951b2482fe1d279e51110aedd157ed1628bc34c (patch) | |
tree | e4fd64a402e661b058a0e6843a10a6a1e46cb0cb /BeagleBoardPkg/Sec | |
parent | aebb096e45192f6f88b702524ae83ca40f520103 (diff) | |
download | edk2-4951b2482fe1d279e51110aedd157ed1628bc34c.zip edk2-4951b2482fe1d279e51110aedd157ed1628bc34c.tar.gz edk2-4951b2482fe1d279e51110aedd157ed1628bc34c.tar.bz2 |
Remove dead file, and update startup code to null out vector table.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10199 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BeagleBoardPkg/Sec')
-rwxr-xr-x | BeagleBoardPkg/Sec/Arm/Macro.inc | 67 | ||||
-rw-r--r-- | BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S | 2 | ||||
-rw-r--r-- | BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm | 19 |
3 files changed, 17 insertions, 71 deletions
diff --git a/BeagleBoardPkg/Sec/Arm/Macro.inc b/BeagleBoardPkg/Sec/Arm/Macro.inc deleted file mode 100755 index cacfef9..0000000 --- a/BeagleBoardPkg/Sec/Arm/Macro.inc +++ /dev/null @@ -1,67 +0,0 @@ -//%HEADER%
- MACRO
- MmioWrite32Macro $Address, $Data
- ldr r1, = ($Address)
- ldr r0, = ($Data)
- str r0, [r1]
- MEND - - MACRO
- MmioOr32Macro $Address, $OrData
- ldr r1, =($Address)
- ldr r2, =($OrData)
- ldr r0, [r1]
- orr r0, r0, r2
- str r0, [r1]
- MEND - - MACRO
- MmioAnd32Macro $Address, $AndData
- ldr r1, =($Address)
- ldr r2, =($AndData)
- ldr r0, [r1]
- and r0, r0, r2
- str r0, [r1]
- MEND - - MACRO
- MmioAndThenOr32Macro $Address, $AndData, $OrData
- ldr r1, =($Address)
- ldr r0, [r1]
- ldr r2, =($AndData)
- and r0, r0, r2
- ldr r2, =($OrData)
- orr r0, r0, r2
- str r0, [r1]
- MEND - - MACRO
- MmioWriteFromReg32Macro $Address, $Reg
- ldr r1, =($Address)
- str $Reg, [r1]
- MEND - - MACRO
- MmioRead32Macro $Address
- ldr r1, =($Address)
- ldr r0, [r1]
- MEND - - MACRO
- MmioReadToReg32Macro $Address, $Reg
- ldr r1, =($Address)
- ldr $Reg, [r1]
- MEND - - MACRO
- LoadConstantMacro $Data
- ldr r0, =($Data)
- MEND - - MACRO
- LoadConstantToRegMacro $Data, $Reg
- ldr $Reg, =($Data)
- MEND
-
- END
-
\ No newline at end of file diff --git a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S index 882aed4..d8cabeb 100644 --- a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S +++ b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S @@ -39,6 +39,8 @@ ASM_PFX(_ModuleEntryPoint): // Set CPU vectors to start of DRAM
mov r0, #0x80000000
mcr p15, 0, r0, c12, c0, 0
+ isb // Sync changes to control registers
+
/* before we call C code, lets setup the stack pointer in internal RAM*/
stack_pointer_setup:
diff --git a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm index 5217169..eef6c3d 100644 --- a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm +++ b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm @@ -40,8 +40,19 @@ _ModuleEntryPoint mcr p15, 0, r0, c1, c0, 0
// Set CPU vectors to start of DRAM
- mov r0, #0x80000000
+ LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) /* memory size arg0 */
mcr p15, 0, r0, c12, c0, 0
+ isb // Sync changes to control registers
+
+ // Fill vector table with branchs to current pc (jmp $)
+ ldr r1, ShouldNeverGetHere
+ movs r2, #0
+FillVectors
+ str r1, [r0, r2]
+ adds r2, r2, #4
+ cmp r2, #32
+ bne FillVectors
+
/* before we call C code, lets setup the stack pointer in internal RAM*/
stack_pointer_setup
@@ -54,13 +65,13 @@ stack_pointer_setup add r4, r2, r3
//Enter SVC mode and set up SVC stack pointer
- mov r0,#0x13|0x80|0x40
- msr CPSR_c,r0
+ mov r5,#0x13|0x80|0x40
+ msr CPSR_c,r5
mov r13,r4
// Call C entry point
LoadConstantToReg (FixedPcdGet32(PcdMemorySize) ,r1) /* memory size arg1 */
- LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) /* memory size arg0 */
+// LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) Done above
blx CEntryPoint /* Assume C code is thumb */
ShouldNeverGetHere
|