18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2006 Atmark Techno, Inc.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
68c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive
78c2ecf20Sopenharmony_ci * for more details.
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_MICROBLAZE_PTRACE_H
118c2ecf20Sopenharmony_ci#define _UAPI_ASM_MICROBLAZE_PTRACE_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_citypedef unsigned long microblaze_reg_t;
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_cistruct pt_regs {
188c2ecf20Sopenharmony_ci	microblaze_reg_t r0;
198c2ecf20Sopenharmony_ci	microblaze_reg_t r1;
208c2ecf20Sopenharmony_ci	microblaze_reg_t r2;
218c2ecf20Sopenharmony_ci	microblaze_reg_t r3;
228c2ecf20Sopenharmony_ci	microblaze_reg_t r4;
238c2ecf20Sopenharmony_ci	microblaze_reg_t r5;
248c2ecf20Sopenharmony_ci	microblaze_reg_t r6;
258c2ecf20Sopenharmony_ci	microblaze_reg_t r7;
268c2ecf20Sopenharmony_ci	microblaze_reg_t r8;
278c2ecf20Sopenharmony_ci	microblaze_reg_t r9;
288c2ecf20Sopenharmony_ci	microblaze_reg_t r10;
298c2ecf20Sopenharmony_ci	microblaze_reg_t r11;
308c2ecf20Sopenharmony_ci	microblaze_reg_t r12;
318c2ecf20Sopenharmony_ci	microblaze_reg_t r13;
328c2ecf20Sopenharmony_ci	microblaze_reg_t r14;
338c2ecf20Sopenharmony_ci	microblaze_reg_t r15;
348c2ecf20Sopenharmony_ci	microblaze_reg_t r16;
358c2ecf20Sopenharmony_ci	microblaze_reg_t r17;
368c2ecf20Sopenharmony_ci	microblaze_reg_t r18;
378c2ecf20Sopenharmony_ci	microblaze_reg_t r19;
388c2ecf20Sopenharmony_ci	microblaze_reg_t r20;
398c2ecf20Sopenharmony_ci	microblaze_reg_t r21;
408c2ecf20Sopenharmony_ci	microblaze_reg_t r22;
418c2ecf20Sopenharmony_ci	microblaze_reg_t r23;
428c2ecf20Sopenharmony_ci	microblaze_reg_t r24;
438c2ecf20Sopenharmony_ci	microblaze_reg_t r25;
448c2ecf20Sopenharmony_ci	microblaze_reg_t r26;
458c2ecf20Sopenharmony_ci	microblaze_reg_t r27;
468c2ecf20Sopenharmony_ci	microblaze_reg_t r28;
478c2ecf20Sopenharmony_ci	microblaze_reg_t r29;
488c2ecf20Sopenharmony_ci	microblaze_reg_t r30;
498c2ecf20Sopenharmony_ci	microblaze_reg_t r31;
508c2ecf20Sopenharmony_ci	microblaze_reg_t pc;
518c2ecf20Sopenharmony_ci	microblaze_reg_t msr;
528c2ecf20Sopenharmony_ci	microblaze_reg_t ear;
538c2ecf20Sopenharmony_ci	microblaze_reg_t esr;
548c2ecf20Sopenharmony_ci	microblaze_reg_t fsr;
558c2ecf20Sopenharmony_ci	int pt_mode;
568c2ecf20Sopenharmony_ci};
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#ifndef __KERNEL__
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci/* pt_regs offsets used by gdbserver etc in ptrace syscalls */
618c2ecf20Sopenharmony_ci#define PT_GPR(n)	((n) * sizeof(microblaze_reg_t))
628c2ecf20Sopenharmony_ci#define PT_PC		(32 * sizeof(microblaze_reg_t))
638c2ecf20Sopenharmony_ci#define PT_MSR		(33 * sizeof(microblaze_reg_t))
648c2ecf20Sopenharmony_ci#define PT_EAR		(34 * sizeof(microblaze_reg_t))
658c2ecf20Sopenharmony_ci#define PT_ESR		(35 * sizeof(microblaze_reg_t))
668c2ecf20Sopenharmony_ci#define PT_FSR		(36 * sizeof(microblaze_reg_t))
678c2ecf20Sopenharmony_ci#define PT_KERNEL_MODE	(37 * sizeof(microblaze_reg_t))
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci#endif /* __KERNEL */
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci#endif /* __ASSEMBLY__ */
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_MICROBLAZE_PTRACE_H */
74