Ambiguous requirement about dmcontrol behavior when dmcontrol.dmactive==0
JanMatCodasip opened this issue · 2 comments
The debug spec says the following about the dmcontrol
register when dmcontrol.dmactive==0
:
0 (inactive): The module’s state, including authentication mechanism,
takes its reset values (the dmactive bit is the only bit which can be written to something other than its reset value).
I believe the sentence the dmactive bit is the only bit which can be written to something other than its reset value
can be interpreted in two ways - as a requirement for the external debugger vs. requirement for the debug module (DM):
-
- The external debugger must not attempt to write any bit of dmcontrol (or other DM register), apart from dmcontrol.dmactive, to any other value than the reset value.
-
- The DM must not allow any bit of dmcontrol or other register, apart from dmcontrol.dmactive, to be written to a non-reset value by the external debugger. That is, all the register bits become read only and have the reset value.
I believe that authors of the spec intended the variant 2), but please correct me if that is incorrect assumption.
In any case, I would recommend to clarify this sentence in a future version of the debug spec.
Everything in the DM is held in reset except for the dmactive bit itself. Because the DM is in reset, it must not allow any state to contain the non-reset value (which is your second variant). The very next sentence says "Any accesses to the module may fail" which means that the external debugger shouldn't be doing any writes at all (of any values, including the reset values).
@pdonahue-ventana, thank you for the clarification.