exc_defs.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 Exception-related definitions. See A2.6 ARM DDI 0100I.
  24. */
  25. #ifndef _EXC_DEFS_H_
  26. #define _EXC_DEFS_H_
  27. #define INCLUDE_ALLOW_MVPD
  28. #define INCLUDE_ALLOW_VMX
  29. #define INCLUDE_ALLOW_MODULE
  30. #define INCLUDE_ALLOW_MONITOR
  31. #define INCLUDE_ALLOW_PV
  32. #define INCLUDE_ALLOW_GPL
  33. #include "include_check.h"
  34. #define EXC_VECTOR_SIZE 0x20
  35. #define EXC_RESET_VECTOR_OFFSET 0x00
  36. #define EXC_UNDEFINED_VECTOR_OFFSET 0x04
  37. #define EXC_SWI_VECTOR_OFFSET 0x08
  38. #define EXC_PREFETCH_ABORT_VECTOR_OFFSET 0x0c
  39. #define EXC_DATA_ABORT_VECTOR_OFFSET 0x10
  40. #define EXC_HYP_VECTOR_OFFSET 0x14
  41. #define EXC_IRQ_VECTOR_OFFSET 0x18
  42. #define EXC_FIQ_VECTOR_OFFSET 0x1c
  43. #define EXC_ARM_UNDEFINED_SAVED_PC_OFFSET 4
  44. #define EXC_ARM_SWI_SAVED_PC_OFFSET 4
  45. #define EXC_ARM_PREFETCH_ABORT_SAVED_PC_OFFSET 4
  46. #define EXC_ARM_DATA_ABORT_SAVED_PC_OFFSET 8
  47. #define EXC_ARM_IRQ_SAVED_PC_OFFSET 4
  48. #define EXC_ARM_FIQ_SAVED_PC_OFFSET 4
  49. #define EXC_THUMB_UNDEFINED_SAVED_PC_OFFSET 2
  50. #define EXC_THUMB_SWI_SAVED_PC_OFFSET 2
  51. #define EXC_THUMB_PREFETCH_ABORT_SAVED_PC_OFFSET 4
  52. #define EXC_THUMB_DATA_ABORT_SAVED_PC_OFFSET 8
  53. #define EXC_THUMB_IRQ_SAVED_PC_OFFSET 4
  54. #define EXC_THUMB_FIQ_SAVED_PC_OFFSET 4
  55. #define EXC_SAVED_PC_OFFSET(exc, cpsr) \
  56. (((cpsr) & ARM_PSR_T) ? EXC_THUMB_##exc##_SAVED_PC_OFFSET : \
  57. EXC_ARM_##exc##_SAVED_PC_OFFSET)
  58. #endif /* _EXC_DEFS_H_ */