^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifdef __KERNEL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #ifndef __MICROBLAZE_KGDB_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #define __MICROBLAZE_KGDB_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef __ASSEMBLY__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define CACHE_FLUSH_IS_SAFE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define BUFMAX 2048
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * 32 32-bit general purpose registers (r0-r31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * 6 32-bit special registers (pc, msr, ear, esr, fsr, btr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * 12 32-bit PVR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * 7 32-bit MMU Regs (redr, rpid, rzpr, rtlbx, rtlbsx, rtlblo, rtlbhi)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * 57 registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define NUMREGBYTES (57 * 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define BREAK_INSTR_SIZE 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) static inline void arch_kgdb_breakpoint(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) __asm__ __volatile__("brki r16, 0x18;");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct pt_regs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) asmlinkage void microblaze_kgdb_break(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #endif /* __ASSEMBLY__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #endif /* __MICROBLAZE_KGDB_H__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #endif /* __KERNEL__ */