vm_ops.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Hexagon VM instruction support
  3. *
  4. * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 and
  8. * only version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  18. * 02110-1301, USA.
  19. */
  20. #include <linux/linkage.h>
  21. #include <asm/hexagon_vm.h>
  22. /*
  23. * C wrappers for virtual machine "instructions". These
  24. * could be, and perhaps some day will be, handled as in-line
  25. * macros, but for tracing/debugging it's handy to have
  26. * a single point of invocation for each of them.
  27. * Conveniently, they take paramters and return values
  28. * consistent with the ABI calling convention.
  29. */
  30. ENTRY(__vmrte)
  31. trap1(#HVM_TRAP1_VMRTE);
  32. jumpr R31;
  33. ENTRY(__vmsetvec)
  34. trap1(#HVM_TRAP1_VMSETVEC);
  35. jumpr R31;
  36. ENTRY(__vmsetie)
  37. trap1(#HVM_TRAP1_VMSETIE);
  38. jumpr R31;
  39. ENTRY(__vmgetie)
  40. trap1(#HVM_TRAP1_VMGETIE);
  41. jumpr R31;
  42. ENTRY(__vmintop)
  43. trap1(#HVM_TRAP1_VMINTOP);
  44. jumpr R31;
  45. ENTRY(__vmclrmap)
  46. trap1(#HVM_TRAP1_VMCLRMAP);
  47. jumpr R31;
  48. ENTRY(__vmnewmap)
  49. r1 = #VM_NEWMAP_TYPE_PGTABLES;
  50. trap1(#HVM_TRAP1_VMNEWMAP);
  51. jumpr R31;
  52. ENTRY(__vmcache)
  53. trap1(#HVM_TRAP1_VMCACHE);
  54. jumpr R31;
  55. ENTRY(__vmgettime)
  56. trap1(#HVM_TRAP1_VMGETTIME);
  57. jumpr R31;
  58. ENTRY(__vmsettime)
  59. trap1(#HVM_TRAP1_VMSETTIME);
  60. jumpr R31;
  61. ENTRY(__vmwait)
  62. trap1(#HVM_TRAP1_VMWAIT);
  63. jumpr R31;
  64. ENTRY(__vmyield)
  65. trap1(#HVM_TRAP1_VMYIELD);
  66. jumpr R31;
  67. ENTRY(__vmstart)
  68. trap1(#HVM_TRAP1_VMSTART);
  69. jumpr R31;
  70. ENTRY(__vmstop)
  71. trap1(#HVM_TRAP1_VMSTOP);
  72. jumpr R31;
  73. ENTRY(__vmvpid)
  74. trap1(#HVM_TRAP1_VMVPID);
  75. jumpr R31;
  76. /* Probably not actually going to use these; see vm_entry.S */
  77. ENTRY(__vmsetregs)
  78. trap1(#HVM_TRAP1_VMSETREGS);
  79. jumpr R31;
  80. ENTRY(__vmgetregs)
  81. trap1(#HVM_TRAP1_VMGETREGS);
  82. jumpr R31;