View | Details | Raw Unified | Return to bug 267361
Collapse All | Expand All

(-)b/sys/arm64/arm64/freebsd32_machdep.c (-6 / +2 lines)
Lines 57-66 extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); Link Here
57
 */
57
 */
58
#define UC32_COPY_SIZE  offsetof(ucontext32_t, uc_link)
58
#define UC32_COPY_SIZE  offsetof(ucontext32_t, uc_link)
59
59
60
#ifdef VFP
61
static void get_fpcontext32(struct thread *td, mcontext32_vfp_t *);
62
#endif
63
64
/*
60
/*
65
 * Stubs for machine dependent 32-bits system calls.
61
 * Stubs for machine dependent 32-bits system calls.
66
 */
62
 */
Lines 123-129 freebsd32_sysarch(struct thread *td, struct freebsd32_sysarch_args *uap) Link Here
123
}
119
}
124
120
125
#ifdef VFP
121
#ifdef VFP
126
static void
122
void
127
get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp)
123
get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp)
128
{
124
{
129
	struct pcb *curpcb;
125
	struct pcb *curpcb;
Lines 151-157 get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) Link Here
151
 critical_exit();
147
 critical_exit();
152
}
148
}
153
149
154
static void
150
void
155
set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp)
151
set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp)
156
{
152
{
157
	struct pcb *pcb;
153
	struct pcb *pcb;
(-)b/sys/arm64/arm64/ptrace_machdep.c (+30 lines)
Lines 47-52 __FBSDID("$FreeBSD$"); Link Here
47
47
48
#include <machine/armreg.h>
48
#include <machine/armreg.h>
49
49
50
/* Only used to get/set 32bits VFP regs */
51
int
52
cpu_ptrace(struct thread *td, int req, void *arg, int data)
53
{
54
#if defined(VFP) && defined(COMPAT_FREEBSD32)
55
	mcontext32_vfp_t vfp;
56
	int error;
57
58
	if (!SV_CURPROC_FLAG(SV_ILP32))
59
		return (EINVAL);
60
	switch (req) {
61
		case PT_GETVFPREGS32:
62
			get_fpcontext32(td, &vfp);
63
			error = copyout(&vfp, arg, sizeof(vfp));
64
			break;
65
		case PT_SETVFPREGS32:
66
			error = copyin(arg, &vfp, sizeof(vfp));
67
			if (error == 0)
68
				set_fpcontext32(td, &vfp);
69
			break;
70
		default:
71
			error = EINVAL;
72
	}
73
74
	return (error);
75
#else
76
	return (EINVAL);
77
#endif
78
}
79
50
int
80
int
51
ptrace_set_pc(struct thread *td, u_long addr)
81
ptrace_set_pc(struct thread *td, u_long addr)
52
{
82
{
(-)b/sys/arm64/include/ptrace.h (+10 lines)
Line 1 Link Here
1
/* $FreeBSD$ */
1
/* $FreeBSD$ */
2
3
#ifndef _MACHINE_PTRACE_H_
4
#define _MACHINE_PTRACE_H_
5
6
#define __HAVE_PTRACE_MACHDEP
7
8
#define PT_GETVFPREGS32	(PT_FIRSTMACH + 0)
9
#define PT_SETVFPREGS32	(PT_FIRSTMACH + 1)
10
11
#endif /* _MACHINE_PTRACE_H_ */
(-)b/sys/arm64/include/vfp.h (-1 / +5 lines)
Lines 97-100 int is_fpu_kern_thread(u_int); Link Here
97
97
98
#endif
98
#endif
99
99
100
#ifdef COMPAT_FREEBSD32
101
void get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp);
102
void set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp);
103
#endif
104
100
#endif /* !_MACHINE_VFP_H_ */
105
#endif /* !_MACHINE_VFP_H_ */
101
- 

Return to bug 267361