sigcontext.h 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. /*
  3. * Author: Hanlu Li <[email protected]>
  4. * Huacai Chen <[email protected]>
  5. *
  6. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  7. */
  8. #ifndef _UAPI_ASM_SIGCONTEXT_H
  9. #define _UAPI_ASM_SIGCONTEXT_H
  10. #include <linux/types.h>
  11. #include <linux/posix_types.h>
  12. /* FP context was used */
  13. #define SC_USED_FP (1 << 0)
  14. /* Address error was due to memory load */
  15. #define SC_ADDRERR_RD (1 << 30)
  16. /* Address error was due to memory store */
  17. #define SC_ADDRERR_WR (1 << 31)
  18. struct sigcontext {
  19. __u64 sc_pc;
  20. __u64 sc_regs[32];
  21. __u32 sc_flags;
  22. __u64 sc_extcontext[0] __attribute__((__aligned__(16)));
  23. };
  24. #define CONTEXT_INFO_ALIGN 16
  25. struct sctx_info {
  26. __u32 magic;
  27. __u32 size;
  28. __u64 padding; /* padding to 16 bytes */
  29. };
  30. /* FPU context */
  31. #define FPU_CTX_MAGIC 0x46505501
  32. #define FPU_CTX_ALIGN 8
  33. struct fpu_context {
  34. __u64 regs[32];
  35. __u64 fcc;
  36. __u32 fcsr;
  37. };
  38. #endif /* _UAPI_ASM_SIGCONTEXT_H */