/* SPDX-License-Identifier: GPL-2.0-or-later *//* * Copyright (C) 2009 by David Brownell *//* ... */#ifndefOPENOCD_TARGET_ARMV8_DPM_H#defineOPENOCD_TARGET_ARMV8_DPM_H#include"arm_dpm.h"#include"helper/bits.h"/* forward-declare struct armv8_common */structarmv8_common;/** * This wraps an implementation of DPM primitives. Each interface * provider supplies a structure like this, which is the glue between * upper level code and the lower level hardware access. * * It is a PRELIMINARY AND INCOMPLETE set of primitives, starting with * support for CPU register access. *//* ... */intarmv8_dpm_setup(structarm_dpm*dpm);intarmv8_dpm_initialize(structarm_dpm*dpm);intarmv8_dpm_read_current_registers(structarm_dpm*dpm);intarmv8_dpm_modeswitch(structarm_dpm*dpm,enumarm_modemode);intarmv8_dpm_write_dirty_registers(structarm_dpm*dpm,boolbpwp);/* DSCR bits; see ARMv7a arch spec section C10.3.1. * Not all v7 bits are valid in v6. *//* ... */#defineDSCR_DEBUG_STATUS_MASK(0x1F<<0)#defineDSCR_ERR(0x1<<6)#defineDSCR_SYS_ERROR_PEND(0x1<<7)#defineDSCR_CUR_EL(0x3<<8)#defineDSCR_EL_STATUS_MASK(0xF<<10)#defineDSCR_HDE(0x1<<14)#defineDSCR_SDD(0x1<<16)#defineDSCR_NON_SECURE(0x1<<18)#defineDSCR_MA(0x1<<20)#defineDSCR_TDA(0x1<<21)#defineDSCR_INTDIS_MASK(0x3<<22)#defineDSCR_ITE(0x1<<24)#defineDSCR_PIPE_ADVANCE(0x1<<25)#defineDSCR_TXU(0x1<<26)#defineDSCR_RTO(0x1<<27)/* bit 28 is reserved */#defineDSCR_ITO(0x1<<28)#defineDSCR_DTR_TX_FULL(0x1<<29)#defineDSCR_DTR_RX_FULL(0x1<<30)/* bit 31 is reserved *//* Methods of entry into debug mode */#defineDSCRV8_ENTRY_NON_DEBUG(0x2)#defineDSCRV8_ENTRY_RESTARTING(0x1)#defineDSCRV8_ENTRY_BKPT(0x7)#defineDSCRV8_ENTRY_EXT_DEBUG(0x13)#defineDSCRV8_ENTRY_HALT_STEP_NORMAL(0x1B)#defineDSCRV8_ENTRY_HALT_STEP_EXECLU(0x1F)#defineDSCRV8_ENTRY_OS_UNLOCK(0x23)#defineDSCRV8_ENTRY_RESET_CATCH(0x27)#defineDSCRV8_ENTRY_WATCHPOINT(0x2B)#defineDSCRV8_ENTRY_HLT(0x2F)#defineDSCRV8_ENTRY_SW_ACCESS_DBG(0x33)#defineDSCRV8_ENTRY_EXCEPTION_CATCH(0x37)#defineDSCRV8_ENTRY_HALT_STEP(0x3B)#defineDSCRV8_HALT_MASK(0x3C)/*DRCR registers*/#defineDRCR_CSE(1<<2)#defineDRCR_CSPA(1<<3)#defineDRCR_CBRRQ(1<<4)/* DTR modes */#defineDSCR_EXT_DCC_NON_BLOCKING(0x0<<20)#defineDSCR_EXT_DCC_STALL_MODE(0x1<<20)#defineDSCR_EXT_DCC_FAST_MODE(0x2<<20)/* bits 22, 23 are reserved *//* DRCR (debug run control register) bits */#defineDRCR_HALT(1<<0)#defineDRCR_RESTART(1<<1)#defineDRCR_CLEAR_EXCEPTIONS(1<<2)/* ECR (Execution Control Register) bits */#defineECR_RCEBIT(1)/* ESR (Event Status Register) bits */#defineESR_RCBIT(1)/* PRSR (processor debug status register) bits */#definePRSR_PU(1<<0)#definePRSR_SPD(1<<1)#definePRSR_RESET(1<<2)#definePRSR_SR(1<<3)#definePRSR_HALT(1<<4)#definePRSR_OSLK(1<<5)#definePRSR_DLK(1<<6)#definePRSR_EDAD(1<<7)#definePRSR_SDAD(1<<8)#definePRSR_EPMAD(1<<9)#definePRSR_SPMAD(1<<10)#definePRSR_SDR(1<<11)/* PRCR (processor debug control register) bits */#definePRCR_CORENPDRQ(1<<0)#definePRCR_CWRR(1<<2)#definePRCR_COREPURQ(1<<3)58 definesvoidarmv8_dpm_report_dscr(structarm_dpm*dpm,uint32_tdcsr);voidarmv8_dpm_handle_exception(structarm_dpm*dpm,booldo_restore);enumarm_statearmv8_dpm_get_core_state(structarm_dpm*dpm);/* ... */#endif/* OPENOCD_TARGET_ARM_DPM_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
Click anywhere in the source to view detailed information here...