[Open SoC Debug] CDM: Next Steps

Philipp Wagner philipp.wagner at tum.de
Fri Jun 15 13:42:29 CEST 2018


Hi Shivam,

On 06/15/2018 01:28 PM, SHIVAM AGGARWAL wrote:
> As per my understanding, the complete software side in OSD should be 
> something like this:
> https://pasteboard.co/HpZezKd.png

That looks roughly correct, yes.

> The OSD-GDB server will be responsible for communication between GDB and 
> OSD-GDB
> server via TCP port using RSP protocol.
> 
> The major differences (as per my understanding) between the 
> implementation of gdbserver in
> openOCD and OSD system:
> 
> 1. The bridge program uses the hardware drivers to send the translated 
> commands to the
> target system via an external JTAG cable in case of openOCD. We don’t 
> need to support
> JTAG or any other communication medium in the OSD-GDB server.
> This part is handled by GLIP and osd-device gateway.

Exactly.

> 2. There are 2 data areas that are manipulated by GDB:
> 
>   * Main memory. A uniform address space with 32-bit addressing.
>     Provision for separate or unified instruction and data and
>     instruction caches. Provision for separate or unified, 1 or 2-level
>     data and instruction MMUs.
>       o This area can be accessed using MAM client class.

At least the main memory; we can probably focus on this for now and 
tackle cache (writeback) and related issues later.

>   * Special Purpose Registers (SPRs). These registers provide all the
>     administrative functionality of the processor: program counter,
>     processor status, saved exception registers, debug interface, MMU
>     and cache interfaces, etc.
>       o This area can be accessed using CDM client class.

yes.

> 
> 3. An interface to connect it to the host controller (as mentioned in 
> the image).
> I think the general API for that part should be similar to osd_memaccess 
> class.
> http://opensocdebug.readthedocs.io/projects/osd-sw/en/latest/02_developer/api/libosd/memaccess.html

yes, the osd_memaccess (like the osd_syslogger) class could be a good 
starting point to take inspiration from.

> The target description is mentioned as:
> 
> http://repo.or.cz/openocd.git/blob/HEAD:/src/target/openrisc/or1k.c#l53
> 
> Also, something about the target description in an XML file is specified 
> here:
> 
> https://sourceware.org/gdb/onlinedocs/gdb/Standard-Target-Features.html#Standard-Target-Features
> 
> I am looking more into this point. Please, if possible elaborate more 
> about this point and
> 
> how it can be executed in the OSD-GDB server.

I'll let Stafford answer that one, I don't know much about it.

> Also, suggest if I should continue the discussion over this topic on the 
> mailing list or a PR with possible API would be better?

Design decisions can be done well on the mailing list. Once you have 
first code that you need feedback on please open a PR.

Philipp


More information about the OpenSoCDebug mailing list