Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 #ifndef _PPC64_PPC32_H
0003 #define _PPC64_PPC32_H
0004 
0005 #include <linux/compat.h>
0006 #include <asm/siginfo.h>
0007 #include <asm/signal.h>
0008 
0009 /*
0010  * Data types and macros for providing 32b PowerPC support.
0011  */
0012 
0013 /* These are here to support 32-bit syscalls on a 64-bit kernel. */
0014 
0015 struct pt_regs32 {
0016     unsigned int gpr[32];
0017     unsigned int nip;
0018     unsigned int msr;
0019     unsigned int orig_gpr3;     /* Used for restarting system calls */
0020     unsigned int ctr;
0021     unsigned int link;
0022     unsigned int xer;
0023     unsigned int ccr;
0024     unsigned int mq;        /* 601 only (not used at present) */
0025     unsigned int trap;      /* Reason for being here */
0026     unsigned int dar;       /* Fault registers */
0027     unsigned int dsisr;
0028     unsigned int result;        /* Result of a system call */
0029 };
0030 
0031 struct sigcontext32 {
0032     unsigned int    _unused[4];
0033     int     signal;
0034     compat_uptr_t   handler;
0035     unsigned int    oldmask;
0036     compat_uptr_t   regs;  /* 4 byte pointer to the pt_regs32 structure. */
0037 };
0038 
0039 struct mcontext32 {
0040     elf_gregset_t32     mc_gregs;
0041     elf_fpregset_t      mc_fregs;
0042     unsigned int        mc_pad[2];
0043     elf_vrregset_t32    mc_vregs __attribute__((__aligned__(16)));
0044     elf_vsrreghalf_t32      mc_vsregs __attribute__((__aligned__(16)));
0045 };
0046 
0047 struct ucontext32 { 
0048     unsigned int        uc_flags;
0049     unsigned int        uc_link;
0050     compat_stack_t      uc_stack;
0051     int         uc_pad[7];
0052     compat_uptr_t       uc_regs;    /* points to uc_mcontext field */
0053     compat_sigset_t     uc_sigmask; /* mask last for extensibility */
0054     /* glibc has 1024-bit signal masks, ours are 64-bit */
0055     int         uc_maskext[30];
0056     int         uc_pad2[3];
0057     struct mcontext32   uc_mcontext;
0058 };
0059 
0060 #endif  /* _PPC64_PPC32_H */