aboutsummaryrefslogtreecommitdiff
path: root/linux-user/mips64
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/mips64')
-rw-r--r--linux-user/mips64/elfload.c1
-rw-r--r--linux-user/mips64/target_elf.h51
-rw-r--r--linux-user/mips64/target_ptrace.h16
-rw-r--r--linux-user/mips64/target_syscall.h16
4 files changed, 42 insertions, 42 deletions
diff --git a/linux-user/mips64/elfload.c b/linux-user/mips64/elfload.c
new file mode 100644
index 0000000..b719555
--- /dev/null
+++ b/linux-user/mips64/elfload.c
@@ -0,0 +1 @@
+#include "../mips/elfload.c"
diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index 502af9d..061471a 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -7,30 +7,29 @@
#ifndef MIPS64_TARGET_ELF_H
#define MIPS64_TARGET_ELF_H
-static inline const char *cpu_get_model(uint32_t eflags)
-{
- switch (eflags & EF_MIPS_MACH) {
- case EF_MIPS_MACH_OCTEON:
- case EF_MIPS_MACH_OCTEON2:
- case EF_MIPS_MACH_OCTEON3:
- return "Octeon68XX";
- case EF_MIPS_MACH_LS2E:
- return "Loongson-2E";
- case EF_MIPS_MACH_LS2F:
- return "Loongson-2F";
- case EF_MIPS_MACH_LS3A:
- return "Loongson-3A1000";
- default:
- break;
- }
- switch (eflags & EF_MIPS_ARCH) {
- case EF_MIPS_ARCH_64R6:
- return "I6400";
- case EF_MIPS_ARCH_64R2:
- return "MIPS64R2-generic";
- default:
- break;
- }
- return "5KEf";
-}
+
+#include "target_ptrace.h"
+
+#define ELF_CLASS ELFCLASS64
+#define ELF_MACHINE EM_MIPS
+#define EXSTACK_DEFAULT true
+
+#ifdef TARGET_ABI_MIPSN32
+#define elf_check_abi(x) ((x) & EF_MIPS_ABI2)
+#else
+#define elf_check_abi(x) (!((x) & EF_MIPS_ABI2))
+#endif
+
+#define HAVE_ELF_HWCAP 1
+#define HAVE_ELF_BASE_PLATFORM 1
+#define HAVE_ELF_CORE_DUMP 1
+
+/* See linux kernel: arch/mips/include/asm/elf.h. */
+typedef struct target_elf_gregset_t {
+ union {
+ target_ulong reserved[45];
+ struct target_pt_regs pt;
+ };
+} target_elf_gregset_t;
+
#endif
diff --git a/linux-user/mips64/target_ptrace.h b/linux-user/mips64/target_ptrace.h
new file mode 100644
index 0000000..41f0bf6
--- /dev/null
+++ b/linux-user/mips64/target_ptrace.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef MIPS64_TARGET_PTRACE_H
+#define MIPS64_TARGET_PTRACE_H
+
+struct target_pt_regs {
+ target_ulong regs[32];
+ target_ulong lo;
+ target_ulong hi;
+ target_ulong cp0_epc;
+ target_ulong cp0_badvaddr;
+ target_ulong cp0_status;
+ target_ulong cp0_cause;
+};
+
+#endif /* MIPS64_TARGET_PTRACE_H */
diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h
index 358dc2d..9135bf5 100644
--- a/linux-user/mips64/target_syscall.h
+++ b/linux-user/mips64/target_syscall.h
@@ -1,22 +1,6 @@
#ifndef MIPS64_TARGET_SYSCALL_H
#define MIPS64_TARGET_SYSCALL_H
-/* this struct defines the way the registers are stored on the
- stack during a system call. */
-
-struct target_pt_regs {
- /* Saved main processor registers. */
- target_ulong regs[32];
-
- /* Saved special registers. */
- target_ulong cp0_status;
- target_ulong lo;
- target_ulong hi;
- target_ulong cp0_badvaddr;
- target_ulong cp0_cause;
- target_ulong cp0_epc;
-};
-
#define UNAME_MACHINE "mips64"
#define UNAME_MINIMUM_RELEASE "2.6.32"