drm/ast: Only warn about unsupported TX chips on Gen4 and later
[drm/drm-misc.git] / arch / csky / include / asm / elf.h
blob48b83e283ed47287c9fedc251061e534d1092a30
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef __ASM_CSKY_ELF_H
4 #define __ASM_CSKY_ELF_H
6 #include <asm/ptrace.h>
7 #include <abi/regdef.h>
9 #define ELF_ARCH EM_CSKY
10 #define EM_CSKY_OLD 39
12 /* CSKY Relocations */
13 #define R_CSKY_NONE 0
14 #define R_CSKY_32 1
15 #define R_CSKY_PCIMM8BY4 2
16 #define R_CSKY_PCIMM11BY2 3
17 #define R_CSKY_PCIMM4BY2 4
18 #define R_CSKY_PC32 5
19 #define R_CSKY_PCRELJSR_IMM11BY2 6
20 #define R_CSKY_GNU_VTINHERIT 7
21 #define R_CSKY_GNU_VTENTRY 8
22 #define R_CSKY_RELATIVE 9
23 #define R_CSKY_COPY 10
24 #define R_CSKY_GLOB_DAT 11
25 #define R_CSKY_JUMP_SLOT 12
26 #define R_CSKY_ADDR_HI16 24
27 #define R_CSKY_ADDR_LO16 25
28 #define R_CSKY_PCRELJSR_IMM26BY2 40
30 typedef unsigned long elf_greg_t;
32 typedef struct user_fp elf_fpregset_t;
35 * In gdb/bfd elf32-csky.c, csky_elf_grok_prstatus() use fixed size of
36 * elf_prstatus. It's 148 for abiv1 and 220 for abiv2, the size is enough
37 * for coredump and no need full sizeof(struct pt_regs).
39 #define ELF_NGREG ((sizeof(struct pt_regs) / sizeof(elf_greg_t)) - 2)
41 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
44 * This is used to ensure we don't load something for the wrong architecture.
46 #define elf_check_arch(x) (((x)->e_machine == ELF_ARCH) || \
47 ((x)->e_machine == EM_CSKY_OLD))
50 * These are used to set parameters in the core dumps.
52 #define ELF_EXEC_PAGESIZE 4096
53 #define ELF_CLASS ELFCLASS32
54 #define ELF_PLAT_INIT(_r, load_addr) { _r->a0 = 0; }
56 #ifdef __cskyBE__
57 #define ELF_DATA ELFDATA2MSB
58 #else
59 #define ELF_DATA ELFDATA2LSB
60 #endif
63 * This is the location that an ET_DYN program is loaded if exec'ed. Typical
64 * use of this is to invoke "./ld.so someprog" to test out a new version of
65 * the loader. We need to make sure that it is out of the way of the program
66 * that it will "exec", and that there is sufficient room for the brk.
68 #define ELF_ET_DYN_BASE 0x0UL
69 #include <abi/elf.h>
71 /* Similar, but for a thread other than current. */
72 struct task_struct;
73 extern int dump_task_regs(struct task_struct *tsk, elf_gregset_t *elf_regs);
74 #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
76 #define ELF_HWCAP (0)
79 * This yields a string that ld.so will use to load implementation specific
80 * libraries for optimization. This is more specific in intent than poking
81 * at uname or /proc/cpuinfo.
83 #define ELF_PLATFORM (NULL)
84 #define SET_PERSONALITY(ex) set_personality(PER_LINUX)
86 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
87 struct linux_binprm;
88 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
89 int uses_interp);
90 #endif /* __ASM_CSKY_ELF_H */