MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dbg_arch_supported

Function dbg_arch_supported

freebsd/arm/arm/debug_monitor.c:791–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789}
790
791static __inline boolean_t
792dbg_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
818static __inline uint32_t
819dbg_get_wrp_num(void)

Callers 1

dbg_monitor_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected