| 556 | } |
| 557 | |
| 558 | static int |
| 559 | dbg_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 | |
| 590 | static int |
| 591 | dbg_setup_xpoint(struct dbg_wb_conf *conf) |
no test coverage detected