All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Oleksandr Shamray <oleksandrs@mellanox.com>,
	gregkh@linuxfoundation.org, arnd@arndb.de
Cc: system-sw-low-level@mellanox.com, devicetree@vger.kernel.org,
	jiri@resnulli.us, vadimp@mellanox.com, linux-api@vger.kernel.org,
	openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	openocd-devel-owner@lists.sourceforge.net, robh+dt@kernel.org,
	joel@jms.id.au, linux-serial@vger.kernel.org,
	tklauser@distanz.ch, mchehab@kernel.org, davem@davemloft.net,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [patch v15 0/4] JTAG driver introduction
Date: Mon, 25 Dec 2017 15:17:50 -0800	[thread overview]
Message-ID: <4425f51e-d3b3-3555-7afd-5dd1b1e698fa@gmail.com> (raw)
In-Reply-To: <1514202808-29747-1-git-send-email-oleksandrs@mellanox.com>

Le 12/25/17 à 03:53, Oleksandr Shamray a écrit :
> When a need raise up to use JTAG interface for system's devices
> programming or CPU debugging, usually the user layer
> application implements jtag protocol by bit-bang or using a 
> proprietary connection to vendor hardware.
> This method can be slow and not generic.
>  
> We propose to implement general JTAG interface and infrastructure
> to communicate with user layer application. In such way, we can
> have the standard JTAG interface core part and separation from
> specific HW implementation.

Well, the framework in its current shape is still extremely simplistic,
therefore leaving a lot of room (read: bugs, inconsistencies) within the
hands of the driver, so while the user-space interface is standard
through the proposed character device, the user experience, likely might
not.

> This allow new capability to debug the CPU or program system's 
> device via BMC without additional devices nor cost. 

If that is the case, should not we leverage the kernel's device driver
model and expect the JTAG framework to create specific devices for the
different pieces of HW discovered on the scan chain? That would also
presumably allow the core JTAG framework to retain the necessary state
changes in order to address one particular device within the scan chain.

> 
> This patch purpose is to add JTAG master core infrastructure by 
> defining new JTAG class and provide generic JTAG interface
> to allow hardware specific drivers to connect this interface.
> This will enable all JTAG drivers to use the common interface
> part and will have separate for hardware implementation.

Let's consider I want to get rid of OpenOCD, or rather, move its driver
interface within the kernel and replace it on the OpenOCD side with a
generic character device interface. I could presumably amortize the
costly operations which are currently I/O and/or system call limiting
when running in user-space, what would it look like with your proposed
framework, have you given some thoughts about that?

Thanks!
-- 
Florian

WARNING: multiple messages have this Message-ID (diff)
From: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Oleksandr Shamray
	<oleksandrs-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org
Cc: system-sw-low-level-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org,
	vadimp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	openbmc-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	openocd-devel-owner-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org,
	linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [patch v15 0/4] JTAG driver introduction
Date: Mon, 25 Dec 2017 15:17:50 -0800	[thread overview]
Message-ID: <4425f51e-d3b3-3555-7afd-5dd1b1e698fa@gmail.com> (raw)
In-Reply-To: <1514202808-29747-1-git-send-email-oleksandrs-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Le 12/25/17 à 03:53, Oleksandr Shamray a écrit :
> When a need raise up to use JTAG interface for system's devices
> programming or CPU debugging, usually the user layer
> application implements jtag protocol by bit-bang or using a 
> proprietary connection to vendor hardware.
> This method can be slow and not generic.
>  
> We propose to implement general JTAG interface and infrastructure
> to communicate with user layer application. In such way, we can
> have the standard JTAG interface core part and separation from
> specific HW implementation.

Well, the framework in its current shape is still extremely simplistic,
therefore leaving a lot of room (read: bugs, inconsistencies) within the
hands of the driver, so while the user-space interface is standard
through the proposed character device, the user experience, likely might
not.

> This allow new capability to debug the CPU or program system's 
> device via BMC without additional devices nor cost. 

If that is the case, should not we leverage the kernel's device driver
model and expect the JTAG framework to create specific devices for the
different pieces of HW discovered on the scan chain? That would also
presumably allow the core JTAG framework to retain the necessary state
changes in order to address one particular device within the scan chain.

> 
> This patch purpose is to add JTAG master core infrastructure by 
> defining new JTAG class and provide generic JTAG interface
> to allow hardware specific drivers to connect this interface.
> This will enable all JTAG drivers to use the common interface
> part and will have separate for hardware implementation.

Let's consider I want to get rid of OpenOCD, or rather, move its driver
interface within the kernel and replace it on the OpenOCD side with a
generic character device interface. I could presumably amortize the
costly operations which are currently I/O and/or system call limiting
when running in user-space, what would it look like with your proposed
framework, have you given some thoughts about that?

Thanks!
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch v15 0/4] JTAG driver introduction
Date: Mon, 25 Dec 2017 15:17:50 -0800	[thread overview]
Message-ID: <4425f51e-d3b3-3555-7afd-5dd1b1e698fa@gmail.com> (raw)
In-Reply-To: <1514202808-29747-1-git-send-email-oleksandrs@mellanox.com>

Le 12/25/17 ? 03:53, Oleksandr Shamray a ?crit?:
> When a need raise up to use JTAG interface for system's devices
> programming or CPU debugging, usually the user layer
> application implements jtag protocol by bit-bang or using a 
> proprietary connection to vendor hardware.
> This method can be slow and not generic.
>  
> We propose to implement general JTAG interface and infrastructure
> to communicate with user layer application. In such way, we can
> have the standard JTAG interface core part and separation from
> specific HW implementation.

Well, the framework in its current shape is still extremely simplistic,
therefore leaving a lot of room (read: bugs, inconsistencies) within the
hands of the driver, so while the user-space interface is standard
through the proposed character device, the user experience, likely might
not.

> This allow new capability to debug the CPU or program system's 
> device via BMC without additional devices nor cost. 

If that is the case, should not we leverage the kernel's device driver
model and expect the JTAG framework to create specific devices for the
different pieces of HW discovered on the scan chain? That would also
presumably allow the core JTAG framework to retain the necessary state
changes in order to address one particular device within the scan chain.

> 
> This patch purpose is to add JTAG master core infrastructure by 
> defining new JTAG class and provide generic JTAG interface
> to allow hardware specific drivers to connect this interface.
> This will enable all JTAG drivers to use the common interface
> part and will have separate for hardware implementation.

Let's consider I want to get rid of OpenOCD, or rather, move its driver
interface within the kernel and replace it on the OpenOCD side with a
generic character device interface. I could presumably amortize the
costly operations which are currently I/O and/or system call limiting
when running in user-space, what would it look like with your proposed
framework, have you given some thoughts about that?

Thanks!
-- 
Florian

  parent reply	other threads:[~2017-12-25 23:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-25 11:53 [patch v15 0/4] JTAG driver introduction Oleksandr Shamray
2017-12-25 11:53 ` Oleksandr Shamray
2017-12-25 11:53 ` [patch v15 1/4] drivers: jtag: Add JTAG core driver Oleksandr Shamray
2017-12-25 11:53   ` Oleksandr Shamray
2017-12-25 23:09   ` Florian Fainelli
2017-12-25 23:09     ` Florian Fainelli
2017-12-25 23:09     ` Florian Fainelli
2017-12-26  8:47     ` Jiri Pirko
2017-12-26  8:47       ` Jiri Pirko
2017-12-26  8:47       ` Jiri Pirko
2018-01-12 16:42     ` Oleksandr Shamray
2018-01-12 16:42       ` Oleksandr Shamray
2018-01-12 16:42       ` Oleksandr Shamray
2018-01-12 16:42       ` Oleksandr Shamray
2017-12-25 11:53 ` [patch v15 2/4] drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master driver Oleksandr Shamray
2017-12-25 11:53   ` Oleksandr Shamray
2018-01-11 17:45   ` Joel Stanley
2018-01-11 17:45     ` Joel Stanley
2017-12-25 11:53 ` [patch v15 3/4] Documentation: jtag: Add bindings for " Oleksandr Shamray
2017-12-25 11:53   ` Oleksandr Shamray
2017-12-25 11:53   ` Oleksandr Shamray
2018-01-11 17:50   ` Joel Stanley
2018-01-11 17:50     ` Joel Stanley
2018-01-11 23:54     ` Joel Stanley
2018-01-11 23:54       ` Joel Stanley
2018-01-11 23:54       ` Joel Stanley
2017-12-25 11:53 ` [patch v15 4/4] Documentation: jtag: Add ABI documentation Oleksandr Shamray
2017-12-25 11:53   ` Oleksandr Shamray
2017-12-25 11:53   ` Oleksandr Shamray
2018-01-18 21:27   ` Pavel Machek
2018-01-18 21:27     ` Pavel Machek
2018-01-18 21:27     ` Pavel Machek
2017-12-25 23:17 ` Florian Fainelli [this message]
2017-12-25 23:17   ` [patch v15 0/4] JTAG driver introduction Florian Fainelli
2017-12-25 23:17   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4425f51e-d3b3-3555-7afd-5dd1b1e698fa@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiri@resnulli.us \
    --cc=joel@jms.id.au \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=oleksandrs@mellanox.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=openocd-devel-owner@lists.sourceforge.net \
    --cc=robh+dt@kernel.org \
    --cc=system-sw-low-level@mellanox.com \
    --cc=tklauser@distanz.ch \
    --cc=vadimp@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.