| 789 | } |
| 790 | |
| 791 | static __inline boolean_t |
| 792 | dbg_arch_supported(void) |
| 793 | { |
| 794 | uint32_t dbg_didr; |
| 795 | |
| 796 | switch (dbg_model) { |
| 797 | case ID_DFR0_CP_DEBUG_M_V6: |
| 798 | case ID_DFR0_CP_DEBUG_M_V6_1: |
| 799 | dbg_didr = cp14_dbgdidr_get(); |
| 800 | /* |
| 801 | * read-all-zeroes is used by QEMU |
| 802 | * to indicate that ARMv6 debug support |
| 803 | * is not implemented. Real hardware has at |
| 804 | * least version bits set |
| 805 | */ |
| 806 | if (dbg_didr == 0) |
| 807 | return (FALSE); |
| 808 | return (TRUE); |
| 809 | case ID_DFR0_CP_DEBUG_M_V7: |
| 810 | case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ |
| 811 | return (TRUE); |
| 812 | default: |
| 813 | /* We only support valid v6.x/v7.x modes through CP14 */ |
| 814 | return (FALSE); |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | static __inline uint32_t |
| 819 | dbg_get_wrp_num(void) |