Home | History | Annotate | Line # | Download | only in include
asm.h revision 1.5
      1  1.5       ryo /* $NetBSD: asm.h,v 1.5 2019/12/20 07:16:43 ryo Exp $ */
      2  1.1      matt 
      3  1.1      matt #ifndef _AARCH64_ASM_H_
      4  1.1      matt #define _AARCH64_ASM_H_
      5  1.1      matt 
      6  1.1      matt #include <arm/asm.h>
      7  1.1      matt 
      8  1.4     joerg #ifdef __aarch64__
      9  1.3  christos #define	fp	x29
     10  1.3  christos #define	lr	x30
     11  1.5       ryo 
     12  1.5       ryo /*
     13  1.5       ryo  * Add a speculation barrier after the 'eret'.
     14  1.5       ryo  * Some aarch64 cpus speculatively execute instructions after 'eret',
     15  1.5       ryo  * and this potentiates side-channel attacks.
     16  1.5       ryo  */
     17  1.5       ryo #define	ERET	\
     18  1.5       ryo 	eret; dsb sy; isb
     19  1.5       ryo 
     20  1.4     joerg #endif
     21  1.3  christos 
     22  1.1      matt #endif /* !_AARCH64_ASM_H_ */
     23