]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/ti-rpmsg-char.git/log
rpmsg/ti-rpmsg-char.git
21 months agolib: Add support for J721S2 SoCs
Hari Nagalla [Thu, 28 Oct 2021 21:53:06 +0000 (16:53 -0500)]
lib: Add support for J721S2 SoCs

J721S2 SoC has two dual core R5Fs in main domain and two C71 DSPs in
main compute cluster.
The library version is bumped to 0.4.0 to account for the addition of
the J721S2 SoCs to the library.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2 years agolib: Add support for M4F on AM64x SoCs
Hari Nagalla [Fri, 15 Oct 2021 21:57:06 +0000 (16:57 -0500)]
lib: Add support for M4F on AM64x SoCs

The TI K3 AM64x SoCs have a M4F core in MCU domian. The M4F is typically
used with safety applications. Non safety applications may use M4F as a
remote processor with virtio based rpmsg communications to the Host
linux applications.

Add support for M4F for AM64x SoCs in ti_rpmsg_char library. The library
version is bumped to 0.3.1 to account for the modfications done to
support M4F remote processor.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2 years agolib: Add support for AM64x SoCs
Suman Anna [Wed, 9 Dec 2020 23:31:44 +0000 (17:31 -0600)]
lib: Add support for AM64x SoCs

The TI K3 AM64x SoCs have two MAIN R5FSS clusters with dual R5F
cores. The R5FSS clusters on AM64x SoCs can support two modes that
affects the number of usable R5F cores. The conventional 'Split-mode'
allows both the R5F cores to run different applications/firmwares.
A new 'Single-CPU' allows only Core0 to run an application, but
combines the Tightly-Coupled Memory (TCM) from Core1 with Core0
effectively doubling the available TCM memory.

Add the support for these SoCs in the ti_rpmsg_char library. The
library version is also bumped up to 0.3.0 to account for the added
new SoC support.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agolib: Improve signal handling logic
Suman Anna [Fri, 30 Oct 2020 03:40:23 +0000 (22:40 -0500)]
lib: Improve signal handling logic

The commit f3d1fba69ca8 ("lib: Add initial signal handling code")
added some functionality in rpmsg_char_init() to unconditionally
register a signal handler for SIGINT and SIGTERM, and uses the
handler to perform cleanup of any open rpmsg local endpoint devices
during abnormal termination of applications. This was needed to
handle the weird dev management logic used by the rpmsg char driver.

This signal handling design is not ideal though, as it overwrites
any pre-installed signal handlers by the applications. Improve this
logic by actually checking for pre-existing signal handlers, and
registering only when none exist. This improves the overall flexibility,
without causing any inadvertant behavior. Enhance the documentation
around the public headers reflecting the same.

Any signal handlers registered by applications after rpmsg_char_init()
still take precedence, and the applications handlers are responsible
for calling rpmsg_char_exit() to ensure the proper cleanup of stale
endpoint devices.

The library version is also bumped up to 0.2.0 because of the modified
behavior.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agolib: Fix loop counter logic in _rpmsg_char_cleanup()
Suman Anna [Thu, 29 Oct 2020 18:30:37 +0000 (13:30 -0500)]
lib: Fix loop counter logic in _rpmsg_char_cleanup()

The _rpmsg_char_cleanup() function is used to cleanup an application's
open/stale local endpoint devices for both the gracious termination
(rpmsg_char_exit() invocations in application) or abnormal signal
handling termination.

The loop counter logic has a small use-after-free bug and results in
leaving orphaned /dev/rpmsgX devices. The loop iterator handle is freed
in the loop execution in rpmsg_char_close(), but is referenced after
the cleanup resulting in improper cleanup. Fix this properly.

Reported-by: Vijay Pothukuchi <vijayp@ti.com>
Reported-by: Jesse Villarreal <jesse.villarreal@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agodocs: Add a Software Manifest file
Suman Anna [Tue, 20 Oct 2020 17:23:20 +0000 (12:23 -0500)]
docs: Add a Software Manifest file

Add a Software Manifest file towards the public release of the
TI RPMsg Char package v0.1.0.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agolib: Add initial signal handling code
Suman Anna [Tue, 20 Oct 2020 00:39:58 +0000 (19:39 -0500)]
lib: Add initial signal handling code

The rpmsg char driver follows a peculiar design of using a control
device to create local endpoint devices, but using the endpoint device
itself to destroy the endpoint device. As such, any abnormal termination
of a process leaves stale endpoint devices (cleaned up only when rpmsg
char driver is uninstalled).

Add support to the library code to perform the needed cleanup of these
stale devices with unexpected terminations of the applications. Note
that there is no cleanup with SIGKILL (process terminated with kill -9)
as this signal cannot be captured by a running process.

NOTE:
This is not an ideal design, and actually needs to be ideally handled in
the applications themselves, as they might need to execute additional
cleanup code.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agoexamples: Add rpmsg_char_simple example
Suman Anna [Fri, 16 Oct 2020 04:29:46 +0000 (23:29 -0500)]
examples: Add rpmsg_char_simple example

Add a very basic example application demonstrating the usage
of the rpmsg_char API provided by the ti-rpmsg-char library.
The application is a single-threaded application, communicating
with a single rpmsg device on a remote processor using one local
endpoint device.

The example is added in a new 'examples' directory. An README file
is also added in the examples folder with the usage instructions.

The examples folder is not built automatically using top-level make,
and requires a specific command to be built. The top-level README
is also updated accordingly.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agodocs: Add a top-level README file
Suman Anna [Tue, 13 Oct 2020 01:57:03 +0000 (20:57 -0500)]
docs: Add a top-level README file

Add a README file at the top-level that provides some basic
introduction and build steps.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agolib: Add initial automake build related files
Suman Anna [Fri, 16 Oct 2020 21:26:47 +0000 (16:26 -0500)]
lib: Add initial automake build related files

Add various automake build related files to be able to build
and install the library. The library uses the version number
0.1.0.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agolib: Add initial library source code
Suman Anna [Wed, 14 Oct 2020 16:02:03 +0000 (11:02 -0500)]
lib: Add initial library source code

Add the initial source code for the new ti-rpmsg-char library.
This library is a simple utility library designed to provide
ease of usage with the Linux kernel rpmsg-char driver to exchange
messages to a rpmsg device published by a remote processor.

The library provides the following 4 API and 2 headers for
applications:
API:
 1. rpmsg_char_init()
 2. rpmsg_char_exit()
 3. rpmsg_char_open()
 4. rpmsg_char_close()

Headers: ti_rpmsg_char.h and rproc_id.h

The rpmsg_char_init() and rpmsg_char_exit() functions are used
to initialize and finalize the library. The rpmsg_char_open()
is used to create and open a local rpmsg endpoint device. The
opened file handle can be used to read and write messages to
the corresponding rpmsg device. The rpmsg_char_close() is used
to close and destroy a previously created rpmsg endpoint device.

Signed-off-by: Suman Anna <s-anna@ti.com>
3 years agoPrepare the repository
Suman Anna [Wed, 9 Sep 2020 16:19:22 +0000 (11:19 -0500)]
Prepare the repository

Add an initial commit containing the .gitignore file to prepare
the git repository.

Signed-off-by: Suman Anna <s-anna@ti.com>