ppc32.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef _PPC64_PPC32_H
  2. #define _PPC64_PPC32_H
  3. #include <linux/compat.h>
  4. #include <asm/siginfo.h>
  5. #include <asm/signal.h>
  6. /*
  7. * Data types and macros for providing 32b PowerPC support.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version
  12. * 2 of the License, or (at your option) any later version.
  13. */
  14. /* These are here to support 32-bit syscalls on a 64-bit kernel. */
  15. struct pt_regs32 {
  16. unsigned int gpr[32];
  17. unsigned int nip;
  18. unsigned int msr;
  19. unsigned int orig_gpr3; /* Used for restarting system calls */
  20. unsigned int ctr;
  21. unsigned int link;
  22. unsigned int xer;
  23. unsigned int ccr;
  24. unsigned int mq; /* 601 only (not used at present) */
  25. unsigned int trap; /* Reason for being here */
  26. unsigned int dar; /* Fault registers */
  27. unsigned int dsisr;
  28. unsigned int result; /* Result of a system call */
  29. };
  30. struct sigcontext32 {
  31. unsigned int _unused[4];
  32. int signal;
  33. compat_uptr_t handler;
  34. unsigned int oldmask;
  35. compat_uptr_t regs; /* 4 byte pointer to the pt_regs32 structure. */
  36. };
  37. struct mcontext32 {
  38. elf_gregset_t32 mc_gregs;
  39. elf_fpregset_t mc_fregs;
  40. unsigned int mc_pad[2];
  41. elf_vrregset_t32 mc_vregs __attribute__((__aligned__(16)));
  42. elf_vsrreghalf_t32 mc_vsregs __attribute__((__aligned__(16)));
  43. };
  44. struct ucontext32 {
  45. unsigned int uc_flags;
  46. unsigned int uc_link;
  47. compat_stack_t uc_stack;
  48. int uc_pad[7];
  49. compat_uptr_t uc_regs; /* points to uc_mcontext field */
  50. compat_sigset_t uc_sigmask; /* mask last for extensibility */
  51. /* glibc has 1024-bit signal masks, ours are 64-bit */
  52. int uc_maskext[30];
  53. int uc_pad2[3];
  54. struct mcontext32 uc_mcontext;
  55. };
  56. #endif /* _PPC64_PPC32_H */