1*c2da86f3SMasahiro Yamada /* 2*c2da86f3SMasahiro Yamada * opcodes-virt.h: Opcode definitions for the ARM virtualization extensions 3*c2da86f3SMasahiro Yamada * Copyright (C) 2012 Linaro Limited 4*c2da86f3SMasahiro Yamada * 5*c2da86f3SMasahiro Yamada * This program is free software; you can redistribute it and/or modify 6*c2da86f3SMasahiro Yamada * it under the terms of the GNU General Public License as published by 7*c2da86f3SMasahiro Yamada * the Free Software Foundation; either version 2 of the License, or 8*c2da86f3SMasahiro Yamada * (at your option) any later version. 9*c2da86f3SMasahiro Yamada * 10*c2da86f3SMasahiro Yamada * This program is distributed in the hope that it will be useful, 11*c2da86f3SMasahiro Yamada * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*c2da86f3SMasahiro Yamada * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*c2da86f3SMasahiro Yamada * GNU General Public License for more details. 14*c2da86f3SMasahiro Yamada * 15*c2da86f3SMasahiro Yamada * You should have received a copy of the GNU General Public License along 16*c2da86f3SMasahiro Yamada * with this program; if not, write to the Free Software Foundation, Inc., 17*c2da86f3SMasahiro Yamada * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18*c2da86f3SMasahiro Yamada */ 19*c2da86f3SMasahiro Yamada #ifndef __ASM_ARM_OPCODES_VIRT_H 20*c2da86f3SMasahiro Yamada #define __ASM_ARM_OPCODES_VIRT_H 21*c2da86f3SMasahiro Yamada 22*c2da86f3SMasahiro Yamada #include <asm/opcodes.h> 23*c2da86f3SMasahiro Yamada 24*c2da86f3SMasahiro Yamada #define __HVC(imm16) __inst_arm_thumb32( \ 25*c2da86f3SMasahiro Yamada 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \ 26*c2da86f3SMasahiro Yamada 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ 27*c2da86f3SMasahiro Yamada ) 28*c2da86f3SMasahiro Yamada 29*c2da86f3SMasahiro Yamada #define __ERET __inst_arm_thumb32( \ 30*c2da86f3SMasahiro Yamada 0xE160006E, \ 31*c2da86f3SMasahiro Yamada 0xF3DE8F00 \ 32*c2da86f3SMasahiro Yamada ) 33*c2da86f3SMasahiro Yamada 34*c2da86f3SMasahiro Yamada #define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ 35*c2da86f3SMasahiro Yamada 0xE12EF300 | regnum, \ 36*c2da86f3SMasahiro Yamada 0xF3808E30 | (regnum << 16) \ 37*c2da86f3SMasahiro Yamada ) 38*c2da86f3SMasahiro Yamada 39*c2da86f3SMasahiro Yamada #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ 40