| .. | .. |
|---|
| 15 | 15 | |
|---|
| 16 | 16 | #include <asm/ptrace.h> |
|---|
| 17 | 17 | #include <asm/coprocessor.h> |
|---|
| 18 | +#include <linux/elf-em.h> |
|---|
| 18 | 19 | |
|---|
| 19 | 20 | /* Xtensa processor ELF architecture-magic number */ |
|---|
| 20 | 21 | |
|---|
| 21 | | -#define EM_XTENSA 94 |
|---|
| 22 | 22 | #define EM_XTENSA_OLD 0xABC7 |
|---|
| 23 | 23 | |
|---|
| 24 | 24 | /* Xtensa relocations defined by the ABIs */ |
|---|
| .. | .. |
|---|
| 75 | 75 | |
|---|
| 76 | 76 | typedef unsigned long elf_greg_t; |
|---|
| 77 | 77 | |
|---|
| 78 | | -typedef struct { |
|---|
| 79 | | - elf_greg_t pc; |
|---|
| 80 | | - elf_greg_t ps; |
|---|
| 81 | | - elf_greg_t lbeg; |
|---|
| 82 | | - elf_greg_t lend; |
|---|
| 83 | | - elf_greg_t lcount; |
|---|
| 84 | | - elf_greg_t sar; |
|---|
| 85 | | - elf_greg_t windowstart; |
|---|
| 86 | | - elf_greg_t windowbase; |
|---|
| 87 | | - elf_greg_t threadptr; |
|---|
| 88 | | - elf_greg_t reserved[7+48]; |
|---|
| 89 | | - elf_greg_t a[64]; |
|---|
| 90 | | -} xtensa_gregset_t; |
|---|
| 78 | +typedef struct user_pt_regs xtensa_gregset_t; |
|---|
| 91 | 79 | |
|---|
| 92 | 80 | #define ELF_NGREG (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t)) |
|---|
| 93 | 81 | |
|---|
| .. | .. |
|---|
| 97 | 85 | |
|---|
| 98 | 86 | typedef unsigned int elf_fpreg_t; |
|---|
| 99 | 87 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; |
|---|
| 100 | | - |
|---|
| 101 | | -#define ELF_CORE_COPY_REGS(_eregs, _pregs) \ |
|---|
| 102 | | - xtensa_elf_core_copy_regs ((xtensa_gregset_t*)&(_eregs), _pregs); |
|---|
| 103 | | - |
|---|
| 104 | | -extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); |
|---|
| 105 | 88 | |
|---|
| 106 | 89 | /* |
|---|
| 107 | 90 | * This is used to ensure we don't load something for the wrong architecture. |
|---|
| .. | .. |
|---|
| 126 | 109 | #define ELF_ARCH EM_XTENSA |
|---|
| 127 | 110 | |
|---|
| 128 | 111 | #define ELF_EXEC_PAGESIZE PAGE_SIZE |
|---|
| 112 | +#define CORE_DUMP_USE_REGSET |
|---|
| 129 | 113 | |
|---|
| 130 | 114 | /* |
|---|
| 131 | 115 | * This is the location that an ET_DYN program is loaded if exec'ed. Typical |
|---|
| .. | .. |
|---|
| 192 | 176 | |
|---|
| 193 | 177 | #define SET_PERSONALITY(ex) \ |
|---|
| 194 | 178 | set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK))) |
|---|
| 195 | | - |
|---|
| 196 | | -struct task_struct; |
|---|
| 197 | | - |
|---|
| 198 | | -extern void do_copy_regs (xtensa_gregset_t*, struct pt_regs*, |
|---|
| 199 | | - struct task_struct*); |
|---|
| 200 | | -extern void do_restore_regs (xtensa_gregset_t*, struct pt_regs*, |
|---|
| 201 | | - struct task_struct*); |
|---|
| 202 | | -extern void do_save_fpregs (elf_fpregset_t*, struct pt_regs*, |
|---|
| 203 | | - struct task_struct*); |
|---|
| 204 | | -extern int do_restore_fpregs (elf_fpregset_t*, struct pt_regs*, |
|---|
| 205 | | - struct task_struct*); |
|---|
| 206 | 179 | |
|---|
| 207 | 180 | #endif /* _XTENSA_ELF_H */ |
|---|