/* * This file is auto-generated by running 'make debug_defines.h' in * https://github.com/riscv/riscv-debug-spec/ (d749752) *//* ... */#defineDTM_IDCODE0x01/* * Identifies the release version of this part. *//* ... */#defineDTM_IDCODE_VERSION_OFFSET0x1c#defineDTM_IDCODE_VERSION_LENGTH4#defineDTM_IDCODE_VERSION0xf0000000U/* * Identifies the designer's part number of this part. *//* ... */#defineDTM_IDCODE_PARTNUMBER_OFFSET0xc#defineDTM_IDCODE_PARTNUMBER_LENGTH0x10#defineDTM_IDCODE_PARTNUMBER0xffff000/* * Identifies the designer/manufacturer of this part. Bits 6:0 must be * bits 6:0 of the designer/manufacturer's Identification Code as * assigned by JEDEC Standard JEP106. Bits 10:7 contain the modulo-16 * count of the number of continuation characters (0x7f) in that same * Identification Code. *//* ... */#defineDTM_IDCODE_MANUFID_OFFSET1#defineDTM_IDCODE_MANUFID_LENGTH0xb#defineDTM_IDCODE_MANUFID0xffe#defineDTM_IDCODE_1_OFFSET0#defineDTM_IDCODE_1_LENGTH1#defineDTM_IDCODE_11#defineDTM_DTMCS0x10/* * Writing 1 to this bit does a hard reset of the DTM, * causing the DTM to forget about any outstanding DMI transactions, and * returning all registers and internal state to their reset value. * In general this should only be used when the Debugger has * reason to expect that the outstanding DMI transaction will never * complete (e.g. a reset condition caused an inflight DMI transaction to * be cancelled). *//* ... */#defineDTM_DTMCS_DMIHARDRESET_OFFSET0x11#defineDTM_DTMCS_DMIHARDRESET_LENGTH1#defineDTM_DTMCS_DMIHARDRESET0x20000/* * Writing 1 to this bit clears the sticky error state, but does * not affect outstanding DMI transactions. *//* ... */#defineDTM_DTMCS_DMIRESET_OFFSET0x10#defineDTM_DTMCS_DMIRESET_LENGTH1#defineDTM_DTMCS_DMIRESET0x10000/* * This is a hint to the debugger of the minimum number of * cycles a debugger should spend in * Run-Test/Idle after every DMI scan to avoid a `busy' * return code (\FdtmDtmcsDmistat of 3). A debugger must still * check \FdtmDtmcsDmistat when necessary. * * 0: It is not necessary to enter Run-Test/Idle at all. * * 1: Enter Run-Test/Idle and leave it immediately. * * 2: Enter Run-Test/Idle and stay there for 1 cycle before leaving. * * And so on. *//* ... */#defineDTM_DTMCS_IDLE_OFFSET0xc#defineDTM_DTMCS_IDLE_LENGTH3#defineDTM_DTMCS_IDLE0x7000/* * Read-only alias of \FdtmDmiOp. *//* ... */#defineDTM_DTMCS_DMISTAT_OFFSET0xa#defineDTM_DTMCS_DMISTAT_LENGTH2#defineDTM_DTMCS_DMISTAT0xc00/* * The size of \FdmSbaddressZeroAddress in \RdtmDmi. *//* ... */#defineDTM_DTMCS_ABITS_OFFSET4#defineDTM_DTMCS_ABITS_LENGTH6#defineDTM_DTMCS_ABITS0x3f0#defineDTM_DTMCS_VERSION_OFFSET0#defineDTM_DTMCS_VERSION_LENGTH4#defineDTM_DTMCS_VERSION0xf/* * 0.11: Version described in spec version 0.11. *//* ... */#defineDTM_DTMCS_VERSION_0_110/* * 1.0: Version described in spec versions 0.13 and 1.0. *//* ... */#defineDTM_DTMCS_VERSION_1_01/* * custom: Version not described in any available version of this spec. *//* ... */#defineDTM_DTMCS_VERSION_CUSTOM15#defineDTM_DMI0x11/* * Address used for DMI access. In Update-DR this value is used * to access the DM over the DMI. *//* ... */#defineDTM_DMI_ADDRESS_OFFSET0x22#defineDTM_DMI_ADDRESS_LENGTH(abits)abits#defineDTM_DMI_ADDRESS(abits)((0x400000000ULL*(1ULL<<abits))+-0x400000000ULL)/* * The data to send to the DM over the DMI during Update-DR, and * the data returned from the DM as a result of the previous operation. *//* ... */#defineDTM_DMI_DATA_OFFSET2#defineDTM_DMI_DATA_LENGTH0x20#defineDTM_DMI_DATA0x3fffffffcULL/* * When the debugger writes this field, it has the following meaning: *//* ... */#defineDTM_DMI_OP_OFFSET0#defineDTM_DMI_OP_LENGTH2#defineDTM_DMI_OP3/* * nop: Ignore \FdmSbdataZeroData and \FdmSbaddressZeroAddress. * * Don't send anything over the DMI during Update-DR. * This operation should never result in a busy or error response. * The address and data reported in the following Capture-DR * are undefined. *//* ... */#defineDTM_DMI_OP_NOP0/* * read: Read from \FdmSbaddressZeroAddress. *//* ... */#defineDTM_DMI_OP_READ1/* * write: Write \FdmSbdataZeroData to \FdmSbaddressZeroAddress. *//* ... */#defineDTM_DMI_OP_WRITE2/* * reserved: Reserved. *//* ... *//* * When the debugger reads this field, it means the following: *//* ... *//* * success: The previous operation completed successfully. *//* ... */#defineDTM_DMI_OP_SUCCESS0/* * reserved: Reserved. *//* ... *//* * failed: A previous operation failed. The data scanned into \RdtmDmi in * this access will be ignored. This status is sticky and can be * cleared by writing \FdtmDtmcsDmireset in \RdtmDtmcs. * * This indicates that the DM itself responded with an error. * There are no specified cases in which the DM would * respond with an error, and DMI is not required to support * returning errors. *//* ... */#defineDTM_DMI_OP_FAILED2/* * busy: An operation was attempted while a DMI request is still in * progress. The data scanned into \RdtmDmi in this access will be * ignored. This status is sticky and can be cleared by writing * \FdtmDtmcsDmireset in \RdtmDtmcs. If a debugger sees this status, it * needs to give the target more TCK edges between Update-DR and * Capture-DR. The simplest way to do that is to add extra transitions * in Run-Test/Idle. *//* ... */#defineDTM_DMI_OP_BUSY3#defineCSR_DCSR0x7b0#defineCSR_DCSR_DEBUGVER_OFFSET0x1c#defineCSR_DCSR_DEBUGVER_LENGTH4#defineCSR_DCSR_DEBUGVER0xf0000000U/* * none: There is no debug support. *//* ... */#defineCSR_DCSR_DEBUGVER_NONE0/* * 1.0: Debug support exists as it is described in this document. *//* ... */#defineCSR_DCSR_DEBUGVER_1_04/* * custom: There is debug support, but it does not conform to any * available version of this spec. *//* ... */#defineCSR_DCSR_DEBUGVER_CUSTOM15#defineCSR_DCSR_EBREAKVS_OFFSET0x11#defineCSR_DCSR_EBREAKVS_LENGTH1#defineCSR_DCSR_EBREAKVS0x20000/* * exception: {\tt ebreak} instructions in VS-mode behave as described in the * Privileged Spec. *//* ... */#defineCSR_DCSR_EBREAKVS_EXCEPTION0/* * debug mode: {\tt ebreak} instructions in VS-mode enter Debug Mode. *//* ... */#defineCSR_DCSR_EBREAKVS_DEBUG_MODE1/* * This bit is hardwired to 0 if the hart does not support virtualization mode. *//* ... */#defineCSR_DCSR_EBREAKVU_OFFSET0x10#defineCSR_DCSR_EBREAKVU_LENGTH1#defineCSR_DCSR_EBREAKVU0x10000/* * exception: {\tt ebreak} instructions in VU-mode behave as described in the * Privileged Spec. *//* ... */#defineCSR_DCSR_EBREAKVU_EXCEPTION0/* * debug mode: {\tt ebreak} instructions in VU-mode enter Debug Mode. *//* ... */#defineCSR_DCSR_EBREAKVU_DEBUG_MODE1/* * This bit is hardwired to 0 if the hart does not support virtualization mode. *//* ... */#defineCSR_DCSR_EBREAKM_OFFSET0xf#defineCSR_DCSR_EBREAKM_LENGTH1#defineCSR_DCSR_EBREAKM0x8000/* * exception: {\tt ebreak} instructions in M-mode behave as described in the * Privileged Spec. *//* ... */#defineCSR_DCSR_EBREAKM_EXCEPTION0/* * debug mode: {\tt ebreak} instructions in M-mode enter Debug Mode. *//* ... */#defineCSR_DCSR_EBREAKM_DEBUG_MODE1#defineCSR_DCSR_EBREAKS_OFFSET0xd#defineCSR_DCSR_EBREAKS_LENGTH1#defineCSR_DCSR_EBREAKS0x2000/* * exception: {\tt ebreak} instructions in S-mode behave as described in the * Privileged Spec. *//* ... */#defineCSR_DCSR_EBREAKS_EXCEPTION0/* * debug mode: {\tt ebreak} instructions in S-mode enter Debug Mode. *//* ... */#defineCSR_DCSR_EBREAKS_DEBUG_MODE1/* * This bit is hardwired to 0 if the hart does not support S-mode. *//* ... */#defineCSR_DCSR_EBREAKU_OFFSET0xc#defineCSR_DCSR_EBREAKU_LENGTH1#defineCSR_DCSR_EBREAKU0x1000/* * exception: {\tt ebreak} instructions in U-mode behave as described in the * Privileged Spec. *//* ... */#defineCSR_DCSR_EBREAKU_EXCEPTION0/* * debug mode: {\tt ebreak} instructions in U-mode enter Debug Mode. *//* ... */#defineCSR_DCSR_EBREAKU_DEBUG_MODE1/* * This bit is hardwired to 0 if the hart does not support U-mode. *//* ... */#defineCSR_DCSR_STEPIE_OFFSET0xb#defineCSR_DCSR_STEPIE_LENGTH1#defineCSR_DCSR_STEPIE0x800/* * interrupts disabled: Interrupts (including NMI) are disabled during single stepping. *//* ... */#defineCSR_DCSR_STEPIE_INTERRUPTS_DISABLED0/* * interrupts enabled: Interrupts (including NMI) are enabled during single stepping. *//* ... */#defineCSR_DCSR_STEPIE_INTERRUPTS_ENABLED1/* * Implementations may hard wire this bit to 0. * In that case interrupt behavior can be emulated by the debugger. * * The debugger must not change the value of this bit while the hart * is running. *//* ... */#defineCSR_DCSR_STOPCOUNT_OFFSET0xa#defineCSR_DCSR_STOPCOUNT_LENGTH1#defineCSR_DCSR_STOPCOUNT0x400/* * normal: Increment counters as usual. *//* ... */#defineCSR_DCSR_STOPCOUNT_NORMAL0/* * freeze: Don't increment any hart-local counters while in Debug Mode or * on {\tt ebreak} instructions that cause entry into Debug Mode. * These counters include the {\tt instret} CSR. On single-hart cores * {\tt cycle} should be stopped, but on multi-hart cores it must keep * incrementing. *//* ... */#defineCSR_DCSR_STOPCOUNT_FREEZE1/* * An implementation may hardwire this bit to 0 or 1. *//* ... */#defineCSR_DCSR_STOPTIME_OFFSET9#defineCSR_DCSR_STOPTIME_LENGTH1#defineCSR_DCSR_STOPTIME0x200/* * normal: Increment \Rtime as usual. *//* ... */#defineCSR_DCSR_STOPTIME_NORMAL0/* * freeze: Don't increment \Rtime while in Debug Mode. If all harts * have \FcsrDcsrStoptime=1 and are in Debug Mode then \Rmtime * is also allowed to stop incrementing. *//* ... */#defineCSR_DCSR_STOPTIME_FREEZE1/* * An implementation may hardwire this bit to 0 or 1. *//* ... *//* * Explains why Debug Mode was entered. * * When there are multiple reasons to enter Debug Mode in a single * cycle, hardware should set \FcsrDcsrCause to the cause with the highest * priority. See table~\ref{tab:dcsrcausepriority} for priorities. *//* ... */#defineCSR_DCSR_CAUSE_OFFSET6#defineCSR_DCSR_CAUSE_LENGTH3#defineCSR_DCSR_CAUSE0x1c0/* * ebreak: An {\tt ebreak} instruction was executed. *//* ... */#defineCSR_DCSR_CAUSE_EBREAK1/* * trigger: A Trigger Module trigger fired with action=1. *//* ... */#defineCSR_DCSR_CAUSE_TRIGGER2/* * haltreq: The debugger requested entry to Debug Mode using \FdmDmcontrolHaltreq. *//* ... */#defineCSR_DCSR_CAUSE_HALTREQ3/* * step: The hart single stepped because \FcsrDcsrStep was set. *//* ... */#defineCSR_DCSR_CAUSE_STEP4/* * resethaltreq: The hart halted directly out of reset due to \Fresethaltreq. It * is also acceptable to report 3 when this happens. *//* ... */#defineCSR_DCSR_CAUSE_RESETHALTREQ5/* * group: The hart halted because it's part of a halt group. * Harts may report 3 for this cause instead. *//* ... */#defineCSR_DCSR_CAUSE_GROUP6/* * Other values are reserved for future use. *//* ... *//* * Extends the prv field with the virtualization mode the hart was operating * in when Debug Mode was entered. The encoding is described in Table * \ref{tab:privmode}. * A debugger can change this value to change the hart's virtualization mode * when exiting Debug Mode. * This bit is hardwired to 0 on harts that do not support virtualization mode. *//* ... */#defineCSR_DCSR_V_OFFSET5#defineCSR_DCSR_V_LENGTH1#defineCSR_DCSR_V0x20#defineCSR_DCSR_MPRVEN_OFFSET4#defineCSR_DCSR_MPRVEN_LENGTH1#defineCSR_DCSR_MPRVEN0x10/* * disabled: \FcsrMstatusMprv in \Rmstatus is ignored in Debug Mode. *//* ... */#defineCSR_DCSR_MPRVEN_DISABLED0/* * enabled: \FcsrMstatusMprv in \Rmstatus takes effect in Debug Mode. *//* ... */#defineCSR_DCSR_MPRVEN_ENABLED1/* * Implementing this bit is optional. It may be tied to either 0 or 1. *//* ... *//* * When set, there is a Non-Maskable-Interrupt (NMI) pending for the hart. * * Since an NMI can indicate a hardware error condition, * reliable debugging may no longer be possible once this bit becomes set. * This is implementation-dependent. *//* ... */#defineCSR_DCSR_NMIP_OFFSET3#defineCSR_DCSR_NMIP_LENGTH1#defineCSR_DCSR_NMIP8/* * When set and not in Debug Mode, the hart will only execute a single * instruction and then enter Debug Mode. See Section~\ref{stepBit} * for details. * * The debugger must not change the value of this bit while the hart * is running. *//* ... */#defineCSR_DCSR_STEP_OFFSET2#defineCSR_DCSR_STEP_LENGTH1#defineCSR_DCSR_STEP4/* * Contains the privilege mode the hart was operating in when Debug * Mode was entered. The encoding is described in Table * \ref{tab:privmode}. A debugger can change this value to change * the hart's privilege mode when exiting Debug Mode. * * Not all privilege modes are supported on all harts. If the * encoding written is not supported or the debugger is not allowed to * change to it, the hart may change to any supported privilege mode. *//* ... */#defineCSR_DCSR_PRV_OFFSET0#defineCSR_DCSR_PRV_LENGTH2#defineCSR_DCSR_PRV3#defineCSR_DPC0x7b1#defineCSR_DPC_DPC_OFFSET0#defineCSR_DPC_DPC_LENGTH(DXLEN)DXLEN#defineCSR_DPC_DPC(DXLEN)((1ULL<<DXLEN)+-1)#defineCSR_DSCRATCH00x7b2#defineCSR_DSCRATCH10x7b3#defineCSR_TSELECT0x7a0#defineCSR_TSELECT_INDEX_OFFSET0#defineCSR_TSELECT_INDEX_LENGTH(XLEN)XLEN#defineCSR_TSELECT_INDEX(XLEN)((1ULL<<XLEN)+-1)#defineCSR_TDATA10x7a1#defineCSR_TDATA1_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_TDATA1_TYPE_LENGTH4#defineCSR_TDATA1_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))/* * none: There is no trigger at this \RcsrTselect. *//* ... */#defineCSR_TDATA1_TYPE_NONE0/* * legacy: The trigger is a legacy SiFive address match trigger. These * should not be implemented and aren't further documented here. *//* ... */#defineCSR_TDATA1_TYPE_LEGACY1/* * mcontrol: The trigger is an address/data match trigger. The remaining bits * in this register act as described in \RcsrMcontrol. *//* ... */#defineCSR_TDATA1_TYPE_MCONTROL2/* * icount: The trigger is an instruction count trigger. The remaining bits * in this register act as described in \RcsrIcount. *//* ... */#defineCSR_TDATA1_TYPE_ICOUNT3/* * itrigger: The trigger is an interrupt trigger. The remaining bits * in this register act as described in \RcsrItrigger. *//* ... */#defineCSR_TDATA1_TYPE_ITRIGGER4/* * etrigger: The trigger is an exception trigger. The remaining bits * in this register act as described in \RcsrEtrigger. *//* ... */#defineCSR_TDATA1_TYPE_ETRIGGER5/* * mcontrol6: The trigger is an address/data match trigger. The remaining bits * in this register act as described in \RcsrMcontrolSix. This is similar * to a type 2 trigger, but provides additional functionality and * should be used instead of type 2 in newer implementations. *//* ... */#defineCSR_TDATA1_TYPE_MCONTROL66/* * tmexttrigger: The trigger is a trigger source external to the TM. The * remaining bits in this register act as described in \RcsrTmexttrigger. *//* ... */#defineCSR_TDATA1_TYPE_TMEXTTRIGGER7/* * custom: These trigger types are available for non-standard use. *//* ... */#defineCSR_TDATA1_TYPE_CUSTOM_LOW12#defineCSR_TDATA1_TYPE_CUSTOM_HIGH14/* * disabled: This trigger is disabled. In this state, \RcsrTdataTwo and * \RcsrTdataThree can be written with any value that is supported for * any of the types this trigger implements. The remaining bits in this * register are ignored. *//* ... */#defineCSR_TDATA1_TYPE_DISABLED15/* * Other values are reserved for future use. *//* ... *//* * If \FcsrTdataOneType is 0, then this bit is hard-wired to 0. *//* ... */#defineCSR_TDATA1_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_TDATA1_DMODE_LENGTH1#defineCSR_TDATA1_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * both: Both Debug and M-mode can write the {\tt tdata} registers at the * selected \RcsrTselect. *//* ... */#defineCSR_TDATA1_DMODE_BOTH0/* * dmode: Only Debug Mode can write the {\tt tdata} registers at the * selected \RcsrTselect. Writes from other modes are ignored. *//* ... */#defineCSR_TDATA1_DMODE_DMODE1/* * This bit is only writable from Debug Mode. * In ordinary use, external debuggers will always set this bit when * configuring a trigger. * When clearing this bit, debuggers should also set the action field * (whose location depends on \FcsrTdataOneType) to something other * than 1. *//* ... *//* * If \FcsrTdataOneType is 0, then this field is hard-wired to 0. * * Trigger-specific data. *//* ... */#defineCSR_TDATA1_DATA_OFFSET0#defineCSR_TDATA1_DATA_LENGTH(XLEN)(XLEN+-5)#defineCSR_TDATA1_DATA(XLEN)((1ULL<<(XLEN+-5))+-1)#defineCSR_TDATA20x7a2#defineCSR_TDATA2_DATA_OFFSET0#defineCSR_TDATA2_DATA_LENGTH(XLEN)XLEN#defineCSR_TDATA2_DATA(XLEN)((1ULL<<XLEN)+-1)#defineCSR_TDATA30x7a3#defineCSR_TDATA3_DATA_OFFSET0#defineCSR_TDATA3_DATA_LENGTH(XLEN)XLEN#defineCSR_TDATA3_DATA(XLEN)((1ULL<<XLEN)+-1)#defineCSR_TINFO0x7a4/* * One bit for each possible \FcsrTdataOneType enumerated in \RcsrTdataOne. Bit N * corresponds to type N. If the bit is set, then that type is * supported by the currently selected trigger. * * If the currently selected trigger doesn't exist, this field * contains 1. *//* ... */#defineCSR_TINFO_INFO_OFFSET0#defineCSR_TINFO_INFO_LENGTH0x10#defineCSR_TINFO_INFO0xffff#defineCSR_TCONTROL0x7a5/* * M-mode previous trigger enable field. * * \FcsrTcontrolMpte and \FcsrTcontrolMte provide one solution to a problem * regarding triggers with action=0 firing in M-mode trap handlers. See * Section~\ref{sec:nativetrigger} for more details. * * When a breakpoint trap into M-mode is taken, \FcsrTcontrolMpte is set to the value of * \FcsrTcontrolMte. *//* ... */#defineCSR_TCONTROL_MPTE_OFFSET7#defineCSR_TCONTROL_MPTE_LENGTH1#defineCSR_TCONTROL_MPTE0x80/* * M-mode trigger enable field. *//* ... */#defineCSR_TCONTROL_MTE_OFFSET3#defineCSR_TCONTROL_MTE_LENGTH1#defineCSR_TCONTROL_MTE8/* * disabled: Triggers with action=0 do not match/fire while the hart is in M-mode. *//* ... */#defineCSR_TCONTROL_MTE_DISABLED0/* * enabled: Triggers do match/fire while the hart is in M-mode. *//* ... */#defineCSR_TCONTROL_MTE_ENABLED1/* * When a breakpoint trap into M-mode is taken, \FcsrTcontrolMte is set to 0. When {\tt * mret} is executed, \FcsrTcontrolMte is set to the value of \FcsrTcontrolMpte. *//* ... */#defineCSR_HCONTEXT0x6a8/* * Hypervisor mode software can write a context number to this register, * which can be used to set triggers that only fire in that specific * context. * * An implementation may tie any number of upper bits in this field to * 0. If the H extension is not implemented, it's recommended to implement * no more than 6 bits on RV32 and 13 on RV64 (as visible through the * \RcsrMcontext register). If the H extension is implemented, * it's recommended to implement no more than 7 bits on RV32 * and 14 on RV64. *//* ... */#defineCSR_HCONTEXT_HCONTEXT_OFFSET0#defineCSR_HCONTEXT_HCONTEXT_LENGTH(XLEN)XLEN#defineCSR_HCONTEXT_HCONTEXT(XLEN)((1ULL<<XLEN)+-1)#defineCSR_SCONTEXT0x5a8/* * Supervisor mode software can write a context number to this * register, which can be used to set triggers that only fire in that * specific context. * * An implementation may tie any number of high bits in this field to * 0. It's recommended to implement no more than 16 bits on RV32, and * 34 on RV64. *//* ... */#defineCSR_SCONTEXT_DATA_OFFSET0#defineCSR_SCONTEXT_DATA_LENGTH(XLEN)XLEN#defineCSR_SCONTEXT_DATA(XLEN)((1ULL<<XLEN)+-1)#defineCSR_MCONTEXT0x7a8#defineCSR_MSCONTEXT0x7aa#defineCSR_MCONTROL0x7a1#defineCSR_MCONTROL_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_MCONTROL_TYPE_LENGTH4#defineCSR_MCONTROL_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))#defineCSR_MCONTROL_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_MCONTROL_DMODE_LENGTH1#defineCSR_MCONTROL_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * Specifies the largest naturally aligned powers-of-two (NAPOT) range * supported by the hardware when \FcsrMcontrolMatch is 1. The value is the * logarithm base 2 of the number of bytes in that range. * A value of 0 indicates \FcsrMcontrolMatch 1 is not supported. * A value of 63 corresponds to the maximum NAPOT range, which is * $2^{63}$ bytes in size. *//* ... */#defineCSR_MCONTROL_MASKMAX_OFFSET(XLEN)(XLEN+-0xb)#defineCSR_MCONTROL_MASKMAX_LENGTH6#defineCSR_MCONTROL_MASKMAX(XLEN)(0x3f*(1ULL<<(XLEN+-0xb)))/* * This field only exists when XLEN is at least 64. * It contains the 2 high bits of the access size. The low bits * come from \FcsrMcontrolSizelo. See \FcsrMcontrolSizelo for how this * is used. *//* ... */#defineCSR_MCONTROL_SIZEHI_OFFSET0x15#defineCSR_MCONTROL_SIZEHI_LENGTH2#defineCSR_MCONTROL_SIZEHI0x600000/* * If this bit is implemented then it must become set when this * trigger fires and may become set when this trigger matches. * The trigger's user can set or clear it at any * time. It is used to determine which * trigger(s) matched. If the bit is not implemented, it is always 0 * and writing it has no effect. *//* ... */#defineCSR_MCONTROL_HIT_OFFSET0x14#defineCSR_MCONTROL_HIT_LENGTH1#defineCSR_MCONTROL_HIT0x100000/* * This bit determines the contents of the XLEN-bit compare values. *//* ... */#defineCSR_MCONTROL_SELECT_OFFSET0x13#defineCSR_MCONTROL_SELECT_LENGTH1#defineCSR_MCONTROL_SELECT0x80000/* * address: There is at least one compare value and it contains the lowest * virtual address of the access. * It is recommended that there are additional compare values for * the other accessed virtual addresses. * (E.g. on a 32-bit read from 0x4000, the lowest address is 0x4000 * and the other addresses are 0x4001, 0x4002, and 0x4003.) *//* ... */#defineCSR_MCONTROL_SELECT_ADDRESS0/* * data: There is exactly one compare value and it contains the data * value loaded or stored, or the instruction executed. * Any bits beyond the size of the data access will contain 0. *//* ... */#defineCSR_MCONTROL_SELECT_DATA1#defineCSR_MCONTROL_TIMING_OFFSET0x12#defineCSR_MCONTROL_TIMING_LENGTH1#defineCSR_MCONTROL_TIMING0x40000/* * before: The action for this trigger will be taken just before the * instruction that triggered it is committed, but after all preceding * instructions are committed. \Rxepc or \RcsrDpc (depending * on \FcsrMcontrolAction) must be set to the virtual address of the * instruction that matched. * * If this is combined with \FcsrMcontrolLoad and * \FcsrMcontrolSelect=1 then a memory access will be * performed (including any side effects of performing such an access) even * though the load will not update its destination register. Debuggers * should consider this when setting such breakpoints on, for example, * memory-mapped I/O addresses. *//* ... */#defineCSR_MCONTROL_TIMING_BEFORE0/* * after: The action for this trigger will be taken after the instruction * that triggered it is committed. It should be taken before the next * instruction is committed, but it is better to implement triggers imprecisely * than to not implement them at all. \Rxepc or * \RcsrDpc (depending on \FcsrMcontrolAction) must be set to * the virtual address of the next instruction that must be executed to * preserve the program flow. *//* ... */#defineCSR_MCONTROL_TIMING_AFTER1/* * Most hardware will only implement one timing or the other, possibly * dependent on \FcsrMcontrolSelect, \FcsrMcontrolExecute, * \FcsrMcontrolLoad, and \FcsrMcontrolStore. This bit * primarily exists for the hardware to communicate to the debugger * what will happen. Hardware may implement the bit fully writable, in * which case the debugger has a little more control. * * Data load triggers with \FcsrMcontrolTiming of 0 will result in the same load * happening again when the debugger lets the hart run. For data load * triggers, debuggers must first attempt to set the breakpoint with * \FcsrMcontrolTiming of 1. * * If a trigger with \FcsrMcontrolTiming of 0 matches, it is * implementation-dependent whether that prevents a trigger with * \FcsrMcontrolTiming of 1 matching as well. *//* ... *//* * This field contains the 2 low bits of the access size. The high bits come * from \FcsrMcontrolSizehi. The combined value is interpreted as follows: *//* ... */#defineCSR_MCONTROL_SIZELO_OFFSET0x10#defineCSR_MCONTROL_SIZELO_LENGTH2#defineCSR_MCONTROL_SIZELO0x30000/* * any: The trigger will attempt to match against an access of any size. * The behavior is only well-defined if $|select|=0$, or if the access * size is XLEN. *//* ... */#defineCSR_MCONTROL_SIZELO_ANY0/* * 8bit: The trigger will only match against 8-bit memory accesses. *//* ... */#defineCSR_MCONTROL_SIZELO_8BIT1/* * 16bit: The trigger will only match against 16-bit memory accesses or * execution of 16-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_16BIT2/* * 32bit: The trigger will only match against 32-bit memory accesses or * execution of 32-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_32BIT3/* * 48bit: The trigger will only match against execution of 48-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_48BIT4/* * 64bit: The trigger will only match against 64-bit memory accesses or * execution of 64-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_64BIT5/* * 80bit: The trigger will only match against execution of 80-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_80BIT6/* * 96bit: The trigger will only match against execution of 96-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_96BIT7/* * 112bit: The trigger will only match against execution of 112-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_112BIT8/* * 128bit: The trigger will only match against 128-bit memory accesses or * execution of 128-bit instructions. *//* ... */#defineCSR_MCONTROL_SIZELO_128BIT9/* * An implementation must support the value of 0, but all other values * are optional. When an implementation supports address triggers * (\FcsrMcontrolSelect=0), it is recommended that those triggers * support every access size that the hart supports, as well as for * every instruction size that the hart supports. * * Implementations such as RV32D or RV64V are able to perform loads * and stores that are wider than XLEN. Custom extensions may also * support instructions that are wider than XLEN. Because * \RcsrTdataTwo is of size XLEN, there is a known limitation that * data value triggers (\FcsrMcontrolSelect=1) can only be supported * for access sizes up to XLEN bits. When an implementation supports * data value triggers (\FcsrMcontrolSelect=1), it is recommended * that those triggers support every access size up to XLEN that the * hart supports, as well as for every instruction length up to XLEN * that the hart supports. *//* ... *//* * The action to take when the trigger fires. The values are explained * in Table~\ref{tab:action}. *//* ... */#defineCSR_MCONTROL_ACTION_OFFSET0xc#defineCSR_MCONTROL_ACTION_LENGTH4#defineCSR_MCONTROL_ACTION0xf000/* * breakpoint: *//* ... */#defineCSR_MCONTROL_ACTION_BREAKPOINT0/* * debug mode: *//* ... */#defineCSR_MCONTROL_ACTION_DEBUG_MODE1/* * trace on: *//* ... */#defineCSR_MCONTROL_ACTION_TRACE_ON2/* * trace off: *//* ... */#defineCSR_MCONTROL_ACTION_TRACE_OFF3/* * trace notify: *//* ... */#defineCSR_MCONTROL_ACTION_TRACE_NOTIFY4/* * external0: *//* ... */#defineCSR_MCONTROL_ACTION_EXTERNAL08/* * external1: *//* ... */#defineCSR_MCONTROL_ACTION_EXTERNAL19#defineCSR_MCONTROL_CHAIN_OFFSET0xb#defineCSR_MCONTROL_CHAIN_LENGTH1#defineCSR_MCONTROL_CHAIN0x800/* * disabled: When this trigger matches, the configured action is taken. *//* ... */#defineCSR_MCONTROL_CHAIN_DISABLED0/* * enabled: While this trigger does not match, it prevents the trigger with * the next index from matching. *//* ... */#defineCSR_MCONTROL_CHAIN_ENABLED1/* * A trigger chain starts on the first trigger with $|chain|=1$ after * a trigger with $|chain|=0$, or simply on the first trigger if that * has $|chain|=1$. It ends on the first trigger after that which has * $|chain|=0$. This final trigger is part of the chain. The action * on all but the final trigger is ignored. The action on that final * trigger will be taken if and only if all the triggers in the chain * match at the same time. * * Debuggers should not terminate a chain with a trigger with a * different type. It is undefined when exactly such a chain fires. * * Because \FcsrMcontrolChain affects the next trigger, hardware must zero it in * writes to \RcsrMcontrol that set \FcsrTdataOneDmode to 0 if the next trigger has * \FcsrTdataOneDmode of 1. * In addition hardware should ignore writes to \RcsrMcontrol that set * \FcsrTdataOneDmode to 1 if the previous trigger has both \FcsrTdataOneDmode of 0 and * \FcsrMcontrolChain of 1. Debuggers must avoid the latter case by checking * \FcsrMcontrolChain on the previous trigger if they're writing \RcsrMcontrol. * * Implementations that wish to limit the maximum length of a trigger * chain (eg. to meet timing requirements) may do so by zeroing * \FcsrMcontrolChain in writes to \RcsrMcontrol that would make the chain too long. *//* ... */#defineCSR_MCONTROL_MATCH_OFFSET7#defineCSR_MCONTROL_MATCH_LENGTH4#defineCSR_MCONTROL_MATCH0x780/* * equal: Matches when any compare value equals \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL_MATCH_EQUAL0/* * napot: Matches when the top $M$ bits of any compare value match the top * $M$ bits of \RcsrTdataTwo. * $M$ is $|XLEN|-1$ minus the index of the least-significant * bit containing 0 in \RcsrTdataTwo. Debuggers should only write values * to \RcsrTdataTwo such that $M + $\FcsrMcontrolMaskmax$ \geq |XLEN|$ * and $M\gt0$ , otherwise it's undefined on what conditions the * trigger will match. *//* ... */#defineCSR_MCONTROL_MATCH_NAPOT1/* * ge: Matches when any compare value is greater than (unsigned) or * equal to \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL_MATCH_GE2/* * lt: Matches when any compare value is less than (unsigned) * \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL_MATCH_LT3/* * mask low: Matches when $\frac{|XLEN|}{2}-1$:$0$ of any compare value * equals $\frac{|XLEN|}{2}-1$:$0$ of \RcsrTdataTwo after * $\frac{|XLEN|}{2}-1$:$0$ of the compare value is ANDed with * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL_MATCH_MASK_LOW4/* * mask high: Matches when $|XLEN|-1$:$\frac{|XLEN|}{2}$ of any compare * value equals $\frac{|XLEN|}{2}-1$:$0$ of \RcsrTdataTwo after * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of the compare value is ANDed with * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL_MATCH_MASK_HIGH5/* * not equal: Matches when \FcsrMcontrolMatch$=0$ would not match. *//* ... */#defineCSR_MCONTROL_MATCH_NOT_EQUAL8/* * not napot: Matches when \FcsrMcontrolMatch$=1$ would not match. *//* ... */#defineCSR_MCONTROL_MATCH_NOT_NAPOT9/* * not mask low: Matches when \FcsrMcontrolMatch$=4$ would not match. *//* ... */#defineCSR_MCONTROL_MATCH_NOT_MASK_LOW12/* * not mask high: Matches when \FcsrMcontrolMatch$=5$ would not match. *//* ... */#defineCSR_MCONTROL_MATCH_NOT_MASK_HIGH13/* * Other values are reserved for future use. * * All comparisons only look at the lower XLEN (in the current mode) * bits of the compare values and of \RcsrTdataTwo. * When \FcsrMcontrolSelect=1 and access size is N, this is further * reduced, and comparisons only look at the lower N bits of the * compare values and of \RcsrTdataTwo. *//* ... *//* * When set, enable this trigger in M-mode. *//* ... */#defineCSR_MCONTROL_M_OFFSET6#defineCSR_MCONTROL_M_LENGTH1#defineCSR_MCONTROL_M0x40/* * When set, enable this trigger in S/HS-mode. * This bit is hard-wired to 0 if the hart does not support * S-mode. *//* ... */#defineCSR_MCONTROL_S_OFFSET4#defineCSR_MCONTROL_S_LENGTH1#defineCSR_MCONTROL_S0x10/* * When set, enable this trigger in U-mode. * This bit is hard-wired to 0 if the hart does not support * U-mode. *//* ... */#defineCSR_MCONTROL_U_OFFSET3#defineCSR_MCONTROL_U_LENGTH1#defineCSR_MCONTROL_U8/* * When set, the trigger fires on the virtual address or opcode of an * instruction that is executed. *//* ... */#defineCSR_MCONTROL_EXECUTE_OFFSET2#defineCSR_MCONTROL_EXECUTE_LENGTH1#defineCSR_MCONTROL_EXECUTE4/* * When set, the trigger fires on the virtual address or data of any * store. *//* ... */#defineCSR_MCONTROL_STORE_OFFSET1#defineCSR_MCONTROL_STORE_LENGTH1#defineCSR_MCONTROL_STORE2/* * When set, the trigger fires on the virtual address or data of any * load. *//* ... */#defineCSR_MCONTROL_LOAD_OFFSET0#defineCSR_MCONTROL_LOAD_LENGTH1#defineCSR_MCONTROL_LOAD1#defineCSR_MCONTROL60x7a1#defineCSR_MCONTROL6_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_MCONTROL6_TYPE_LENGTH4#defineCSR_MCONTROL6_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))#defineCSR_MCONTROL6_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_MCONTROL6_DMODE_LENGTH1#defineCSR_MCONTROL6_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * When set, enable this trigger in VS-mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_MCONTROL6_VS_OFFSET0x18#defineCSR_MCONTROL6_VS_LENGTH1#defineCSR_MCONTROL6_VS0x1000000/* * When set, enable this trigger in VU-mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_MCONTROL6_VU_OFFSET0x17#defineCSR_MCONTROL6_VU_LENGTH1#defineCSR_MCONTROL6_VU0x800000/* * If this bit is implemented then it must become set when this * trigger fires and may become set when this trigger matches. * The trigger's user can set or clear it at any * time. It is used to determine which * trigger(s) matched. If the bit is not implemented, it is always 0 * and writing it has no effect. *//* ... */#defineCSR_MCONTROL6_HIT_OFFSET0x16#defineCSR_MCONTROL6_HIT_LENGTH1#defineCSR_MCONTROL6_HIT0x400000/* * This bit determines the contents of the XLEN-bit compare values. *//* ... */#defineCSR_MCONTROL6_SELECT_OFFSET0x15#defineCSR_MCONTROL6_SELECT_LENGTH1#defineCSR_MCONTROL6_SELECT0x200000/* * address: There is at least one compare value and it contains the lowest * virtual address of the access. * In addition, it is recommended that there are additional compare * values for the other accessed virtual addresses match. * (E.g. on a 32-bit read from 0x4000, the lowest address is 0x4000 * and the other addresses are 0x4001, 0x4002, and 0x4003.) *//* ... */#defineCSR_MCONTROL6_SELECT_ADDRESS0/* * data: There is exactly one compare value and it contains the data * value loaded or stored, or the instruction executed. * Any bits beyond the size of the data access will contain 0. *//* ... */#defineCSR_MCONTROL6_SELECT_DATA1#defineCSR_MCONTROL6_TIMING_OFFSET0x14#defineCSR_MCONTROL6_TIMING_LENGTH1#defineCSR_MCONTROL6_TIMING0x100000/* * before: The action for this trigger will be taken just before the * instruction that triggered it is committed, but after all preceding * instructions are committed. \Rxepc or \RcsrDpc (depending * on \FcsrMcontrolSixAction) must be set to the virtual address of the * instruction that matched. * * If this is combined with \FcsrMcontrolSixLoad and * \FcsrMcontrolSixSelect=1 then a memory access will be * performed (including any side effects of performing such an access) even * though the load will not update its destination register. Debuggers * should consider this when setting such breakpoints on, for example, * memory-mapped I/O addresses. *//* ... */#defineCSR_MCONTROL6_TIMING_BEFORE0/* * after: The action for this trigger will be taken after the instruction * that triggered it is committed. It should be taken before the next * instruction is committed, but it is better to implement triggers imprecisely * than to not implement them at all. \Rxepc or * \RcsrDpc (depending on \FcsrMcontrolSixAction) must be set to * the virtual address of the next instruction that must be executed to * preserve the program flow. *//* ... */#defineCSR_MCONTROL6_TIMING_AFTER1/* * Most hardware will only implement one timing or the other, possibly * dependent on \FcsrMcontrolSixSelect, \FcsrMcontrolSixExecute, * \FcsrMcontrolSixLoad, and \FcsrMcontrolSixStore. This bit * primarily exists for the hardware to communicate to the debugger * what will happen. Hardware may implement the bit fully writable, in * which case the debugger has a little more control. * * Data load triggers with \FcsrMcontrolSixTiming of 0 will result in the same load * happening again when the debugger lets the hart run. For data load * triggers, debuggers must first attempt to set the breakpoint with * \FcsrMcontrolSixTiming of 1. * * If a trigger with \FcsrMcontrolSixTiming of 0 matches, it is * implementation-dependent whether that prevents a trigger with * \FcsrMcontrolSixTiming of 1 matching as well. *//* ... */#defineCSR_MCONTROL6_SIZE_OFFSET0x10#defineCSR_MCONTROL6_SIZE_LENGTH4#defineCSR_MCONTROL6_SIZE0xf0000/* * any: The trigger will attempt to match against an access of any size. * The behavior is only well-defined if $|select|=0$, or if the access * size is XLEN. *//* ... */#defineCSR_MCONTROL6_SIZE_ANY0/* * 8bit: The trigger will only match against 8-bit memory accesses. *//* ... */#defineCSR_MCONTROL6_SIZE_8BIT1/* * 16bit: The trigger will only match against 16-bit memory accesses or * execution of 16-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_16BIT2/* * 32bit: The trigger will only match against 32-bit memory accesses or * execution of 32-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_32BIT3/* * 48bit: The trigger will only match against execution of 48-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_48BIT4/* * 64bit: The trigger will only match against 64-bit memory accesses or * execution of 64-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_64BIT5/* * 80bit: The trigger will only match against execution of 80-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_80BIT6/* * 96bit: The trigger will only match against execution of 96-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_96BIT7/* * 112bit: The trigger will only match against execution of 112-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_112BIT8/* * 128bit: The trigger will only match against 128-bit memory accesses or * execution of 128-bit instructions. *//* ... */#defineCSR_MCONTROL6_SIZE_128BIT9/* * An implementation must support the value of 0, but all other values * are optional. When an implementation supports address triggers * (\FcsrMcontrolSixSelect=0), it is recommended that those triggers * support every access size that the hart supports, as well as for * every instruction size that the hart supports. * * Implementations such as RV32D or RV64V are able to perform loads * and stores that are wider than XLEN. Custom extensions may also * support instructions that are wider than XLEN. Because * \RcsrTdataTwo is of size XLEN, there is a known limitation that * data value triggers (\FcsrMcontrolSixSelect=1) can only be supported * for access sizes up to XLEN bits. When an implementation supports * data value triggers (\FcsrMcontrolSixSelect=1), it is recommended * that those triggers support every access size up to XLEN that the * hart supports, as well as for every instruction length up to XLEN * that the hart supports. *//* ... *//* * The action to take when the trigger fires. The values are explained * in Table~\ref{tab:action}. *//* ... */#defineCSR_MCONTROL6_ACTION_OFFSET0xc#defineCSR_MCONTROL6_ACTION_LENGTH4#defineCSR_MCONTROL6_ACTION0xf000/* * breakpoint: *//* ... */#defineCSR_MCONTROL6_ACTION_BREAKPOINT0/* * debug mode: *//* ... */#defineCSR_MCONTROL6_ACTION_DEBUG_MODE1/* * trace on: *//* ... */#defineCSR_MCONTROL6_ACTION_TRACE_ON2/* * trace off: *//* ... */#defineCSR_MCONTROL6_ACTION_TRACE_OFF3/* * trace notify: *//* ... */#defineCSR_MCONTROL6_ACTION_TRACE_NOTIFY4/* * external0: *//* ... */#defineCSR_MCONTROL6_ACTION_EXTERNAL08/* * external1: *//* ... */#defineCSR_MCONTROL6_ACTION_EXTERNAL19#defineCSR_MCONTROL6_CHAIN_OFFSET0xb#defineCSR_MCONTROL6_CHAIN_LENGTH1#defineCSR_MCONTROL6_CHAIN0x800/* * disabled: When this trigger matches, the configured action is taken. *//* ... */#defineCSR_MCONTROL6_CHAIN_DISABLED0/* * enabled: While this trigger does not match, it prevents the trigger with * the next index from matching. *//* ... */#defineCSR_MCONTROL6_CHAIN_ENABLED1/* * A trigger chain starts on the first trigger with $|chain|=1$ after * a trigger with $|chain|=0$, or simply on the first trigger if that * has $|chain|=1$. It ends on the first trigger after that which has * $|chain|=0$. This final trigger is part of the chain. The action * on all but the final trigger is ignored. The action on that final * trigger will be taken if and only if all the triggers in the chain * match at the same time. * * Debuggers should not terminate a chain with a trigger with a * different type. It is undefined when exactly such a chain fires. * * Because \FcsrMcontrolSixChain affects the next trigger, hardware must zero it in * writes to \RcsrMcontrolSix that set \FcsrTdataOneDmode to 0 if the next trigger has * \FcsrTdataOneDmode of 1. * In addition hardware should ignore writes to \RcsrMcontrolSix that set * \FcsrTdataOneDmode to 1 if the previous trigger has both \FcsrTdataOneDmode of 0 and * \FcsrMcontrolSixChain of 1. Debuggers must avoid the latter case by checking * \FcsrMcontrolSixChain on the previous trigger if they're writing \RcsrMcontrolSix. * * Implementations that wish to limit the maximum length of a trigger * chain (eg. to meet timing requirements) may do so by zeroing * \FcsrMcontrolSixChain in writes to \RcsrMcontrolSix that would make the chain too long. *//* ... */#defineCSR_MCONTROL6_MATCH_OFFSET7#defineCSR_MCONTROL6_MATCH_LENGTH4#defineCSR_MCONTROL6_MATCH0x780/* * equal: Matches when any compare value equals \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL6_MATCH_EQUAL0/* * napot: Matches when the top $M$ bits of any compare value match the top * $M$ bits of \RcsrTdataTwo. * $M$ is $|XLEN|-1$ minus the index of the least-significant bit * containing 0 in \RcsrTdataTwo. * \RcsrTdataTwo is WARL and if bits $|maskmax6|-1$:0 are written with all * ones then bit $|maskmax6|-1$ will be set to 0 while the values of bits $|maskmax6|-2$:0 * are \unspecified. * Legal values for \RcsrTdataTwo require $M + |maskmax6| \geq |XLEN|$ and $M\gt0$. * See above for how to determine maskmax6. *//* ... */#defineCSR_MCONTROL6_MATCH_NAPOT1/* * ge: Matches when any compare value is greater than (unsigned) or * equal to \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL6_MATCH_GE2/* * lt: Matches when any compare value is less than (unsigned) * \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL6_MATCH_LT3/* * mask low: Matches when $\frac{|XLEN|}{2}-1$:$0$ of any compare value * equals $\frac{|XLEN|}{2}-1$:$0$ of \RcsrTdataTwo after * $\frac{|XLEN|}{2}-1$:$0$ of the compare value is ANDed with * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL6_MATCH_MASK_LOW4/* * mask high: Matches when $|XLEN|-1$:$\frac{|XLEN|}{2}$ of any compare * value equals $\frac{|XLEN|}{2}-1$:$0$ of \RcsrTdataTwo after * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of the compare value is ANDed with * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of \RcsrTdataTwo. *//* ... */#defineCSR_MCONTROL6_MATCH_MASK_HIGH5/* * not equal: Matches when \FcsrMcontrolSixMatch$=0$ would not match. *//* ... */#defineCSR_MCONTROL6_MATCH_NOT_EQUAL8/* * not napot: Matches when \FcsrMcontrolSixMatch$=1$ would not match. *//* ... */#defineCSR_MCONTROL6_MATCH_NOT_NAPOT9/* * not mask low: Matches when \FcsrMcontrolSixMatch$=4$ would not match. *//* ... */#defineCSR_MCONTROL6_MATCH_NOT_MASK_LOW12/* * not mask high: Matches when \FcsrMcontrolSixMatch$=5$ would not match. *//* ... */#defineCSR_MCONTROL6_MATCH_NOT_MASK_HIGH13/* * Other values are reserved for future use. * * All comparisons only look at the lower XLEN (in the current mode) * bits of the compare values and of \RcsrTdataTwo. * When \FcsrMcontrolSelect=1 and access size is N, this is further * reduced, and comparisons only look at the lower N bits of the * compare values and of \RcsrTdataTwo. *//* ... *//* * When set, enable this trigger in M-mode. *//* ... */#defineCSR_MCONTROL6_M_OFFSET6#defineCSR_MCONTROL6_M_LENGTH1#defineCSR_MCONTROL6_M0x40/* * When set, enable this trigger in S/HS-mode. * This bit is hard-wired to 0 if the hart does not support * S-mode. *//* ... */#defineCSR_MCONTROL6_S_OFFSET4#defineCSR_MCONTROL6_S_LENGTH1#defineCSR_MCONTROL6_S0x10/* * When set, enable this trigger in U-mode. * This bit is hard-wired to 0 if the hart does not support * U-mode. *//* ... */#defineCSR_MCONTROL6_U_OFFSET3#defineCSR_MCONTROL6_U_LENGTH1#defineCSR_MCONTROL6_U8/* * When set, the trigger fires on the virtual address or opcode of an * instruction that is executed. *//* ... */#defineCSR_MCONTROL6_EXECUTE_OFFSET2#defineCSR_MCONTROL6_EXECUTE_LENGTH1#defineCSR_MCONTROL6_EXECUTE4/* * When set, the trigger fires on the virtual address or data of any * store. *//* ... */#defineCSR_MCONTROL6_STORE_OFFSET1#defineCSR_MCONTROL6_STORE_LENGTH1#defineCSR_MCONTROL6_STORE2/* * When set, the trigger fires on the virtual address or data of any * load. *//* ... */#defineCSR_MCONTROL6_LOAD_OFFSET0#defineCSR_MCONTROL6_LOAD_LENGTH1#defineCSR_MCONTROL6_LOAD1#defineCSR_ICOUNT0x7a1#defineCSR_ICOUNT_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_ICOUNT_TYPE_LENGTH4#defineCSR_ICOUNT_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))#defineCSR_ICOUNT_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_ICOUNT_DMODE_LENGTH1#defineCSR_ICOUNT_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * When set, enable this trigger in VS-mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_ICOUNT_VS_OFFSET0x1a#defineCSR_ICOUNT_VS_LENGTH1#defineCSR_ICOUNT_VS0x4000000/* * When set, enable this trigger in VU-mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_ICOUNT_VU_OFFSET0x19#defineCSR_ICOUNT_VU_LENGTH1#defineCSR_ICOUNT_VU0x2000000/* * If this bit is implemented, the hardware sets it when this * trigger fires. The trigger's user can set or clear it at any * time. It is used to determine which * trigger(s) fires. If the bit is not implemented, it is always 0 * and writing it has no effect. *//* ... */#defineCSR_ICOUNT_HIT_OFFSET0x18#defineCSR_ICOUNT_HIT_LENGTH1#defineCSR_ICOUNT_HIT0x1000000/* * The trigger will generally fire after \FcsrIcountCount instructions * in enabled modes have been executed. See above for the precise behavior. *//* ... */#defineCSR_ICOUNT_COUNT_OFFSET0xa#defineCSR_ICOUNT_COUNT_LENGTH0xe#defineCSR_ICOUNT_COUNT0xfffc00/* * When set, enable this trigger in M-mode. *//* ... */#defineCSR_ICOUNT_M_OFFSET9#defineCSR_ICOUNT_M_LENGTH1#defineCSR_ICOUNT_M0x200/* * This bit becomes set when \FcsrIcountCount is decremented from 1 * to 0. It is cleared when the trigger fires, which will happen just * before executing the next instruction in one of the enabled modes. *//* ... */#defineCSR_ICOUNT_PENDING_OFFSET8#defineCSR_ICOUNT_PENDING_LENGTH1#defineCSR_ICOUNT_PENDING0x100/* * When set, enable this trigger in S/HS-mode. * This bit is hard-wired to 0 if the hart does not support * S-mode. *//* ... */#defineCSR_ICOUNT_S_OFFSET7#defineCSR_ICOUNT_S_LENGTH1#defineCSR_ICOUNT_S0x80/* * When set, enable this trigger in U-mode. * This bit is hard-wired to 0 if the hart does not support * U-mode. *//* ... */#defineCSR_ICOUNT_U_OFFSET6#defineCSR_ICOUNT_U_LENGTH1#defineCSR_ICOUNT_U0x40/* * The action to take when the trigger fires. The values are explained * in Table~\ref{tab:action}. *//* ... */#defineCSR_ICOUNT_ACTION_OFFSET0#defineCSR_ICOUNT_ACTION_LENGTH6#defineCSR_ICOUNT_ACTION0x3f/* * breakpoint: *//* ... */#defineCSR_ICOUNT_ACTION_BREAKPOINT0/* * debug mode: *//* ... */#defineCSR_ICOUNT_ACTION_DEBUG_MODE1/* * trace on: *//* ... */#defineCSR_ICOUNT_ACTION_TRACE_ON2/* * trace off: *//* ... */#defineCSR_ICOUNT_ACTION_TRACE_OFF3/* * trace notify: *//* ... */#defineCSR_ICOUNT_ACTION_TRACE_NOTIFY4/* * external0: *//* ... */#defineCSR_ICOUNT_ACTION_EXTERNAL08/* * external1: *//* ... */#defineCSR_ICOUNT_ACTION_EXTERNAL19#defineCSR_ITRIGGER0x7a1#defineCSR_ITRIGGER_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_ITRIGGER_TYPE_LENGTH4#defineCSR_ITRIGGER_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))#defineCSR_ITRIGGER_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_ITRIGGER_DMODE_LENGTH1#defineCSR_ITRIGGER_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * If this bit is implemented, the hardware sets it when this * trigger matches. The trigger's user can set or clear it at any * time. It is used to determine which * trigger(s) matched. If the bit is not implemented, it is always 0 * and writing it has no effect. *//* ... */#defineCSR_ITRIGGER_HIT_OFFSET(XLEN)(XLEN+-6)#defineCSR_ITRIGGER_HIT_LENGTH1#defineCSR_ITRIGGER_HIT(XLEN)(1ULL<<(XLEN+-6))/* * When set, enable this trigger for interrupts that are taken from VS * mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_ITRIGGER_VS_OFFSET0xc#defineCSR_ITRIGGER_VS_LENGTH1#defineCSR_ITRIGGER_VS0x1000/* * When set, enable this trigger for interrupts that are taken from VU * mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_ITRIGGER_VU_OFFSET0xb#defineCSR_ITRIGGER_VU_LENGTH1#defineCSR_ITRIGGER_VU0x800/* * When set, non-maskable interrupts cause this * trigger to fire if the trigger is enabled for the current mode. *//* ... */#defineCSR_ITRIGGER_NMI_OFFSET0xa#defineCSR_ITRIGGER_NMI_LENGTH1#defineCSR_ITRIGGER_NMI0x400/* * When set, enable this trigger for interrupts that are taken from M * mode. *//* ... */#defineCSR_ITRIGGER_M_OFFSET9#defineCSR_ITRIGGER_M_LENGTH1#defineCSR_ITRIGGER_M0x200/* * When set, enable this trigger for interrupts that are taken from S/HS * mode. * This bit is hard-wired to 0 if the hart does not support * S-mode. *//* ... */#defineCSR_ITRIGGER_S_OFFSET7#defineCSR_ITRIGGER_S_LENGTH1#defineCSR_ITRIGGER_S0x80/* * When set, enable this trigger for interrupts that are taken from U * mode. * This bit is hard-wired to 0 if the hart does not support * U-mode. *//* ... */#defineCSR_ITRIGGER_U_OFFSET6#defineCSR_ITRIGGER_U_LENGTH1#defineCSR_ITRIGGER_U0x40/* * The action to take when the trigger fires. The values are explained * in Table~\ref{tab:action}. *//* ... */#defineCSR_ITRIGGER_ACTION_OFFSET0#defineCSR_ITRIGGER_ACTION_LENGTH6#defineCSR_ITRIGGER_ACTION0x3f/* * breakpoint: *//* ... */#defineCSR_ITRIGGER_ACTION_BREAKPOINT0/* * debug mode: *//* ... */#defineCSR_ITRIGGER_ACTION_DEBUG_MODE1/* * trace on: *//* ... */#defineCSR_ITRIGGER_ACTION_TRACE_ON2/* * trace off: *//* ... */#defineCSR_ITRIGGER_ACTION_TRACE_OFF3/* * trace notify: *//* ... */#defineCSR_ITRIGGER_ACTION_TRACE_NOTIFY4/* * external0: *//* ... */#defineCSR_ITRIGGER_ACTION_EXTERNAL08/* * external1: *//* ... */#defineCSR_ITRIGGER_ACTION_EXTERNAL19#defineCSR_ETRIGGER0x7a1#defineCSR_ETRIGGER_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_ETRIGGER_TYPE_LENGTH4#defineCSR_ETRIGGER_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))#defineCSR_ETRIGGER_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_ETRIGGER_DMODE_LENGTH1#defineCSR_ETRIGGER_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * If this bit is implemented, the hardware sets it when this * trigger matches. The trigger's user can set or clear it at any * time. It is used to determine which * trigger(s) matched. If the bit is not implemented, it is always 0 * and writing it has no effect. *//* ... */#defineCSR_ETRIGGER_HIT_OFFSET(XLEN)(XLEN+-6)#defineCSR_ETRIGGER_HIT_LENGTH1#defineCSR_ETRIGGER_HIT(XLEN)(1ULL<<(XLEN+-6))/* * When set, enable this trigger for exceptions that are taken from VS * mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_ETRIGGER_VS_OFFSET0xc#defineCSR_ETRIGGER_VS_LENGTH1#defineCSR_ETRIGGER_VS0x1000/* * When set, enable this trigger for exceptions that are taken from VU * mode. * This bit is hard-wired to 0 if the hart does not support * virtualization mode. *//* ... */#defineCSR_ETRIGGER_VU_OFFSET0xb#defineCSR_ETRIGGER_VU_LENGTH1#defineCSR_ETRIGGER_VU0x800/* * When set, enable this trigger for exceptions that are taken from M * mode. *//* ... */#defineCSR_ETRIGGER_M_OFFSET9#defineCSR_ETRIGGER_M_LENGTH1#defineCSR_ETRIGGER_M0x200/* * When set, enable this trigger for exceptions that are taken from S/HS * mode. * This bit is hard-wired to 0 if the hart does not support * S-mode. *//* ... */#defineCSR_ETRIGGER_S_OFFSET7#defineCSR_ETRIGGER_S_LENGTH1#defineCSR_ETRIGGER_S0x80/* * When set, enable this trigger for exceptions that are taken from U * mode. * This bit is hard-wired to 0 if the hart does not support * U-mode. *//* ... */#defineCSR_ETRIGGER_U_OFFSET6#defineCSR_ETRIGGER_U_LENGTH1#defineCSR_ETRIGGER_U0x40/* * The action to take when the trigger fires. The values are explained * in Table~\ref{tab:action}. *//* ... */#defineCSR_ETRIGGER_ACTION_OFFSET0#defineCSR_ETRIGGER_ACTION_LENGTH6#defineCSR_ETRIGGER_ACTION0x3f/* * breakpoint: *//* ... */#defineCSR_ETRIGGER_ACTION_BREAKPOINT0/* * debug mode: *//* ... */#defineCSR_ETRIGGER_ACTION_DEBUG_MODE1/* * trace on: *//* ... */#defineCSR_ETRIGGER_ACTION_TRACE_ON2/* * trace off: *//* ... */#defineCSR_ETRIGGER_ACTION_TRACE_OFF3/* * trace notify: *//* ... */#defineCSR_ETRIGGER_ACTION_TRACE_NOTIFY4/* * external0: *//* ... */#defineCSR_ETRIGGER_ACTION_EXTERNAL08/* * external1: *//* ... */#defineCSR_ETRIGGER_ACTION_EXTERNAL19#defineCSR_TMEXTTRIGGER0x7a1#defineCSR_TMEXTTRIGGER_TYPE_OFFSET(XLEN)(XLEN+-4)#defineCSR_TMEXTTRIGGER_TYPE_LENGTH4#defineCSR_TMEXTTRIGGER_TYPE(XLEN)(0xf*(1ULL<<(XLEN+-4)))#defineCSR_TMEXTTRIGGER_DMODE_OFFSET(XLEN)(XLEN+-5)#defineCSR_TMEXTTRIGGER_DMODE_LENGTH1#defineCSR_TMEXTTRIGGER_DMODE(XLEN)(1ULL<<(XLEN+-5))/* * If this bit is implemented, the hardware sets it when this * trigger matches. The trigger's user can set or clear it at any * time. It is used to determine which * trigger(s) matched. If the bit is not implemented, it is always 0 * and writing it has no effect. *//* ... */#defineCSR_TMEXTTRIGGER_HIT_OFFSET(XLEN)(XLEN+-6)#defineCSR_TMEXTTRIGGER_HIT_LENGTH1#defineCSR_TMEXTTRIGGER_HIT(XLEN)(1ULL<<(XLEN+-6))/* * This optional bit, when set, causes this trigger to fire whenever an attached * interrupt controller signals a trigger. *//* ... */#defineCSR_TMEXTTRIGGER_INTCTL_OFFSET0x16#defineCSR_TMEXTTRIGGER_INTCTL_LENGTH1#defineCSR_TMEXTTRIGGER_INTCTL0x400000/* * Selects any combination of up to 16 external debug trigger inputs * that cause this trigger to fire. *//* ... */#defineCSR_TMEXTTRIGGER_SELECT_OFFSET6#defineCSR_TMEXTTRIGGER_SELECT_LENGTH0x10#defineCSR_TMEXTTRIGGER_SELECT0x3fffc0/* * The action to take when the trigger fires. The values are explained * in Table~\ref{tab:action}. *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_OFFSET0#defineCSR_TMEXTTRIGGER_ACTION_LENGTH6#defineCSR_TMEXTTRIGGER_ACTION0x3f/* * breakpoint: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_BREAKPOINT0/* * debug mode: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_DEBUG_MODE1/* * trace on: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_TRACE_ON2/* * trace off: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_TRACE_OFF3/* * trace notify: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_TRACE_NOTIFY4/* * external0: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_EXTERNAL08/* * external1: *//* ... */#defineCSR_TMEXTTRIGGER_ACTION_EXTERNAL19#defineCSR_TEXTRA320x7a3/* * Data used together with \FcsrTextraThirtytwoMhselect. *//* ... */#defineCSR_TEXTRA32_MHVALUE_OFFSET0x1a#defineCSR_TEXTRA32_MHVALUE_LENGTH6#defineCSR_TEXTRA32_MHVALUE0xfc000000U#defineCSR_TEXTRA32_MHSELECT_OFFSET0x17#defineCSR_TEXTRA32_MHSELECT_LENGTH3#defineCSR_TEXTRA32_MHSELECT0x3800000/* * ignore: Ignore \FcsrTextraThirtytwoMhvalue. *//* ... */#defineCSR_TEXTRA32_MHSELECT_IGNORE0/* * mcontext: This trigger will only match if the low bits of * \RcsrMcontext/\RcsrHcontext equal \FcsrTextraThirtytwoMhvalue. *//* ... */#defineCSR_TEXTRA32_MHSELECT_MCONTEXT4/* * 1, 5 (mcontext\_select): This trigger will only match if the low bits of * \RcsrMcontext/\RcsrHcontext equal \{\FcsrTextraThirtytwoMhvalue, mhselect[2]\}. * * 2, 6 (vmid\_select): This trigger will only match if VMID in hgatp equals the lower VMIDMAX * (defined in the Privileged Spec) bits of \{\FcsrTextraThirtytwoMhvalue, mhselect[2]\}. * * 3, 7 (reserved): Reserved. * * If the H extension is not supported, the only legal values are 0 and 4. *//* ... *//* * When the least significant bit of this field is 1, it causes bits 7:0 * in the comparison to be ignored, when \FcsrTextraThirtytwoSselect=1. * When the next most significant bit of this field is 1, it causes bits 15:8 * to be ignored in the comparison, when \FcsrTextraThirtytwoSselect=1. *//* ... */#defineCSR_TEXTRA32_SBYTEMASK_OFFSET0x12#defineCSR_TEXTRA32_SBYTEMASK_LENGTH2#defineCSR_TEXTRA32_SBYTEMASK0xc0000/* * Data used together with \FcsrTextraThirtytwoSselect. * * This field should be tied to 0 when S-mode is not supported. *//* ... */#defineCSR_TEXTRA32_SVALUE_OFFSET2#defineCSR_TEXTRA32_SVALUE_LENGTH0x10#defineCSR_TEXTRA32_SVALUE0x3fffc#defineCSR_TEXTRA32_SSELECT_OFFSET0#defineCSR_TEXTRA32_SSELECT_LENGTH2#defineCSR_TEXTRA32_SSELECT3/* * ignore: Ignore \FcsrTextraThirtytwoSvalue. *//* ... */#defineCSR_TEXTRA32_SSELECT_IGNORE0/* * scontext: This trigger will only match if the low bits of * \RcsrScontext equal \FcsrTextraThirtytwoSvalue. *//* ... */#defineCSR_TEXTRA32_SSELECT_SCONTEXT1/* * asid: This trigger will only match if: * \begin{itemize}[noitemsep,nolistsep] * \item the mode is VS-mode or VU-mode and ASID in \Rvsatp * equals the lower ASIDMAX (defined in the Privileged Spec) bits * of \FcsrTextraThirtytwoSvalue. * \item in all other modes, ASID in \Rsatp equals the lower * ASIDMAX (defined in the Privileged Spec) bits of * \FcsrTextraThirtytwoSvalue. * \end{itemize} *//* ... */#defineCSR_TEXTRA32_SSELECT_ASID2/* * This field should be tied to 0 when S-mode is not supported. *//* ... */#defineCSR_TEXTRA640x7a3#defineCSR_TEXTRA64_MHVALUE_OFFSET0x33#defineCSR_TEXTRA64_MHVALUE_LENGTH0xd#defineCSR_TEXTRA64_MHVALUE0xfff8000000000000ULL#defineCSR_TEXTRA64_MHSELECT_OFFSET0x30#defineCSR_TEXTRA64_MHSELECT_LENGTH3#defineCSR_TEXTRA64_MHSELECT0x7000000000000ULL/* * When the least significant bit of this field is 1, it causes bits 7:0 * in the comparison to be ignored, when \FcsrTextraSixtyfourSselect=1. * Likewise, the second bit controls the comparison of bits 15:8, * third bit controls the comparison of bits 23:16, * fourth bit controls the comparison of bits 31:24, and * fifth bit controls the comparison of bits 33:32. *//* ... */#defineCSR_TEXTRA64_SBYTEMASK_OFFSET0x24#defineCSR_TEXTRA64_SBYTEMASK_LENGTH5#defineCSR_TEXTRA64_SBYTEMASK0x1f000000000ULL#defineCSR_TEXTRA64_SVALUE_OFFSET2#defineCSR_TEXTRA64_SVALUE_LENGTH0x22#defineCSR_TEXTRA64_SVALUE0xffffffffcULL#defineCSR_TEXTRA64_SSELECT_OFFSET0#defineCSR_TEXTRA64_SSELECT_LENGTH2#defineCSR_TEXTRA64_SSELECT3#defineDM_DMSTATUS0x11#defineDM_DMSTATUS_NDMRESETPENDING_OFFSET0x18#defineDM_DMSTATUS_NDMRESETPENDING_LENGTH1#defineDM_DMSTATUS_NDMRESETPENDING0x1000000/* * false: Unimplemented, or \FdmDmcontrolNdmreset is zero and no ndmreset is currently * in progress. *//* ... */#defineDM_DMSTATUS_NDMRESETPENDING_FALSE0/* * true: \FdmDmcontrolNdmreset is currently nonzero, or there is an ndmreset in progress. *//* ... */#defineDM_DMSTATUS_NDMRESETPENDING_TRUE1#defineDM_DMSTATUS_STICKYUNAVAIL_OFFSET0x17#defineDM_DMSTATUS_STICKYUNAVAIL_LENGTH1#defineDM_DMSTATUS_STICKYUNAVAIL0x800000/* * current: The per-hart {\tt unavail} bits reflect the current state of the hart. *//* ... */#defineDM_DMSTATUS_STICKYUNAVAIL_CURRENT0/* * sticky: The per-hart {\tt unavail} bits are sticky. Once they are set, they will * not clear until the debugger acknowledges them using \FdmDmcontrolAckunavail. *//* ... */#defineDM_DMSTATUS_STICKYUNAVAIL_STICKY1/* * If 1, then there is an implicit {\tt ebreak} instruction at the * non-existent word immediately after the Program Buffer. This saves * the debugger from having to write the {\tt ebreak} itself, and * allows the Program Buffer to be one word smaller. * * This must be 1 when \FdmAbstractcsProgbufsize is 1. *//* ... */#defineDM_DMSTATUS_IMPEBREAK_OFFSET0x16#defineDM_DMSTATUS_IMPEBREAK_LENGTH1#defineDM_DMSTATUS_IMPEBREAK0x400000/* * This field is 1 when all currently selected harts have been reset * and reset has not been acknowledged for any of them. *//* ... */#defineDM_DMSTATUS_ALLHAVERESET_OFFSET0x13#defineDM_DMSTATUS_ALLHAVERESET_LENGTH1#defineDM_DMSTATUS_ALLHAVERESET0x80000/* * This field is 1 when at least one currently selected hart has been * reset and reset has not been acknowledged for that hart. *//* ... */#defineDM_DMSTATUS_ANYHAVERESET_OFFSET0x12#defineDM_DMSTATUS_ANYHAVERESET_LENGTH1#defineDM_DMSTATUS_ANYHAVERESET0x40000/* * This field is 1 when all currently selected harts have their * resume ack bit\index{resume ack bit} set. *//* ... */#defineDM_DMSTATUS_ALLRESUMEACK_OFFSET0x11#defineDM_DMSTATUS_ALLRESUMEACK_LENGTH1#defineDM_DMSTATUS_ALLRESUMEACK0x20000/* * This field is 1 when any currently selected hart has its * resume ack bit\index{resume ack bit} set. *//* ... */#defineDM_DMSTATUS_ANYRESUMEACK_OFFSET0x10#defineDM_DMSTATUS_ANYRESUMEACK_LENGTH1#defineDM_DMSTATUS_ANYRESUMEACK0x10000/* * This field is 1 when all currently selected harts do not exist in * this hardware platform. *//* ... */#defineDM_DMSTATUS_ALLNONEXISTENT_OFFSET0xf#defineDM_DMSTATUS_ALLNONEXISTENT_LENGTH1#defineDM_DMSTATUS_ALLNONEXISTENT0x8000/* * This field is 1 when any currently selected hart does not exist in * this hardware platform. *//* ... */#defineDM_DMSTATUS_ANYNONEXISTENT_OFFSET0xe#defineDM_DMSTATUS_ANYNONEXISTENT_LENGTH1#defineDM_DMSTATUS_ANYNONEXISTENT0x4000/* * This field is 1 when all currently selected harts are * unavailable, or (if \FdmDmstatusStickyunavail is 1) were * unavailable without that being acknowledged. *//* ... */#defineDM_DMSTATUS_ALLUNAVAIL_OFFSET0xd#defineDM_DMSTATUS_ALLUNAVAIL_LENGTH1#defineDM_DMSTATUS_ALLUNAVAIL0x2000/* * This field is 1 when any currently selected hart is unavailable, * or (if \FdmDmstatusStickyunavail is 1) was unavailable without * that being acknowledged. *//* ... */#defineDM_DMSTATUS_ANYUNAVAIL_OFFSET0xc#defineDM_DMSTATUS_ANYUNAVAIL_LENGTH1#defineDM_DMSTATUS_ANYUNAVAIL0x1000/* * This field is 1 when all currently selected harts are running. *//* ... */#defineDM_DMSTATUS_ALLRUNNING_OFFSET0xb#defineDM_DMSTATUS_ALLRUNNING_LENGTH1#defineDM_DMSTATUS_ALLRUNNING0x800/* * This field is 1 when any currently selected hart is running. *//* ... */#defineDM_DMSTATUS_ANYRUNNING_OFFSET0xa#defineDM_DMSTATUS_ANYRUNNING_LENGTH1#defineDM_DMSTATUS_ANYRUNNING0x400/* * This field is 1 when all currently selected harts are halted. *//* ... */#defineDM_DMSTATUS_ALLHALTED_OFFSET9#defineDM_DMSTATUS_ALLHALTED_LENGTH1#defineDM_DMSTATUS_ALLHALTED0x200/* * This field is 1 when any currently selected hart is halted. *//* ... */#defineDM_DMSTATUS_ANYHALTED_OFFSET8#defineDM_DMSTATUS_ANYHALTED_LENGTH1#defineDM_DMSTATUS_ANYHALTED0x100#defineDM_DMSTATUS_AUTHENTICATED_OFFSET7#defineDM_DMSTATUS_AUTHENTICATED_LENGTH1#defineDM_DMSTATUS_AUTHENTICATED0x80/* * false: Authentication is required before using the DM. *//* ... */#defineDM_DMSTATUS_AUTHENTICATED_FALSE0/* * true: The authentication check has passed. *//* ... */#defineDM_DMSTATUS_AUTHENTICATED_TRUE1/* * On components that don't implement authentication, this bit must be * preset as 1. *//* ... */#defineDM_DMSTATUS_AUTHBUSY_OFFSET6#defineDM_DMSTATUS_AUTHBUSY_LENGTH1#defineDM_DMSTATUS_AUTHBUSY0x40/* * ready: The authentication module is ready to process the next * read/write to \RdmAuthdata. *//* ... */#defineDM_DMSTATUS_AUTHBUSY_READY0/* * busy: The authentication module is busy. Accessing \RdmAuthdata results * in unspecified behavior. *//* ... */#defineDM_DMSTATUS_AUTHBUSY_BUSY1/* * \FdmDmstatusAuthbusy only becomes set in immediate response to an access to * \RdmAuthdata. *//* ... *//* * 1 if this Debug Module supports halt-on-reset functionality * controllable by the \FdmDmcontrolSetresethaltreq and \FdmDmcontrolClrresethaltreq bits. * 0 otherwise. *//* ... */#defineDM_DMSTATUS_HASRESETHALTREQ_OFFSET5#defineDM_DMSTATUS_HASRESETHALTREQ_LENGTH1#defineDM_DMSTATUS_HASRESETHALTREQ0x20#defineDM_DMSTATUS_CONFSTRPTRVALID_OFFSET4#defineDM_DMSTATUS_CONFSTRPTRVALID_LENGTH1#defineDM_DMSTATUS_CONFSTRPTRVALID0x10/* * invalid: \RdmConfstrptrZero--\RdmConfstrptrThree hold information which * is not relevant to the configuration structure. *//* ... */#defineDM_DMSTATUS_CONFSTRPTRVALID_INVALID0/* * valid: \RdmConfstrptrZero--\RdmConfstrptrThree hold the address of the * configuration structure. *//* ... */#defineDM_DMSTATUS_CONFSTRPTRVALID_VALID1#defineDM_DMSTATUS_VERSION_OFFSET0#defineDM_DMSTATUS_VERSION_LENGTH4#defineDM_DMSTATUS_VERSION0xf/* * none: There is no Debug Module present. *//* ... */#defineDM_DMSTATUS_VERSION_NONE0/* * 0.11: There is a Debug Module and it conforms to version 0.11 of this * specification. *//* ... */#defineDM_DMSTATUS_VERSION_0_111/* * 0.13: There is a Debug Module and it conforms to version 0.13 of this * specification. *//* ... */#defineDM_DMSTATUS_VERSION_0_132/* * 1.0: There is a Debug Module and it conforms to version 1.0 of this * specification. *//* ... */#defineDM_DMSTATUS_VERSION_1_03/* * custom: There is a Debug Module but it does not conform to any * available version of this spec. *//* ... */#defineDM_DMSTATUS_VERSION_CUSTOM15#defineDM_DMCONTROL0x10/* * Writing 0 clears the halt request bit for all currently selected * harts. This may cancel outstanding halt requests for those harts. * * Writing 1 sets the halt request bit for all currently selected * harts. Running harts will halt whenever their halt request bit is * set. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_HALTREQ_OFFSET0x1f#defineDM_DMCONTROL_HALTREQ_LENGTH1#defineDM_DMCONTROL_HALTREQ0x80000000U/* * Writing 1 causes the currently selected harts to resume once, if * they are halted when the write occurs. It also clears the resume * ack bit for those harts. * * \FdmDmcontrolResumereq is ignored if \FdmDmcontrolHaltreq is set. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_RESUMEREQ_OFFSET0x1e#defineDM_DMCONTROL_RESUMEREQ_LENGTH1#defineDM_DMCONTROL_RESUMEREQ0x40000000/* * This optional field writes the reset bit for all the currently * selected harts. To perform a reset the debugger writes 1, and then * writes 0 to deassert the reset signal. * * While this bit is 1, the debugger must not change which harts are * selected. * * If this feature is not implemented, the bit always stays 0, so * after writing 1 the debugger can read the register back to see if * the feature is supported. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_HARTRESET_OFFSET0x1d#defineDM_DMCONTROL_HARTRESET_LENGTH1#defineDM_DMCONTROL_HARTRESET0x20000000#defineDM_DMCONTROL_ACKHAVERESET_OFFSET0x1c#defineDM_DMCONTROL_ACKHAVERESET_LENGTH1#defineDM_DMCONTROL_ACKHAVERESET0x10000000/* * nop: No effect. *//* ... */#defineDM_DMCONTROL_ACKHAVERESET_NOP0/* * ack: Clears {\tt havereset} for any selected harts. *//* ... */#defineDM_DMCONTROL_ACKHAVERESET_ACK1/* * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_ACKUNAVAIL_OFFSET0x1b#defineDM_DMCONTROL_ACKUNAVAIL_LENGTH1#defineDM_DMCONTROL_ACKUNAVAIL0x8000000/* * nop: No effect. *//* ... */#defineDM_DMCONTROL_ACKUNAVAIL_NOP0/* * ack: Clears {\tt unavail} for any selected harts that are currently available. *//* ... */#defineDM_DMCONTROL_ACKUNAVAIL_ACK1/* * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... *//* * Selects the definition of currently selected harts. *//* ... */#defineDM_DMCONTROL_HASEL_OFFSET0x1a#defineDM_DMCONTROL_HASEL_LENGTH1#defineDM_DMCONTROL_HASEL0x4000000/* * single: There is a single currently selected hart, that is selected by \Fhartsel. *//* ... */#defineDM_DMCONTROL_HASEL_SINGLE0/* * multiple: There may be multiple currently selected harts -- the hart * selected by \Fhartsel, plus those selected by the hart array mask * register. *//* ... */#defineDM_DMCONTROL_HASEL_MULTIPLE1/* * An implementation which does not implement the hart array mask register * must tie this field to 0. A debugger which wishes to use the hart array * mask register feature should set this bit and read back to see if the functionality * is supported. *//* ... *//* * The low 10 bits of \Fhartsel: the DM-specific index of the hart to * select. This hart is always part of the currently selected harts. *//* ... */#defineDM_DMCONTROL_HARTSELLO_OFFSET0x10#defineDM_DMCONTROL_HARTSELLO_LENGTH0xa#defineDM_DMCONTROL_HARTSELLO0x3ff0000/* * The high 10 bits of \Fhartsel: the DM-specific index of the hart to * select. This hart is always part of the currently selected harts. *//* ... */#defineDM_DMCONTROL_HARTSELHI_OFFSET6#defineDM_DMCONTROL_HARTSELHI_LENGTH0xa#defineDM_DMCONTROL_HARTSELHI0xffc0/* * This optional field sets \Fkeepalive for all currently selected * harts, unless \FdmDmcontrolClrkeepalive is simultaneously set to * 1. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_SETKEEPALIVE_OFFSET5#defineDM_DMCONTROL_SETKEEPALIVE_LENGTH1#defineDM_DMCONTROL_SETKEEPALIVE0x20/* * This optional field clears \Fkeepalive for all currently selected * harts. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_CLRKEEPALIVE_OFFSET4#defineDM_DMCONTROL_CLRKEEPALIVE_LENGTH1#defineDM_DMCONTROL_CLRKEEPALIVE0x10/* * This optional field writes the halt-on-reset request bit for all * currently selected harts, unless \FdmDmcontrolClrresethaltreq is * simultaneously set to 1. * When set to 1, each selected hart will halt upon the next deassertion * of its reset. The halt-on-reset request bit is not automatically * cleared. The debugger must write to \FdmDmcontrolClrresethaltreq to clear it. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. * * If \FdmDmstatusHasresethaltreq is 0, this field is not implemented. *//* ... */#defineDM_DMCONTROL_SETRESETHALTREQ_OFFSET3#defineDM_DMCONTROL_SETRESETHALTREQ_LENGTH1#defineDM_DMCONTROL_SETRESETHALTREQ8/* * This optional field clears the halt-on-reset request bit for all * currently selected harts. * * Writes apply to the new value of \Fhartsel and \FdmDmcontrolHasel. *//* ... */#defineDM_DMCONTROL_CLRRESETHALTREQ_OFFSET2#defineDM_DMCONTROL_CLRRESETHALTREQ_LENGTH1#defineDM_DMCONTROL_CLRRESETHALTREQ4/* * This bit controls the reset signal from the DM to the rest of the * hardware platform. The signal should reset every part of the hardware platform, including * every hart, except for the DM and any logic required to access the * DM. * To perform a hardware platform reset the debugger writes 1, * and then writes 0 * to deassert the reset. *//* ... */#defineDM_DMCONTROL_NDMRESET_OFFSET1#defineDM_DMCONTROL_NDMRESET_LENGTH1#defineDM_DMCONTROL_NDMRESET2/* * This bit serves as a reset signal for the Debug Module itself. * After changing the value of this bit, the debugger must poll * \RdmDmcontrol until \FdmDmcontrolDmactive has taken the requested value * before performing any action that assumes the requested \FdmDmcontrolDmactive * state change has completed. Hardware may * take an arbitrarily long time to complete activation or deactivation and will * indicate completion by setting \FdmDmcontrolDmactive to the requested value. *//* ... */#defineDM_DMCONTROL_DMACTIVE_OFFSET0#defineDM_DMCONTROL_DMACTIVE_LENGTH1#defineDM_DMCONTROL_DMACTIVE1/* * inactive: The module's state, including authentication mechanism, * takes its reset values (the \FdmDmcontrolDmactive bit is the only bit which can * be written to something other than its reset value). Any accesses * to the module may fail. Specifically, \FdmDmstatusVersion might not return * correct data. *//* ... */#defineDM_DMCONTROL_DMACTIVE_INACTIVE0/* * active: The module functions normally. *//* ... */#defineDM_DMCONTROL_DMACTIVE_ACTIVE1/* * No other mechanism should exist that may result in resetting the * Debug Module after power up. * * To place the Debug Module into a known state, a debugger may write 0 to \FdmDmcontrolDmactive, * poll until \FdmDmcontrolDmactive is observed 0, write 1 to \FdmDmcontrolDmactive, and * poll until \FdmDmcontrolDmactive is observed 1. * * Implementations may pay attention to this bit to further aid * debugging, for example by preventing the Debug Module from being * power gated while debugging is active. *//* ... */#defineDM_HARTINFO0x12/* * Number of {\tt dscratch} registers available for the debugger * to use during program buffer execution, starting from \RcsrDscratchZero. * The debugger can make no assumptions about the contents of these * registers between commands. *//* ... */#defineDM_HARTINFO_NSCRATCH_OFFSET0x14#defineDM_HARTINFO_NSCRATCH_LENGTH4#defineDM_HARTINFO_NSCRATCH0xf00000#defineDM_HARTINFO_DATAACCESS_OFFSET0x10#defineDM_HARTINFO_DATAACCESS_LENGTH1#defineDM_HARTINFO_DATAACCESS0x10000/* * csr: The {\tt data} registers are shadowed in the hart by CSRs. * Each CSR is DXLEN bits in size, and corresponds * to a single argument, per Table~\ref{tab:datareg}. *//* ... */#defineDM_HARTINFO_DATAACCESS_CSR0/* * memory: The {\tt data} registers are shadowed in the hart's memory map. * Each register takes up 4 bytes in the memory map. *//* ... */#defineDM_HARTINFO_DATAACCESS_MEMORY1/* * If \FdmHartinfoDataaccess is 0: Number of CSRs dedicated to * shadowing the {\tt data} registers. * * If \FdmHartinfoDataaccess is 1: Number of 32-bit words in the memory map * dedicated to shadowing the {\tt data} registers. * * If this value is non-zero, then the {tt data} registers must go * beyond being MRs and guarantee they each store a single value, that is * readable/writable by either side. * * Since there are at most 12 {\tt data} registers, the value in this * register must be 12 or smaller. *//* ... */#defineDM_HARTINFO_DATASIZE_OFFSET0xc#defineDM_HARTINFO_DATASIZE_LENGTH4#defineDM_HARTINFO_DATASIZE0xf000/* * If \FdmHartinfoDataaccess is 0: The number of the first CSR dedicated to * shadowing the {\tt data} registers. * * If \FdmHartinfoDataaccess is 1: Address of RAM where the data * registers are shadowed. This address is sign extended giving a * range of -2048 to 2047, easily addressed with a load or store using * \Xzero as the address register. *//* ... */#defineDM_HARTINFO_DATAADDR_OFFSET0#defineDM_HARTINFO_DATAADDR_LENGTH0xc#defineDM_HARTINFO_DATAADDR0xfff#defineDM_HAWINDOWSEL0x14/* * The high bits of this field may be tied to 0, depending on how large * the array mask register is. E.g.\ on a hardware platform with 48 harts only bit 0 * of this field may actually be writable. *//* ... */#defineDM_HAWINDOWSEL_HAWINDOWSEL_OFFSET0#defineDM_HAWINDOWSEL_HAWINDOWSEL_LENGTH0xf#defineDM_HAWINDOWSEL_HAWINDOWSEL0x7fff#defineDM_HAWINDOW0x15#defineDM_HAWINDOW_MASKDATA_OFFSET0#defineDM_HAWINDOW_MASKDATA_LENGTH0x20#defineDM_HAWINDOW_MASKDATA0xffffffffU#defineDM_ABSTRACTCS0x16/* * Size of the Program Buffer, in 32-bit words. Valid sizes are 0 - 16. *//* ... */#defineDM_ABSTRACTCS_PROGBUFSIZE_OFFSET0x18#defineDM_ABSTRACTCS_PROGBUFSIZE_LENGTH5#defineDM_ABSTRACTCS_PROGBUFSIZE0x1f000000#defineDM_ABSTRACTCS_BUSY_OFFSET0xc#defineDM_ABSTRACTCS_BUSY_LENGTH1#defineDM_ABSTRACTCS_BUSY0x1000/* * ready: There is no abstract command currently being executed. *//* ... */#defineDM_ABSTRACTCS_BUSY_READY0/* * busy: An abstract command is currently being executed. *//* ... */#defineDM_ABSTRACTCS_BUSY_BUSY1/* * This bit is set as soon as \RdmCommand is written, and is * not cleared until that command has completed. *//* ... *//* * This optional bit controls whether program buffer and abstract * memory accesses are performed with the exact and full set of * permission checks that apply based on the current architectural * state of the hart performing the access, or with a relaxed set of * permission checks (e.g. PMP restrictions are ignored). The * details of the latter are implementation-specific. When set to 0, * full permissions apply; when set to 1, relaxed permissions apply. *//* ... */#defineDM_ABSTRACTCS_RELAXEDPRIV_OFFSET0xb#defineDM_ABSTRACTCS_RELAXEDPRIV_LENGTH1#defineDM_ABSTRACTCS_RELAXEDPRIV0x800/* * Gets set if an abstract command fails. The bits in this field remain set until * they are cleared by writing 1 to them. No abstract command is * started until the value is reset to 0. * * This field only contains a valid value if \FdmAbstractcsBusy is 0. *//* ... */#defineDM_ABSTRACTCS_CMDERR_OFFSET8#defineDM_ABSTRACTCS_CMDERR_LENGTH3#defineDM_ABSTRACTCS_CMDERR0x700/* * none: No error. *//* ... */#defineDM_ABSTRACTCS_CMDERR_NONE0/* * busy: An abstract command was executing while \RdmCommand, * \RdmAbstractcs, or \RdmAbstractauto was written, or when one * of the {\tt data} or {\tt progbuf} registers was read or written. * This status is only written if \FdmAbstractcsCmderr contains 0. *//* ... */#defineDM_ABSTRACTCS_CMDERR_BUSY1/* * not supported: The command in \RdmCommand is not supported. It * may be supported with different options set, but it will not be * supported at a later time when the hart or system state are * different. *//* ... */#defineDM_ABSTRACTCS_CMDERR_NOT_SUPPORTED2/* * exception: An exception occurred while executing the command * (e.g.\ while executing the Program Buffer). *//* ... */#defineDM_ABSTRACTCS_CMDERR_EXCEPTION3/* * halt/resume: The abstract command couldn't execute because the * hart wasn't in the required state (running/halted), or unavailable. *//* ... */#defineDM_ABSTRACTCS_CMDERR_HALT_RESUME4/* * bus: The abstract command failed due to a bus error (e.g.\ * alignment, access size, or timeout). *//* ... */#defineDM_ABSTRACTCS_CMDERR_BUS5/* * reserved: Reserved for future use. *//* ... */#defineDM_ABSTRACTCS_CMDERR_RESERVED6/* * other: The command failed for another reason. *//* ... */#defineDM_ABSTRACTCS_CMDERR_OTHER7/* * Number of {\tt data} registers that are implemented as part of the * abstract command interface. Valid sizes are 1 -- 12. *//* ... */#defineDM_ABSTRACTCS_DATACOUNT_OFFSET0#defineDM_ABSTRACTCS_DATACOUNT_LENGTH4#defineDM_ABSTRACTCS_DATACOUNT0xf#defineDM_COMMAND0x17/* * The type determines the overall functionality of this * abstract command. *//* ... */#defineDM_COMMAND_CMDTYPE_OFFSET0x18#defineDM_COMMAND_CMDTYPE_LENGTH8#defineDM_COMMAND_CMDTYPE0xff000000U/* * This field is interpreted in a command-specific manner, * described for each abstract command. *//* ... */#defineDM_COMMAND_CONTROL_OFFSET0#defineDM_COMMAND_CONTROL_LENGTH0x18#defineDM_COMMAND_CONTROL0xffffff#defineDM_ABSTRACTAUTO0x18/* * When a bit in this field is 1, read or write accesses to the * corresponding {\tt progbuf} word cause the DM to act as if the * current value in \RdmCommand was written there again after the * access to {\tt progbuf} completes. *//* ... */#defineDM_ABSTRACTAUTO_AUTOEXECPROGBUF_OFFSET0x10#defineDM_ABSTRACTAUTO_AUTOEXECPROGBUF_LENGTH0x10#defineDM_ABSTRACTAUTO_AUTOEXECPROGBUF0xffff0000U/* * When a bit in this field is 1, read or write accesses to the * corresponding {\tt data} word cause the DM to act as if the current * value in \RdmCommand was written there again after the * access to {\tt data} completes. *//* ... */#defineDM_ABSTRACTAUTO_AUTOEXECDATA_OFFSET0#defineDM_ABSTRACTAUTO_AUTOEXECDATA_LENGTH0xc#defineDM_ABSTRACTAUTO_AUTOEXECDATA0xfff#defineDM_CONFSTRPTR00x19#defineDM_CONFSTRPTR0_ADDR_OFFSET0#defineDM_CONFSTRPTR0_ADDR_LENGTH0x20#defineDM_CONFSTRPTR0_ADDR0xffffffffU#defineDM_CONFSTRPTR10x1a#defineDM_CONFSTRPTR1_ADDR_OFFSET0#defineDM_CONFSTRPTR1_ADDR_LENGTH0x20#defineDM_CONFSTRPTR1_ADDR0xffffffffU#defineDM_CONFSTRPTR20x1b#defineDM_CONFSTRPTR2_ADDR_OFFSET0#defineDM_CONFSTRPTR2_ADDR_LENGTH0x20#defineDM_CONFSTRPTR2_ADDR0xffffffffU#defineDM_CONFSTRPTR30x1c#defineDM_CONFSTRPTR3_ADDR_OFFSET0#defineDM_CONFSTRPTR3_ADDR_LENGTH0x20#defineDM_CONFSTRPTR3_ADDR0xffffffffU#defineDM_NEXTDM0x1d#defineDM_NEXTDM_ADDR_OFFSET0#defineDM_NEXTDM_ADDR_LENGTH0x20#defineDM_NEXTDM_ADDR0xffffffffU#defineDM_DATA00x04#defineDM_DATA0_DATA_OFFSET0#defineDM_DATA0_DATA_LENGTH0x20#defineDM_DATA0_DATA0xffffffffU#defineDM_DATA10x05#defineDM_DATA20x06#defineDM_DATA30x07#defineDM_DATA40x08#defineDM_DATA50x09#defineDM_DATA60x0a#defineDM_DATA70x0b#defineDM_DATA80x0c#defineDM_DATA90x0d#defineDM_DATA100x0e#defineDM_DATA110x0f#defineDM_PROGBUF00x20#defineDM_PROGBUF0_DATA_OFFSET0#defineDM_PROGBUF0_DATA_LENGTH0x20#defineDM_PROGBUF0_DATA0xffffffffU#defineDM_PROGBUF10x21#defineDM_PROGBUF20x22#defineDM_PROGBUF30x23#defineDM_PROGBUF40x24#defineDM_PROGBUF50x25#defineDM_PROGBUF60x26#defineDM_PROGBUF70x27#defineDM_PROGBUF80x28#defineDM_PROGBUF90x29#defineDM_PROGBUF100x2a#defineDM_PROGBUF110x2b#defineDM_PROGBUF120x2c#defineDM_PROGBUF130x2d#defineDM_PROGBUF140x2e#defineDM_PROGBUF150x2f#defineDM_AUTHDATA0x30#defineDM_AUTHDATA_DATA_OFFSET0#defineDM_AUTHDATA_DATA_LENGTH0x20#defineDM_AUTHDATA_DATA0xffffffffU#defineDM_DMCS20x32#defineDM_DMCS2_GROUPTYPE_OFFSET0xb#defineDM_DMCS2_GROUPTYPE_LENGTH1#defineDM_DMCS2_GROUPTYPE0x800/* * halt: The remaining fields in this register configure halt groups. *//* ... */#defineDM_DMCS2_GROUPTYPE_HALT0/* * resume: The remaining fields in this register configure resume groups. *//* ... */#defineDM_DMCS2_GROUPTYPE_RESUME1/* * This field contains the currently selected DM external trigger. * * If a non-existent trigger value is written here, the hardware will * change it to a valid one or 0 if no DM external triggers exist. *//* ... */#defineDM_DMCS2_DMEXTTRIGGER_OFFSET7#defineDM_DMCS2_DMEXTTRIGGER_LENGTH4#defineDM_DMCS2_DMEXTTRIGGER0x780/* * When \FdmDmcsTwoHgselect is 0, contains the group of the hart * specified by \Fhartsel. * * When \FdmDmcsTwoHgselect is 1, contains the group of the DM external * trigger selected by \FdmDmcsTwoDmexttrigger. * * The value written to this field is ignored unless \FdmDmcsTwoHgwrite * is also written 1. * * Group numbers are contiguous starting at 0, with the highest number * being implementation-dependent, and possibly different between * different group types. Debuggers should read back this field after * writing to confirm they are using a hart group that is supported. * * If groups aren't implemented, then this entire field is 0. *//* ... */#defineDM_DMCS2_GROUP_OFFSET2#defineDM_DMCS2_GROUP_LENGTH5#defineDM_DMCS2_GROUP0x7c/* * When 1 is written and \FdmDmcsTwoHgselect is 0, for every selected * hart the DM will change its group to the value written to \FdmDmcsTwoGroup, * if the hardware supports that group for that hart. * Implementations may also change the group of a minimal set of * unselected harts in the same way, if that is necessary due to * a hardware limitation. * * When 1 is written and \FdmDmcsTwoHgselect is 1, the DM will change * the group of the DM external trigger selected by \FdmDmcsTwoDmexttrigger * to the value written to \FdmDmcsTwoGroup, if the hardware supports * that group for that trigger. * * Writing 0 has no effect. *//* ... */#defineDM_DMCS2_HGWRITE_OFFSET1#defineDM_DMCS2_HGWRITE_LENGTH1#defineDM_DMCS2_HGWRITE2#defineDM_DMCS2_HGSELECT_OFFSET0#defineDM_DMCS2_HGSELECT_LENGTH1#defineDM_DMCS2_HGSELECT1/* * harts: Operate on harts. *//* ... */#defineDM_DMCS2_HGSELECT_HARTS0/* * triggers: Operate on DM external triggers. *//* ... */#defineDM_DMCS2_HGSELECT_TRIGGERS1/* * If there are no DM external triggers, this field must be tied to 0. *//* ... */#defineDM_HALTSUM00x40#defineDM_HALTSUM0_HALTSUM0_OFFSET0#defineDM_HALTSUM0_HALTSUM0_LENGTH0x20#defineDM_HALTSUM0_HALTSUM00xffffffffU#defineDM_HALTSUM10x13#defineDM_HALTSUM1_HALTSUM1_OFFSET0#defineDM_HALTSUM1_HALTSUM1_LENGTH0x20#defineDM_HALTSUM1_HALTSUM10xffffffffU#defineDM_HALTSUM20x34#defineDM_HALTSUM2_HALTSUM2_OFFSET0#defineDM_HALTSUM2_HALTSUM2_LENGTH0x20#defineDM_HALTSUM2_HALTSUM20xffffffffU#defineDM_HALTSUM30x35#defineDM_HALTSUM3_HALTSUM3_OFFSET0#defineDM_HALTSUM3_HALTSUM3_LENGTH0x20#defineDM_HALTSUM3_HALTSUM30xffffffffU#defineDM_SBCS0x38#defineDM_SBCS_SBVERSION_OFFSET0x1d#defineDM_SBCS_SBVERSION_LENGTH3#defineDM_SBCS_SBVERSION0xe0000000U/* * legacy: The System Bus interface conforms to mainline drafts of this * spec older than 1 January, 2018. *//* ... */#defineDM_SBCS_SBVERSION_LEGACY0/* * 1.0: The System Bus interface conforms to this version of the spec. *//* ... */#defineDM_SBCS_SBVERSION_1_01/* * Other values are reserved for future versions. *//* ... *//* * Set when the debugger attempts to read data while a read is in * progress, or when the debugger initiates a new access while one is * already in progress (while \FdmSbcsSbbusy is set). It remains set until * it's explicitly cleared by the debugger. * * While this field is set, no more system bus accesses can be * initiated by the Debug Module. *//* ... */#defineDM_SBCS_SBBUSYERROR_OFFSET0x16#defineDM_SBCS_SBBUSYERROR_LENGTH1#defineDM_SBCS_SBBUSYERROR0x400000/* * When 1, indicates the system bus master is busy. (Whether the * system bus itself is busy is related, but not the same thing.) This * bit goes high immediately when a read or write is requested for any * reason, and does not go low until the access is fully completed. * * Writes to \RdmSbcs while \FdmSbcsSbbusy is high result in undefined * behavior. A debugger must not write to \RdmSbcs until it reads * \FdmSbcsSbbusy as 0. *//* ... */#defineDM_SBCS_SBBUSY_OFFSET0x15#defineDM_SBCS_SBBUSY_LENGTH1#defineDM_SBCS_SBBUSY0x200000/* * When 1, every write to \RdmSbaddressZero automatically triggers a * system bus read at the new address. *//* ... */#defineDM_SBCS_SBREADONADDR_OFFSET0x14#defineDM_SBCS_SBREADONADDR_LENGTH1#defineDM_SBCS_SBREADONADDR0x100000/* * Select the access size to use for system bus accesses. *//* ... */#defineDM_SBCS_SBACCESS_OFFSET0x11#defineDM_SBCS_SBACCESS_LENGTH3#defineDM_SBCS_SBACCESS0xe0000/* * 8bit: 8-bit *//* ... */#defineDM_SBCS_SBACCESS_8BIT0/* * 16bit: 16-bit *//* ... */#defineDM_SBCS_SBACCESS_16BIT1/* * 32bit: 32-bit *//* ... */#defineDM_SBCS_SBACCESS_32BIT2/* * 64bit: 64-bit *//* ... */#defineDM_SBCS_SBACCESS_64BIT3/* * 128bit: 128-bit *//* ... */#defineDM_SBCS_SBACCESS_128BIT4/* * If \FdmSbcsSbaccess has an unsupported value when the DM starts a bus * access, the access is not performed and \FdmSbcsSberror is set to 4. *//* ... *//* * When 1, {\tt sbaddress} is incremented by the access size (in * bytes) selected in \FdmSbcsSbaccess after every system bus access. *//* ... */#defineDM_SBCS_SBAUTOINCREMENT_OFFSET0x10#defineDM_SBCS_SBAUTOINCREMENT_LENGTH1#defineDM_SBCS_SBAUTOINCREMENT0x10000/* * When 1, every read from \RdmSbdataZero automatically triggers a * system bus read at the (possibly auto-incremented) address. *//* ... */#defineDM_SBCS_SBREADONDATA_OFFSET0xf#defineDM_SBCS_SBREADONDATA_LENGTH1#defineDM_SBCS_SBREADONDATA0x8000/* * When the Debug Module's system bus * master encounters an error, this field gets set. The bits in this * field remain set until they are cleared by writing 1 to them. * While this field is non-zero, no more system bus accesses can be * initiated by the Debug Module. * * An implementation may report ``Other'' (7) for any error condition. *//* ... */#defineDM_SBCS_SBERROR_OFFSET0xc#defineDM_SBCS_SBERROR_LENGTH3#defineDM_SBCS_SBERROR0x7000/* * none: There was no bus error. *//* ... */#defineDM_SBCS_SBERROR_NONE0/* * timeout: There was a timeout. *//* ... */#defineDM_SBCS_SBERROR_TIMEOUT1/* * address: A bad address was accessed. *//* ... */#defineDM_SBCS_SBERROR_ADDRESS2/* * alignment: There was an alignment error. *//* ... */#defineDM_SBCS_SBERROR_ALIGNMENT3/* * size: An access of unsupported size was requested. *//* ... */#defineDM_SBCS_SBERROR_SIZE4/* * other: Other. *//* ... */#defineDM_SBCS_SBERROR_OTHER7/* * Width of system bus addresses in bits. (0 indicates there is no bus * access support.) *//* ... */#defineDM_SBCS_SBASIZE_OFFSET5#defineDM_SBCS_SBASIZE_LENGTH7#defineDM_SBCS_SBASIZE0xfe0/* * 1 when 128-bit system bus accesses are supported. *//* ... */#defineDM_SBCS_SBACCESS128_OFFSET4#defineDM_SBCS_SBACCESS128_LENGTH1#defineDM_SBCS_SBACCESS1280x10/* * 1 when 64-bit system bus accesses are supported. *//* ... */#defineDM_SBCS_SBACCESS64_OFFSET3#defineDM_SBCS_SBACCESS64_LENGTH1#defineDM_SBCS_SBACCESS648/* * 1 when 32-bit system bus accesses are supported. *//* ... */#defineDM_SBCS_SBACCESS32_OFFSET2#defineDM_SBCS_SBACCESS32_LENGTH1#defineDM_SBCS_SBACCESS324/* * 1 when 16-bit system bus accesses are supported. *//* ... */#defineDM_SBCS_SBACCESS16_OFFSET1#defineDM_SBCS_SBACCESS16_LENGTH1#defineDM_SBCS_SBACCESS162/* * 1 when 8-bit system bus accesses are supported. *//* ... */#defineDM_SBCS_SBACCESS8_OFFSET0#defineDM_SBCS_SBACCESS8_LENGTH1#defineDM_SBCS_SBACCESS81#defineDM_SBADDRESS00x39/* * Accesses bits 31:0 of the physical address in {\tt sbaddress}. *//* ... */#defineDM_SBADDRESS0_ADDRESS_OFFSET0#defineDM_SBADDRESS0_ADDRESS_LENGTH0x20#defineDM_SBADDRESS0_ADDRESS0xffffffffU#defineDM_SBADDRESS10x3a/* * Accesses bits 63:32 of the physical address in {\tt sbaddress} (if * the system address bus is that wide). *//* ... */#defineDM_SBADDRESS1_ADDRESS_OFFSET0#defineDM_SBADDRESS1_ADDRESS_LENGTH0x20#defineDM_SBADDRESS1_ADDRESS0xffffffffU#defineDM_SBADDRESS20x3b/* * Accesses bits 95:64 of the physical address in {\tt sbaddress} (if * the system address bus is that wide). *//* ... */#defineDM_SBADDRESS2_ADDRESS_OFFSET0#defineDM_SBADDRESS2_ADDRESS_LENGTH0x20#defineDM_SBADDRESS2_ADDRESS0xffffffffU#defineDM_SBADDRESS30x37/* * Accesses bits 127:96 of the physical address in {\tt sbaddress} (if * the system address bus is that wide). *//* ... */#defineDM_SBADDRESS3_ADDRESS_OFFSET0#defineDM_SBADDRESS3_ADDRESS_LENGTH0x20#defineDM_SBADDRESS3_ADDRESS0xffffffffU#defineDM_SBDATA00x3c/* * Accesses bits 31:0 of {\tt sbdata}. *//* ... */#defineDM_SBDATA0_DATA_OFFSET0#defineDM_SBDATA0_DATA_LENGTH0x20#defineDM_SBDATA0_DATA0xffffffffU#defineDM_SBDATA10x3d/* * Accesses bits 63:32 of {\tt sbdata} (if the system bus is that * wide). *//* ... */#defineDM_SBDATA1_DATA_OFFSET0#defineDM_SBDATA1_DATA_LENGTH0x20#defineDM_SBDATA1_DATA0xffffffffU#defineDM_SBDATA20x3e/* * Accesses bits 95:64 of {\tt sbdata} (if the system bus is that * wide). *//* ... */#defineDM_SBDATA2_DATA_OFFSET0#defineDM_SBDATA2_DATA_LENGTH0x20#defineDM_SBDATA2_DATA0xffffffffU#defineDM_SBDATA30x3f/* * Accesses bits 127:96 of {\tt sbdata} (if the system bus is that * wide). *//* ... */#defineDM_SBDATA3_DATA_OFFSET0#defineDM_SBDATA3_DATA_LENGTH0x20#defineDM_SBDATA3_DATA0xffffffffU#defineDM_CUSTOM0x1f#defineDM_CUSTOM00x70#defineDM_CUSTOM10x71#defineDM_CUSTOM20x72#defineDM_CUSTOM30x73#defineDM_CUSTOM40x74#defineDM_CUSTOM50x75#defineDM_CUSTOM60x76#defineDM_CUSTOM70x77#defineDM_CUSTOM80x78#defineDM_CUSTOM90x79#defineDM_CUSTOM100x7a#defineDM_CUSTOM110x7b#defineDM_CUSTOM120x7c#defineDM_CUSTOM130x7d#defineDM_CUSTOM140x7e#defineDM_CUSTOM150x7f#defineSHORTNAME0x123/* * Description of what this field is used for. *//* ... */#defineSHORTNAME_FIELD_OFFSET0#defineSHORTNAME_FIELD_LENGTH8#defineSHORTNAME_FIELD0xff/* * This is 0 to indicate Access Register Command. *//* ... */#defineAC_ACCESS_REGISTER_CMDTYPE_OFFSET0x18#defineAC_ACCESS_REGISTER_CMDTYPE_LENGTH8#defineAC_ACCESS_REGISTER_CMDTYPE0xff000000U#defineAC_ACCESS_REGISTER_AARSIZE_OFFSET0x14#defineAC_ACCESS_REGISTER_AARSIZE_LENGTH3#defineAC_ACCESS_REGISTER_AARSIZE0x700000/* * 32bit: Access the lowest 32 bits of the register. *//* ... */#defineAC_ACCESS_REGISTER_AARSIZE_32BIT2/* * 64bit: Access the lowest 64 bits of the register. *//* ... */#defineAC_ACCESS_REGISTER_AARSIZE_64BIT3/* * 128bit: Access the lowest 128 bits of the register. *//* ... */#defineAC_ACCESS_REGISTER_AARSIZE_128BIT4/* * If \FacAccessregisterAarsize specifies a size larger than the register's actual size, * then the access must fail. If a register is accessible, then reads of \FacAccessregisterAarsize * less than or equal to the register's actual size must be supported. * Writing less than the full register may be supported, but what * happens to the high bits in that case is \unspecified. * * This field controls the Argument Width as referenced in * Table~\ref{tab:datareg}. *//* ... */#defineAC_ACCESS_REGISTER_AARPOSTINCREMENT_OFFSET0x13#defineAC_ACCESS_REGISTER_AARPOSTINCREMENT_LENGTH1#defineAC_ACCESS_REGISTER_AARPOSTINCREMENT0x80000/* * disabled: No effect. This variant must be supported. *//* ... */#defineAC_ACCESS_REGISTER_AARPOSTINCREMENT_DISABLED0/* * enabled: After a successful register access, \FacAccessregisterRegno is * incremented. Incrementing past the highest supported value * causes \FacAccessregisterRegno to become \unspecified. Supporting * this variant is optional. It is undefined whether the increment * happens when \FacAccessregisterTransfer is 0. *//* ... */#defineAC_ACCESS_REGISTER_AARPOSTINCREMENT_ENABLED1#defineAC_ACCESS_REGISTER_POSTEXEC_OFFSET0x12#defineAC_ACCESS_REGISTER_POSTEXEC_LENGTH1#defineAC_ACCESS_REGISTER_POSTEXEC0x40000/* * disabled: No effect. This variant must be supported, and is the only * supported one if \FdmAbstractcsProgbufsize is 0. *//* ... */#defineAC_ACCESS_REGISTER_POSTEXEC_DISABLED0/* * enabled: Execute the program in the Program Buffer exactly once after * performing the transfer, if any. Supporting this variant is * optional. *//* ... */#defineAC_ACCESS_REGISTER_POSTEXEC_ENABLED1#defineAC_ACCESS_REGISTER_TRANSFER_OFFSET0x11#defineAC_ACCESS_REGISTER_TRANSFER_LENGTH1#defineAC_ACCESS_REGISTER_TRANSFER0x20000/* * disabled: Don't do the operation specified by \FacAccessregisterWrite. *//* ... */#defineAC_ACCESS_REGISTER_TRANSFER_DISABLED0/* * enabled: Do the operation specified by \FacAccessregisterWrite. *//* ... */#defineAC_ACCESS_REGISTER_TRANSFER_ENABLED1/* * This bit can be used to just execute the Program Buffer without * having to worry about placing valid values into \FacAccessregisterAarsize or \FacAccessregisterRegno. *//* ... *//* * When \FacAccessregisterTransfer is set: *//* ... */#defineAC_ACCESS_REGISTER_WRITE_OFFSET0x10#defineAC_ACCESS_REGISTER_WRITE_LENGTH1#defineAC_ACCESS_REGISTER_WRITE0x10000/* * arg0: Copy data from the specified register into {\tt arg0} portion * of {\tt data}. *//* ... */#defineAC_ACCESS_REGISTER_WRITE_ARG00/* * register: Copy data from {\tt arg0} portion of {\tt data} into the * specified register. *//* ... */#defineAC_ACCESS_REGISTER_WRITE_REGISTER1/* * Number of the register to access, as described in * Table~\ref{tab:regno}. * \RcsrDpc may be used as an alias for PC if this command is * supported on a non-halted hart. *//* ... */#defineAC_ACCESS_REGISTER_REGNO_OFFSET0#defineAC_ACCESS_REGISTER_REGNO_LENGTH0x10#defineAC_ACCESS_REGISTER_REGNO0xffff/* * This is 1 to indicate Quick Access command. *//* ... */#defineAC_QUICK_ACCESS_CMDTYPE_OFFSET0x18#defineAC_QUICK_ACCESS_CMDTYPE_LENGTH8#defineAC_QUICK_ACCESS_CMDTYPE0xff000000U/* * This is 2 to indicate Access Memory Command. *//* ... */#defineAC_ACCESS_MEMORY_CMDTYPE_OFFSET0x18#defineAC_ACCESS_MEMORY_CMDTYPE_LENGTH8#defineAC_ACCESS_MEMORY_CMDTYPE0xff000000U/* * An implementation does not have to implement both virtual and * physical accesses, but it must fail accesses that it doesn't * support. *//* ... */#defineAC_ACCESS_MEMORY_AAMVIRTUAL_OFFSET0x17#defineAC_ACCESS_MEMORY_AAMVIRTUAL_LENGTH1#defineAC_ACCESS_MEMORY_AAMVIRTUAL0x800000/* * physical: Addresses are physical (to the hart they are performed on). *//* ... */#defineAC_ACCESS_MEMORY_AAMVIRTUAL_PHYSICAL0/* * virtual: Addresses are virtual, and translated the way they would be from * M-mode, with \FcsrMstatusMprv set. *//* ... */#defineAC_ACCESS_MEMORY_AAMVIRTUAL_VIRTUAL1/* * Debug Modules on systems without address translation (i.e. virtual addresses equal physical) * may optionally allow \FacAccessmemoryAamvirtual set to 1, which would produce the same result as * that same abstract command with \FacAccessmemoryAamvirtual cleared. *//* ... */#defineAC_ACCESS_MEMORY_AAMSIZE_OFFSET0x14#defineAC_ACCESS_MEMORY_AAMSIZE_LENGTH3#defineAC_ACCESS_MEMORY_AAMSIZE0x700000/* * 8bit: Access the lowest 8 bits of the memory location. *//* ... */#defineAC_ACCESS_MEMORY_AAMSIZE_8BIT0/* * 16bit: Access the lowest 16 bits of the memory location. *//* ... */#defineAC_ACCESS_MEMORY_AAMSIZE_16BIT1/* * 32bit: Access the lowest 32 bits of the memory location. *//* ... */#defineAC_ACCESS_MEMORY_AAMSIZE_32BIT2/* * 64bit: Access the lowest 64 bits of the memory location. *//* ... */#defineAC_ACCESS_MEMORY_AAMSIZE_64BIT3/* * 128bit: Access the lowest 128 bits of the memory location. *//* ... */#defineAC_ACCESS_MEMORY_AAMSIZE_128BIT4/* * After a memory access has completed, if this bit is 1, increment * {\tt arg1} (which contains the address used) by the number of bytes * encoded in \FacAccessmemoryAamsize. * * Supporting this variant is optional, but highly recommended for * performance reasons. *//* ... */#defineAC_ACCESS_MEMORY_AAMPOSTINCREMENT_OFFSET0x13#defineAC_ACCESS_MEMORY_AAMPOSTINCREMENT_LENGTH1#defineAC_ACCESS_MEMORY_AAMPOSTINCREMENT0x80000#defineAC_ACCESS_MEMORY_WRITE_OFFSET0x10#defineAC_ACCESS_MEMORY_WRITE_LENGTH1#defineAC_ACCESS_MEMORY_WRITE0x10000/* * arg0: Copy data from the memory location specified in {\tt arg1} into * the low bits of {\tt arg0}. The value of the remaining bits of * {\tt arg0} are \unspecified. *//* ... */#defineAC_ACCESS_MEMORY_WRITE_ARG00/* * memory: Copy data from the low bits of {\tt arg0} into the memory * location specified in {\tt arg1}. *//* ... */#defineAC_ACCESS_MEMORY_WRITE_MEMORY1/* * These bits are reserved for target-specific uses. *//* ... */#defineAC_ACCESS_MEMORY_TARGET_SPECIFIC_OFFSET0xe#defineAC_ACCESS_MEMORY_TARGET_SPECIFIC_LENGTH2#defineAC_ACCESS_MEMORY_TARGET_SPECIFIC0xc000#defineVIRT_PRIVvirtual/* * Contains the virtualization mode the hart was operating in when Debug * Mode was entered. The encoding is described in Table \ref{tab:privmode}, * and matches the virtualization mode encoding from the Privileged Spec. * A user can write this value to change the hart's virtualization mode * when exiting Debug Mode. *//* ... */#defineVIRT_PRIV_V_OFFSET2#defineVIRT_PRIV_V_LENGTH1#defineVIRT_PRIV_V4/* * Contains the privilege mode the hart was operating in when Debug * Mode was entered. The encoding is described in Table * \ref{tab:privmode}, and matches the privilege mode encoding from * the Privileged Spec. A user can write this * value to change the hart's privilege mode when exiting Debug Mode. *//* ... */#defineVIRT_PRIV_PRV_OFFSET0#defineVIRT_PRIV_PRV_LENGTH2#defineVIRT_PRIV_PRV3#defineDMI_SERCS0x34/* * Number of supported serial ports. *//* ... */#defineDMI_SERCS_SERIALCOUNT_OFFSET0x1c#defineDMI_SERCS_SERIALCOUNT_LENGTH4#defineDMI_SERCS_SERIALCOUNT0xf0000000U/* * Select which serial port is accessed by \RdmiSerrx and \RdmiSertx. *//* ... */#defineDMI_SERCS_SERIAL_OFFSET0x18#defineDMI_SERCS_SERIAL_LENGTH3#defineDMI_SERCS_SERIAL0x7000000#defineDMI_SERCS_ERROR7_OFFSET0x17#defineDMI_SERCS_ERROR7_LENGTH1#defineDMI_SERCS_ERROR70x800000#defineDMI_SERCS_VALID7_OFFSET0x16#defineDMI_SERCS_VALID7_LENGTH1#defineDMI_SERCS_VALID70x400000#defineDMI_SERCS_FULL7_OFFSET0x15#defineDMI_SERCS_FULL7_LENGTH1#defineDMI_SERCS_FULL70x200000#defineDMI_SERCS_ERROR6_OFFSET0x14#defineDMI_SERCS_ERROR6_LENGTH1#defineDMI_SERCS_ERROR60x100000#defineDMI_SERCS_VALID6_OFFSET0x13#defineDMI_SERCS_VALID6_LENGTH1#defineDMI_SERCS_VALID60x80000#defineDMI_SERCS_FULL6_OFFSET0x12#defineDMI_SERCS_FULL6_LENGTH1#defineDMI_SERCS_FULL60x40000#defineDMI_SERCS_ERROR5_OFFSET0x11#defineDMI_SERCS_ERROR5_LENGTH1#defineDMI_SERCS_ERROR50x20000#defineDMI_SERCS_VALID5_OFFSET0x10#defineDMI_SERCS_VALID5_LENGTH1#defineDMI_SERCS_VALID50x10000#defineDMI_SERCS_FULL5_OFFSET0xf#defineDMI_SERCS_FULL5_LENGTH1#defineDMI_SERCS_FULL50x8000#defineDMI_SERCS_ERROR4_OFFSET0xe#defineDMI_SERCS_ERROR4_LENGTH1#defineDMI_SERCS_ERROR40x4000#defineDMI_SERCS_VALID4_OFFSET0xd#defineDMI_SERCS_VALID4_LENGTH1#defineDMI_SERCS_VALID40x2000#defineDMI_SERCS_FULL4_OFFSET0xc#defineDMI_SERCS_FULL4_LENGTH1#defineDMI_SERCS_FULL40x1000#defineDMI_SERCS_ERROR3_OFFSET0xb#defineDMI_SERCS_ERROR3_LENGTH1#defineDMI_SERCS_ERROR30x800#defineDMI_SERCS_VALID3_OFFSET0xa#defineDMI_SERCS_VALID3_LENGTH1#defineDMI_SERCS_VALID30x400#defineDMI_SERCS_FULL3_OFFSET9#defineDMI_SERCS_FULL3_LENGTH1#defineDMI_SERCS_FULL30x200#defineDMI_SERCS_ERROR2_OFFSET8#defineDMI_SERCS_ERROR2_LENGTH1#defineDMI_SERCS_ERROR20x100#defineDMI_SERCS_VALID2_OFFSET7#defineDMI_SERCS_VALID2_LENGTH1#defineDMI_SERCS_VALID20x80#defineDMI_SERCS_FULL2_OFFSET6#defineDMI_SERCS_FULL2_LENGTH1#defineDMI_SERCS_FULL20x40#defineDMI_SERCS_ERROR1_OFFSET5#defineDMI_SERCS_ERROR1_LENGTH1#defineDMI_SERCS_ERROR10x20#defineDMI_SERCS_VALID1_OFFSET4#defineDMI_SERCS_VALID1_LENGTH1#defineDMI_SERCS_VALID10x10#defineDMI_SERCS_FULL1_OFFSET3#defineDMI_SERCS_FULL1_LENGTH1#defineDMI_SERCS_FULL18/* * 1 when the debugger-to-core queue for serial port 0 has * over or underflowed. This bit will remain set until it is reset by * writing 1 to this bit. *//* ... */#defineDMI_SERCS_ERROR0_OFFSET2#defineDMI_SERCS_ERROR0_LENGTH1#defineDMI_SERCS_ERROR04/* * 1 when the core-to-debugger queue for serial port 0 is not empty. *//* ... */#defineDMI_SERCS_VALID0_OFFSET1#defineDMI_SERCS_VALID0_LENGTH1#defineDMI_SERCS_VALID02/* * 1 when the debugger-to-core queue for serial port 0 is full. *//* ... */#defineDMI_SERCS_FULL0_OFFSET0#defineDMI_SERCS_FULL0_LENGTH1#defineDMI_SERCS_FULL01#defineDMI_SERTX0x35#defineDMI_SERTX_DATA_OFFSET0#defineDMI_SERTX_DATA_LENGTH0x20#defineDMI_SERTX_DATA0xffffffffU#defineDMI_SERRX0x36#defineDMI_SERRX_DATA_OFFSET0#defineDMI_SERRX_DATA_LENGTH0x20#defineDMI_SERRX_DATA0xffffffffU
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
Click anywhere in the source to view detailed information here...