arm_as_macros.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Linux 2.6.32 and later Kernel module for VMware MVP Hypervisor Support
  3. *
  4. * Copyright (C) 2010-2013 VMware, Inc. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; see the file COPYING. If not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #line 5
  20. /**
  21. * @file
  22. *
  23. * @brief Macro definitions meta-ops to be used in assembler files
  24. *
  25. * This header contains asm macro definitions to be used in asm
  26. * files only. This is intended to be the equivalent of arm_gcc_inline.h
  27. */
  28. #ifndef _ARM_AS_MACROS_H_
  29. #define _ARM_AS_MACROS_H_
  30. #define INCLUDE_ALLOW_MVPD
  31. #define INCLUDE_ALLOW_VMX
  32. #define INCLUDE_ALLOW_MODULE
  33. #define INCLUDE_ALLOW_MONITOR
  34. #define INCLUDE_ALLOW_PV
  35. #define INCLUDE_ALLOW_GPL
  36. #include "include_check.h"
  37. #include "coproc_defs.h"
  38. /**
  39. * @name The following macros re-arrange the order of the mcr/mrc operands
  40. * making it suitable to be used with the macros defined in coproc_defs.h
  41. *
  42. * @par For example
  43. * mcr_p15 DOMAIN_CONTROL, r3
  44. * @par replaces
  45. * mcr p15, 0, r3, c3, c0, 0
  46. * @{
  47. */
  48. .macro mcr_p15 op1, op2, op3, op4, reg, cond = al
  49. mcr\cond p15, \op1, \reg, \op2, \op3, \op4
  50. .endm
  51. .macro mrc_p15 op1, op2, op3, op4, reg, cond = al
  52. mrc\cond p15, \op1, \reg, \op2, \op3, \op4
  53. .endm
  54. .macro mcrr_p15 op1, op2, reg1, reg2
  55. mcrr p15, \op1, \reg1, \reg2, \op2
  56. .endm
  57. .macro mrrc_p15 op1, op2, reg1, reg2
  58. mrrc p15, \op1, \reg1, \reg2, \op2
  59. .endm
  60. /*@}*/
  61. /**
  62. * @name Our toolchain does not include support for the VE instructions yet.
  63. * @{
  64. */
  65. .macro hvc imm16
  66. .word ARM_INSTR_HVC_A1_ENC(\imm16)
  67. .endm
  68. .macro eret
  69. .word ARM_INSTR_ERET_A1_ENC(ARM_INSTR_COND_AL)
  70. .endm
  71. .macro msr_ext rm, rn
  72. .word ARM_INSTR_MSR_EXT_A1_ENC(ARM_INSTR_COND_AL, \rm, \rn)
  73. .endm
  74. .macro mrs_ext rd, rm
  75. .word ARM_INSTR_MRS_EXT_A1_ENC(ARM_INSTR_COND_AL, \rd, \rm)
  76. .endm
  77. /*@}*/
  78. #endif /* ifndef _ARM_AS_MACROS_H_ */