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

Function dbg_enable_monitor

freebsd/arm/arm/debug_monitor.c:558–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558static int
559dbg_enable_monitor(void)
560{
561 uint32_t dbg_dscr;
562
563 /* Already enabled? Just return */
564 if (dbg_monitor_is_enabled())
565 return (0);
566
567 dbg_dscr = cp14_dbgdscrint_get();
568
569 switch (dbg_model) {
570 case ID_DFR0_CP_DEBUG_M_V6:
571 case ID_DFR0_CP_DEBUG_M_V6_1: /* fall through */
572 cp14_dbgdscr_v6_set(dbg_dscr | DBGSCR_MDBG_EN);
573 break;
574 case ID_DFR0_CP_DEBUG_M_V7: /* fall through */
575 case ID_DFR0_CP_DEBUG_M_V7_1:
576 cp14_dbgdscr_v7_set(dbg_dscr | DBGSCR_MDBG_EN);
577 break;
578 default:
579 break;
580 }
581 isb();
582
583 /* Verify that Monitor mode is set */
584 if (dbg_monitor_is_enabled())
585 return (0);
586
587 return (ENXIO);
588}
589
590static int
591dbg_setup_xpoint(struct dbg_wb_conf *conf)

Callers 3

dbg_reset_stateFunction · 0.85
dbg_monitor_initFunction · 0.85

Calls 1

dbg_monitor_is_enabledFunction · 0.85

Tested by

no test coverage detected