[WIP] Bare-metal register browsing

Vladimir Prus vladimir.prus@gmail.com
Wed Jun 3 19:49:00 GMT 2015


On 6/2/2015 4:00 PM, Yao Qi wrote:
> Vladimir Prus <vladimir.prus@gmail.com> writes:
>
>> 	<space annex="memory" name="io">
>> 	<group name="UART2">
>> 	<reg bitsize="32" name="UART2CTL" offset="0x4000e030" read-sensitive="no" save-restore="yes" type="UART0_UART0CTL"/>
>> 	<reg bitsize="32" name="UART2LTIM" offset="0x4000e098" read-sensitive="no" save-restore="yes" type="UART0_UART0LTIM"/>
>> 	</group>
>> 	<group name="UART3">
>> 	size="32" name="UART3CTL" offset="0x4000f030" read-sensitive="no" save-restore="yes" type="UART0_UART0CTL"/>
>> 	<reg bitsize="32" name="UART3LTIM" offset="0x4000f098" read-sensitive="no" save-restore="yes" type="UART0_UART0LTIM"/>
>> 	</group>
>
> It is good to have a "group" element, so that we can easily define a
> group of registers.  However, what is the usefulness of element "space"?
> to define a group of "group" elements?

The original motivation was to indicate that particular set of registers are not usual registers, and must
be accessed in a different way. It's not strictly necessary, we can rewrite the above as:

    <group name="io" target-object="spaces" annex="memory">
	<group name="UART2">
		<reg offset="0x4000e030" .../>
         </group>
    </group>

Maybe my patch can be modified to not introduce a new target object, after all. We can use:

    <group name="io" target-object="memory">
	<group name="UART2">
		<reg offset="0x4000e030" .../>
         </group>
    </group>

to describe memory-mapped io registers.

It sounds like this should be possible to implement. What do you think?

Two questions:

- Is 'group' ok, or 'register-group' would be more clear? We found that the size of these XML
files can be sometimes a problem

- I'd propose that 'target-object' and 'annex' attribute are only allowed for top-level 'group' element,
   and not for top-level 'reg' or nested 'group' element, to make implementation simpler. Is that fine?

Thanks,
Volodya




More information about the Gdb-patches mailing list