Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'docs/TCF Service - Registers.html')
-rw-r--r--docs/TCF Service - Registers.html154
1 files changed, 77 insertions, 77 deletions
diff --git a/docs/TCF Service - Registers.html b/docs/TCF Service - Registers.html
index 11892d390..d94a6da53 100644
--- a/docs/TCF Service - Registers.html
+++ b/docs/TCF Service - Registers.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Registers</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -67,11 +67,11 @@ multiple locations. This allows:
<li> to specify offset and size for get/set on large register groups
<li> to get/set truncated register values, e.g. only the low 32 bits of a 64-bit register
</ol>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -79,13 +79,13 @@ C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getContext &bull; <i>&lt;s
<p>The command retrieves context info for given context ID. A context corresponds to an
register, register group, register bit field, etc. Exact meaning of a context depends on the target.
Target agent should define contexts hierarchy that is:</p>
-
+
<ul type='disc'>
<li>Adequately reflects target hardware registers layout;
<li>Consistent with the lingo/terminology of the processor manuals;
<li>Intuitive to a user.
</ul>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -165,7 +165,7 @@ Service sends contextChanged event to notify changes in context data.</p>
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;named values list&gt;</i> ]
-
+
<i>&lt;named values list&gt;</i>
&rArr; <i>&lt;object: named value properties&gt;</i>
&rArr; <i>&lt;named values list&gt;</i> , <i>&lt;object: named value properties&gt;</i>
@@ -218,20 +218,20 @@ Service sends contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for registers access commands.</p>
-
+
<p>Parent context ID is usually a thread ID retrieved through Run Control Service or one
of context IDs retrieved by previous getChildren commands.
Contexts hierarchy can be simple plain list of registers, or it can form a tree of register groups, registers and bit fields.
It is up to target agent developers to choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -239,7 +239,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -247,16 +247,16 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
</font></b></pre>
<h3><a name='CmdSetRegister'>Set Register</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; set &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
<p>Writes value into given register context. Context ID must be one returned by getContexts.
Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -265,16 +265,16 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
of error.</p>
<h3><a name='CmdGetRegister'>Get Register</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; get &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>Reads register value from given register context. Context ID must be one returned by getContexts.
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
@@ -283,7 +283,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;s
of error. Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.</p>
<h3><a name='CmdSetMultiple'>Set Multiple Registers</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locations&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
@@ -293,7 +293,7 @@ C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locat
<i>&lt;location list&gt;</i>
&rArr; <i>&lt;location&gt;</i>
&rArr; <i>&lt;location list&gt;</i> , <i>&lt;location&gt;</i>
-
+
<i>&lt;location&gt;</i>
&rArr; [ <i>&lt;string: register context ID&gt;</i> , <i>&lt;int: offset in bytes&gt;</i> , <i>&lt;int: size in bytes&gt;</i> ]
</font></b></pre>
@@ -301,9 +301,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locat
<p>Writes value into given list of locations in registers. Each location is represented by 3-element array that consists of
context ID, offset in the context in bytes and value size in bytes.
Value is BASE64 encoded byte array of binary data. Byte array size should match the sum of location sizes.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -312,7 +312,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
of error.</p>
<h3><a name='CmdGetMultiple'>Get Multiple Registers</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locations&gt;</i> &bull;
@@ -322,7 +322,7 @@ C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locat
<i>&lt;location list&gt;</i>
&rArr; <i>&lt;location&gt;</i>
&rArr; <i>&lt;location list&gt;</i> , <i>&lt;location&gt;</i>
-
+
<i>&lt;location&gt;</i>
&rArr; [ <i>&lt;string: register context ID&gt;</i> , <i>&lt;int: offset in bytes&gt;</i> , <i>&lt;int: size in bytes&gt;</i> ]
</font></b></pre>
@@ -330,9 +330,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locat
<p>Reads register values from given list of locations in registers. Each location is represented by 3-element array that consists of
context ID, offset in the context in bytes and value size in bytes.
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
@@ -341,12 +341,12 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;s
of error. Value is BASE64 encoded byte array of binary data. Byte array size should match the sum of location sizes.</p>
<h3><a name='CmdSearch'>Search for Registers</a></h3>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
C &bull; &lt;token&gt; &bull; Registers &bull; search &bull; <i>&lt;string: start context ID&gt; &bull; &lt;object:filter properties&gt;</i> &bull;
</font></b></pre>
-<p>Search returns a path to each context with properties matching the filter. A path consists of a list of
+<p>Search returns a path to each context with properties matching the filter. A path consists of a list of
context ids starting with a direct child of the start context up to the found context.
Search is only supported for properties listed in the CanSearch property.
@@ -360,9 +360,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; search &bull; <i>&lt;string: star
</li>
</ul>
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context Paths&gt;</i> &bull;
@@ -370,7 +370,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context Path list&gt;</i> ]
-
+
<i>&lt;context Path list&gt;</i>
&rArr; <i>&lt;array of context IDs&gt;</i>
&rArr; <i>&lt;context Path list&gt;</i> , <i>&lt;array of context IDs&gt;</i>
@@ -404,17 +404,17 @@ R &bull; "1235" &bull; [["ID_G0"]] &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Registers service broadcasts notification events when registers contexts are changed, and when
a register content is altered by "set" commands.</p>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
E &bull; Registers &bull; contextChanged &bull;
E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* IRegisters service provides access to target CPU register values and properties.
@@ -449,7 +449,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
PROP_MEMORY_CONTEXT = "MemoryContext", <font color=#3F5FBF>/** String, the context ID of a memory context in which a memory mapped register is located */</font>
PROP_CAN_SEARCH = "CanSearch", <font color=#3F5FBF>/** Array of String, a list of attribute names which can be searched for starting on this context */</font>
PROP_ROLE = "Role"; <font color=#3F5FBF>/** String, the role the register plays in a program execution */</font>
-
+
<font color=#3F5FBF>/**
* Role property names.
*/</font>
@@ -459,7 +459,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
ROLE_FP = "FP", <font color=#3F5FBF>/** Register defining the current frame pointer location */</font>
ROLE_RET = "RET", <font color=#3F5FBF>/** Register used to store the return address for calls */</font>
ROLE_CORE = "CORE"; <font color=#3F5FBF>/** Indicates register or register groups which belong to the core state */</font>
-
+
<font color=#3F5FBF>/**
* Filter property names.
*/</font>
@@ -470,8 +470,8 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -497,7 +497,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -516,9 +516,9 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
- * RegistersContext objects represent register groups, registers and bit fields.
+ * RegistersContext objects represent register groups, registers and bit fields.
*/</font>
<font color=#7F0055>interface</font> RegistersContext {
<font color=#3F5FBF>/**
@@ -526,25 +526,25 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent context ID.
*/</font>
String getParentID();
-
+
<font color=#3F5FBF>/**
* Get context (register, register group, bit field) name.
* <font color=#7F9FBF>@return</font> context name.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get context description.
* <font color=#7F9FBF>@return</font> context description.
*/</font>
String getDescription();
-
+
<font color=#3F5FBF>/**
* Get context size in bytes.
* Byte arrays in get()/set() methods should be same size.
@@ -554,57 +554,57 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* @return context size in bytes.
*/</font>
<font color=#7F0055>int</font> getSize();
-
+
<font color=#3F5FBF>/**
* Check if context value can be read.
* <font color=#7F9FBF>@return</font> true if can read value of the context.
*/</font>
<font color=#7F0055>boolean</font> isReadable();
-
+
<font color=#3F5FBF>/**
* Check if reading the context (register) destroys its current value -
* it can be read only once.
* <font color=#7F9FBF>@return</font> true if read-once register.
*/</font>
<font color=#7F0055>boolean</font> isReadOnce();
-
+
<font color=#3F5FBF>/**
* Check if context value can be written.
* <font color=#7F9FBF>@return</font> true if can write value of the context.
*/</font>
<font color=#7F0055>boolean</font> isWriteable();
-
+
<font color=#3F5FBF>/**
* Check if register value can not be overwritten - every write counts.
* <font color=#7F9FBF>@return</font> true if write-once register.
*/</font>
<font color=#7F0055>boolean</font> isWriteOnce();
-
+
<font color=#3F5FBF>/**
- * Check if writing the context can change values of other registers.
+ * Check if writing the context can change values of other registers.
* <font color=#7F9FBF>@return</font> true if has side effects.
*/</font>
<font color=#7F0055>boolean</font> hasSideEffects();
-
+
<font color=#3F5FBF>/**
* Check if the register value can change even when target is stopped.
* <font color=#7F9FBF>@return</font> true if the register value can change at any time.
*/</font>
<font color=#7F0055>boolean</font> isVolatile();
-
+
<font color=#3F5FBF>/**
* Check if the register value is a floating-point value.
* <font color=#7F9FBF>@return</font> true if a floating-point register.
*/</font>
<font color=#7F0055>boolean</font> isFloat();
-
+
<font color=#3F5FBF>/**
* Check endianess of the context.
- * Big endian means decreasing numeric significance with increasing bit number.
+ * Big endian means decreasing numeric significance with increasing bit number.
* <font color=#7F9FBF>@return</font> true if big endian.
*/</font>
<font color=#7F0055>boolean</font> isBigEndian();
-
+
<font color=#3F5FBF>/**
* Check if the lowest numbered bit (i.e. bit #0 or bit #1 depending on
* getFirstBitNumber() value) should be shown to user as the left-most bit or
@@ -612,45 +612,45 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> true if the first bit is left-most bit.
*/</font>
<font color=#7F0055>boolean</font> isLeftToRight();
-
+
<font color=#3F5FBF>/**
* If the context has bit field children, bit positions of the fields
* can be zero-based or 1-based.
* <font color=#7F9FBF>@return</font> first bit position - 0 or 1.
*/</font>
<font color=#7F0055>int</font> getFirstBitNumber();
-
+
<font color=#3F5FBF>/**
- * If context is a bit field, get the field bit numbers in parent context.
+ * If context is a bit field, get the field bit numbers in parent context.
* <font color=#7F9FBF>@return</font> array of bit numbers.
*/</font>
<font color=#7F0055>int</font>[] getBitNumbers();
-
+
<font color=#3F5FBF>/**
* A context can have predefined names (mnemonics) for some its values.
* This method returns a list of such named values.
* <font color=#7F9FBF>@return</font> array of named values or null.
*/</font>
NamedValue[] getNamedValues();
-
+
<font color=#3F5FBF>/**
* Get the address of a memory mapped register.
* <font color=#7F9FBF>@return</font> address.
*/</font>
Number getMemoryAddress();
-
+
<font color=#3F5FBF>/**
- * Get the context ID of a memory context in which a memory mapped register is located.
+ * Get the context ID of a memory context in which a memory mapped register is located.
* <font color=#7F9FBF>@return</font> memory context ID.
*/</font>
String getMemoryContext();
-
+
<font color=#3F5FBF>/**
* Get a list of property names which can be searched for starting on this context
* <font color=#7F9FBF>@return</font> collection of property names.
*/</font>
Collection<String> canSearch();
-
+
<font color=#3F5FBF>/**
* Get the role the register plays in a program execution.
* <font color=#7F9FBF>@return</font> role name.
@@ -662,14 +662,14 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> map of all available context properties.
*/</font>
Map<String,Object> getProperties();
-
+
<font color=#3F5FBF>/**
* Read value of the context.
* <font color=#7F9FBF>@param</font> done - call back object.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken get(DoneGet done);
-
+
<font color=#3F5FBF>/**
* Set value of the context.
* <font color=#7F9FBF>@param</font> value - value to write into the context.
@@ -690,7 +690,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* A register context can have predefined names (mnemonics) for some its values.
- * NamedValue objects represent such values.
+ * NamedValue objects represent such values.
*/</font>
<font color=#7F0055>interface</font> NamedValue {
<font color=#3F5FBF>/**
@@ -698,20 +698,20 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> the value as an array of bytes.
*/</font>
byte[] getValue();
-
+
<font color=#3F5FBF>/**
* Get name (mnemonic) of the value.
* <font color=#7F9FBF>@return</font> value name.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get human readable description of the value.
* <font color=#7F9FBF>@return</font> value description.
*/</font>
String getDescription();
}
-
+
<font color=#3F5FBF>/**
* Read values of multiple locations in registers.
* <font color=#7F9FBF>@param</font> locs - array of data locations.
@@ -719,7 +719,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken getm(Location[] locs, DoneGet done);
-
+
<font color=#3F5FBF>/**
* Set values of multiple locations in registers.
* <font color=#7F9FBF>@param</font> locs - array of data locations.
@@ -734,7 +734,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>final class</font> Location {
<font color=#3F5FBF>/** Register context ID */</font>
- <font color=#7F0055>public final</font> String id;
+ <font color=#7F0055>public final</font> String id;
<font color=#3F5FBF>/** offset in the context, in bytes */</font>
<font color=#7F0055>public final int</font> offs;
@@ -761,7 +761,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>void</font> doneGet(IToken token, Exception error, byte[] value);
}
-
+
<font color=#3F5FBF>/**
* 'set' command call back interface.
*/</font>
@@ -801,7 +801,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/</font>
<font color=#7F0055>interface</font> RegistersListener {
@@ -810,12 +810,12 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* Most targets have static set of registers and register properties.
* Such targets never generate this event. However, some targets,
* for example, JTAG probes, allow user to modify register definitions.
- * Clients should flush all cached register context data.
+ * Clients should flush all cached register context data.
*/</font>
<font color=#7F0055>void</font> contextChanged();
<font color=#3F5FBF>/**
- * Called when register content was changed and clients
+ * Called when register content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached registers data.
* Not every change is notified - it is not possible,

Back to the top