Training courses
Kernel and Embedded Linux
Bootlin training courses
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
/* $NetBSD: netbsd32_machdep.h,v 1.2.4.1 2021/01/01 12:58:35 martin Exp $ */ #ifndef _MACHINE_NETBSD32_H_ #define _MACHINE_NETBSD32_H_ #include <sys/ucontext.h> #include <compat/sys/ucontext.h> #include <compat/sys/siginfo.h> /* * arm ptrace constants * Please keep in sync with sys/arch/arm/include/ptrace.h. */ #define PT32_STEP (PT_FIRSTMACH + 0) /* Not implemented */ #define PT32_GETREGS (PT_FIRSTMACH + 1) #define PT32_SETREGS (PT_FIRSTMACH + 2) #define PT32_GETFPREGS (PT_FIRSTMACH + 5) #define PT32_SETFPREGS (PT_FIRSTMACH + 6) #define PT32_SETSTEP (PT_FIRSTMACH + 7) /* Not implemented */ #define PT32_CLEARSTEP (PT_FIRSTMACH + 8) /* Not implemented */ #define NETBSD32_POINTER_TYPE uint32_t typedef struct { NETBSD32_POINTER_TYPE i32; } netbsd32_pointer_t; /* earm has 64bit aligned 64bit integers */ #define NETBSD32_INT64_ALIGN __attribute__((__aligned__(8))) typedef netbsd32_pointer_t netbsd32_sigcontextp_t; struct netbsd32_sigcontext13 { int32_t sc_onstack; /* sigstack state to restore */ int32_t __sc_mask13; /* signal mask to restore (old style) */ uint32_t sc_spsr; uint32_t sc_r0; uint32_t sc_r1; uint32_t sc_r2; uint32_t sc_r3; uint32_t sc_r4; uint32_t sc_r5; uint32_t sc_r6; uint32_t sc_r7; uint32_t sc_r8; uint32_t sc_r9; uint32_t sc_r10; uint32_t sc_r11; uint32_t sc_r12; uint32_t sc_usr_sp; uint32_t sc_usr_lr; uint32_t sc_svc_lr; uint32_t sc_pc; }; struct netbsd32_sigcontext { int32_t sc_onstack; /* sigstack state to restore */ int32_t __sc_mask13; /* signal mask to restore (old style) */ uint32_t sc_spsr; uint32_t sc_r0; uint32_t sc_r1; uint32_t sc_r2; uint32_t sc_r3; uint32_t sc_r4; uint32_t sc_r5; uint32_t sc_r6; uint32_t sc_r7; uint32_t sc_r8; uint32_t sc_r9; uint32_t sc_r10; uint32_t sc_r11; uint32_t sc_r12; uint32_t sc_usr_sp; uint32_t sc_usr_lr; uint32_t sc_svc_lr; uint32_t sc_pc; sigset_t sc_mask; /* signal mask to restore (new style) */ }; struct netbsd32_sigframe_siginfo { siginfo32_t sf_si; ucontext32_t sf_uc; }; struct reg32 { uint32_t r[13]; uint32_t r_sp; uint32_t r_lr; uint32_t r_pc; uint32_t r_cpsr; }; struct vfpreg32 { uint32_t vfp_fpexc; uint32_t vfp_fpscr; uint32_t vfp_fpinst; uint32_t vfp_fpinst2; uint64_t vfp_regs[33]; /* In case we need fstmx format. */ }; struct fpreg32 { struct vfpreg32 fpr_vfp; }; /* same as cpustate in arm/arm/core_machdep.c */ struct netbsd32_cpustate { struct reg32 regs; struct fpreg32 fpregs; }; /* compat netbsd/arm sysarch(2) */ #define ARM_SYNC_ICACHE 0 #define ARM_DRAIN_WRITEBUF 1 #define ARM_VFP_FPSCR 2 #define ARM_FPU_USED 3 struct netbsd32_arm_sync_icache_args { uint32_t addr; /* Virtual start address */ uint32_t len; /* Region size */ }; /* Translate ptrace() PT_* request from 32-bit userland to kernel. */ int netbsd32_ptrace_translate_request(int); int netbsd32_process_read_regs(struct lwp *, struct reg32 *); int netbsd32_process_read_fpregs(struct lwp *, struct fpreg32 *, size_t *); int netbsd32_process_write_regs(struct lwp *, const struct reg32 *); int netbsd32_process_write_fpregs(struct lwp *, const struct fpreg32 *, size_t); #endif /* _MACHINE_NETBSD32_H_ */