1 1.3.4.1 martin /* $NetBSD: asm.h,v 1.3.4.1 2019/12/24 17:30:28 martin 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.3 christos #define fp x29 9 1.3 christos #define lr x30 10 1.3 christos 11 1.3.4.1 martin /* 12 1.3.4.1 martin * Add a speculation barrier after the 'eret'. 13 1.3.4.1 martin * Some aarch64 cpus speculatively execute instructions after 'eret', 14 1.3.4.1 martin * and this potentiates side-channel attacks. 15 1.3.4.1 martin */ 16 1.3.4.1 martin #define ERET \ 17 1.3.4.1 martin eret; dsb sy; isb 18 1.3.4.1 martin 19 1.1 matt #endif /* !_AARCH64_ASM_H_ */ 20