From bff4e9ea4f2acbca0ba03d501b55ac733cc9a8bb Mon Sep 17 00:00:00 2001 From: andrewfish Date: Wed, 17 Mar 2010 02:25:41 +0000 Subject: Sync up ARMASM and GCC version git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10261 6f19259b-4bc3-4df7-8a09-765794883524 --- BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S | 13 +++++++++++-- BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S index d8cabeb25f..950ba43c69 100644 --- a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S +++ b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S @@ -37,11 +37,20 @@ ASM_PFX(_ModuleEntryPoint): mcr p15, 0, r0, c1, c0, 0 // Set CPU vectors to start of DRAM - mov r0, #0x80000000 + LoadConstantToReg (FixedPcdGet32(PcdCpuVectorBaseAddress) ,r0) // Get vector base 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*/ + // 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: // diff --git a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm index 414adcb266..033f03c684 100644 --- a/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm +++ b/BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm @@ -53,7 +53,7 @@ FillVectors cmp r2, #32 bne FillVectors - /* before we call C code, lets setup the stack pointer in internal RAM*/ + /* before we call C code, lets setup the stack pointer in internal RAM */ stack_pointer_setup // -- cgit v1.2.3