[U-Boot] How to use the NEON instruction at u-boot?
V, Aneesh
aneesh at ti.com
Thu Nov 11 09:58:24 CET 2010
Hi Kyungmin Park,
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-
> bounces at lists.denx.de] On Behalf Of Kyungmin Park
> Sent: Thursday, November 11, 2010 11:05 AM
> To: u-boot at lists.denx.de"
> Cc: Minkyu Kang
> Subject: [U-Boot] How to use the NEON instruction at u-boot?
>
> Hi,
>
> Now I'm trying to use the NEON instruction at u-boot. but it's
> failed
> and got the data abort.
> Are there any way to use the NEON instruction at u-boot?
>
> The main purpose is to use the neon memcpy as below.
>
> bge 1f
> // copies 4 bytes, destination 32-bits aligned
> vld4.8 {d0[0], d1[0], d2[0], d3[0]}, [r1]!
> vst4.8 {d0[0], d1[0], d2[0], d3[0]}, [r0, :32]!
> 1: bcc 2f
>
I am not sure if there is a valid use-case for this. But if you
are keen on using Neon you will have to enable the co-processor first.
Here is a piece of code I wrote for doing this in another bootloader.
#define VMSR_FPSCR_r0 dcd 0xeee80a10
#define VMRS_r0_FPSCR dcd 0xeef80a10
__asm uint32 enable_neon(void)
{
ldr r0, =0x00F00000
MCR p15,0,r0,c1,c0,2 // CP15 Coprocessor Access Control Register
ldr r0, =0x40000000
VMSR_FPSCR_r0
VMRS_r0_FPSCR
bx r14
}
This is written for RVCT tool chain. So you may have to convert it
for GCC. Also, my assembler didn't allow ARMv7 instructions. So, I
used DCD. You can either use .word in gcc or use the real instructions
if your assembler understands those instructions.
> Thank you,
> Kyungmin Park
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
More information about the U-Boot
mailing list