]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm
Enable NEON (SIMD instructions) via coprocessor register so CopyMem/SetMem can use...
[mirror_edk2.git] / BeagleBoardPkg / Sec / Arm / ModuleEntryPoint.asm
index 414adcb266a48f88ae6ce59f9e52add945f684cd..d46ae2b0da41c3929b2fd8d34d3b2c2682361f71 100644 (file)
@@ -39,6 +39,13 @@ _ModuleEntryPoint
   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(PcdCpuVectorBaseAddress) ,r0) // Get vector base\r
   mcr     p15, 0, r0, c12, c0, 0\r
@@ -53,7 +60,7 @@ FillVectors
   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