Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146660222
D30975.id91603.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D30975.id91603.diff
View Options
Index: sys/arm64/linux/linux.h
===================================================================
--- sys/arm64/linux/linux.h
+++ sys/arm64/linux/linux.h
@@ -298,4 +298,16 @@
l_uintptr_t pending_list;
};
+struct linux_pt_regset {
+ l_ulong x[31];
+ l_ulong sp;
+ l_ulong pc;
+ l_ulong cpsr;
+};
+
+struct reg;
+
+void bsd_to_linux_regset(struct reg *b_reg,
+ struct linux_pt_regset *l_regset);
+
#endif /* _ARM64_LINUX_H_ */
Index: sys/arm64/linux/linux_machdep.c
===================================================================
--- sys/arm64/linux/linux_machdep.c
+++ sys/arm64/linux/linux_machdep.c
@@ -40,6 +40,8 @@
#include <security/audit/audit.h>
+#include <machine/reg.h>
+
#include <arm64/linux/linux.h>
#include <arm64/linux/linux_proto.h>
#include <compat/linux/linux_dtrace.h>
@@ -149,3 +151,17 @@
return (cpu_set_user_tls(td, desc));
}
+
+void
+bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset)
+{
+
+ KASSERT(sizeof(l_regset->x) == sizeof(b_reg->x) + sizeof(l_ulong),
+ ("%s: size mismatch\n", __func__));
+ memcpy(l_regset->x, b_reg->x, sizeof(b_reg->x));
+
+ l_regset->x[30] = b_reg->lr;
+ l_regset->sp = b_reg->sp;
+ l_regset->pc = b_reg->elr;
+ l_regset->cpsr = b_reg->spsr;
+}
Index: sys/arm64/linux/linux_sysvec.c
===================================================================
--- sys/arm64/linux/linux_sysvec.c
+++ sys/arm64/linux/linux_sysvec.c
@@ -417,8 +417,8 @@
.sv_name = "Linux ELF64",
.sv_coredump = elf64_coredump,
.sv_elf_core_osabi = ELFOSABI_NONE,
- .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
- .sv_elf_core_prepare_notes = elf64_prepare_notes,
+ .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR,
+ .sv_elf_core_prepare_notes = linux64_prepare_notes,
.sv_imgact_try = linux_exec_imgact_try,
.sv_minsigstksz = LINUX_MINSIGSTKSZ,
.sv_minuser = VM_MIN_ADDRESS,
Index: sys/modules/linux64/Makefile
===================================================================
--- sys/modules/linux64/Makefile
+++ sys/modules/linux64/Makefile
@@ -8,8 +8,8 @@
VDSO= linux_vdso
KMOD= linux64
-SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \
- linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \
+SRCS= linux_elf64.c linux_fork.c linux_dummy_machdep.c linux_file.c \
+ linux_event.c linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \
linux_machdep.c linux_misc.c linux_ptrace.c linux_signal.c \
linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \
linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \
@@ -18,7 +18,6 @@
linux_support.s
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= linux_dummy_x86.c
-SRCS+= linux_elf64.c
.endif
DPSRCS= assym.inc linux_genassym.c
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 12:21 PM (16 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29268148
Default Alt Text
D30975.id91603.diff (2 KB)
Attached To
Mode
D30975: linux(4): implement coredumps on arm64
Attached
Detach File
Event Timeline
Log In to Comment