sigcontext.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2012 ARM Ltd.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef _UAPI__ASM_SIGCONTEXT_H
  17. #define _UAPI__ASM_SIGCONTEXT_H
  18. #include <linux/types.h>
  19. /*
  20. * Signal context structure - contains all info to do with the state
  21. * before the signal handler was invoked.
  22. */
  23. struct sigcontext {
  24. __u64 fault_address;
  25. /* AArch64 registers */
  26. __u64 regs[31];
  27. __u64 sp;
  28. __u64 pc;
  29. __u64 pstate;
  30. /* 4K reserved for FP/SIMD state and future expansion */
  31. __u8 __reserved[4096] __attribute__((__aligned__(16)));
  32. };
  33. /*
  34. * Header to be used at the beginning of structures extending the user
  35. * context. Such structures must be placed after the rt_sigframe on the stack
  36. * and be 16-byte aligned. The last structure must be a dummy one with the
  37. * magic and size set to 0.
  38. */
  39. struct _aarch64_ctx {
  40. __u32 magic;
  41. __u32 size;
  42. };
  43. #define FPSIMD_MAGIC 0x46508001
  44. struct fpsimd_context {
  45. struct _aarch64_ctx head;
  46. __u32 fpsr;
  47. __u32 fpcr;
  48. __uint128_t vregs[32];
  49. };
  50. #endif /* _UAPI__ASM_SIGCONTEXT_H */