//------------------------------------------------------------------------------ \r
//\r
-// Copyright (c) 2008-2009 Apple Inc. All rights reserved.\r
+// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
//\r
-// All rights reserved. This program and the accompanying materials\r
+// This program and the accompanying materials\r
// are licensed and made available under the terms and conditions of the BSD License\r
// which accompanies this distribution. The full text of the license may be found at\r
// http://opensource.org/licenses/bsd-license.php\r
orr r0, r0, #0x00001000 /* set bit 12 (I) enable I-Cache */\r
mcr p15, 0, r0, c1, c0, 0\r
\r
+ // Enable NEON register in case folks want to use them for optimizations (CopyMem)\r
+ mrc p15, 0, r0, c1, c0, 2\r
+ orr r0, r0, #0x00f00000 // Enable VPF access (V* instructions)\r
+ mcr p15, 0, r0, c1, c0, 2\r
+ mov r0, #0x40000000 // Set EN bit in FPEXC\r
+ msr FPEXC,r0\r
+ \r
// Set CPU vectors to start of DRAM\r
- LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) /* memory size arg0 */\r
+ LoadConstantToReg (FixedPcdGet32(PcdCpuVectorBaseAddress) ,r0) // Get vector base\r
mcr p15, 0, r0, c12, c0, 0\r
isb // Sync changes to control registers\r
\r
cmp r2, #32\r
bne FillVectors\r
\r
- /* before we call C code, lets setup the stack pointer in internal RAM*/\r
+ /* before we call C code, lets setup the stack pointer in internal RAM */\r
stack_pointer_setup\r
\r
//\r
// Set stack based on PCD values. Need to do it this way to make C code work \r
// when it runs from FLASH. \r
// \r
- LoadConstantToReg (FixedPcdGet32(PcdPrePiStackBase) ,r2) /* stack base arg2 */\r
- LoadConstantToReg (FixedPcdGet32(PcdPrePiStackSize) ,r3) /* stack size arg3 */\r
+ LoadConstantToReg (FixedPcdGet32(PcdPrePiStackBase) ,r2) // stack base arg2 \r
+ LoadConstantToReg (FixedPcdGet32(PcdPrePiStackSize) ,r3) // stack size arg3 \r
add r4, r2, r3\r
\r
//Enter SVC mode and set up SVC stack pointer\r
mov r13,r4\r
\r
// Call C entry point\r
- LoadConstantToReg (FixedPcdGet32(PcdMemorySize) ,r1) /* memory size arg1 */\r
-// LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) Done above \r
- blx CEntryPoint /* Assume C code is thumb */\r
+ LoadConstantToReg (FixedPcdGet32(PcdMemorySize) ,r1) // memory size arg1 \r
+ LoadConstantToReg (FixedPcdGet32(PcdMemoryBase) ,r0) // memory start arg0\r
+ blx CEntryPoint // Assume C code is thumb \r
\r
ShouldNeverGetHere\r
/* _CEntryPoint should never return */\r