Commit Graph

13 Commits

Author SHA1 Message Date
Bjorn Andersson
42ed7b4e4c rmtfs: Rework message pump
The message pump is cleaned up from cruft that was added to deal with
multiple services (rmtfs and rfsa) as well as ENETRESET handling.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-02-01 02:28:17 +00:00
Bjorn Andersson
db86a3b1a5 rmtfs: Migrate to new QMI encoder/decoder library
Utilize the QMI encoder/decoder functions being part of libqrtr instead
of rolling our own.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-02-01 02:09:35 +00:00
Bjorn Andersson
343817e402 rmtfs: Drop the rfsa service
The rfsa service is not used on any supported targets and should most
likely be implemented in the kernel driver directly, so remove any
traces of it from rmtfs.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-09-06 23:15:48 -07:00
Bjorn Andersson
93f9564224 rmtfs: Interface qcom_rfsa device for mem access
Attempt to open /dev/qcom_rfsa1 and use this instead of memory mapping
/dev/mem, while falling back to the old behavior. This allow us to drop
the dependency on /dev/mem access and will aid supporting multiple
memory regions.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-07-28 16:30:05 -07:00
Bjorn Andersson
c7822e84b1 rmtfs: Extract rmtfs mem IO operations
Rather than exposing a pointer to the mmapped memory and performing IO
directly on this address pass the data through a local buffer and move
the reading and writing of memory into the sharedmem module.

This allows us to support shared memory that is not memory mapped in the
future.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-07-28 16:26:09 -07:00
Bjorn Andersson
6b7646c45f rmtfs: Move rmtfs_mem data to struct
Introduce a struct to pass around the parameters related to the rmtfs
memory, in preparation for supporting multiple memory regions.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-07-28 16:21:15 -07:00
Bjorn Andersson
9fb35632fc rmtfs: Newline error prints in rmtfs
As a leftover from previous usage of err(3) the error prints did not end
with a newline.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-07-28 16:21:15 -07:00
Bjorn Andersson
2d0be77c2e rmtfs: Re-register services as the nameserver restarts
When the nameserver restarts we need to re-register the services.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-06-07 10:54:42 -07:00
Bjorn Andersson
0579b3b33c rfsa: Silence informational messages related to rfsa service
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-06-07 10:53:26 -07:00
Bjorn Andersson
02efe22a55 rmtfs: Handle qrtr control messages
The nameserver notifies all registered servers about leaving clients.
Stub the handling of these messages, so they are not confused with the
qmi messages.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-06-07 09:53:25 -07:00
Bjorn Andersson
4a6bc382b7 rmtfs: Bind sockets to privileged ports
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-06-07 09:52:33 -07:00
Bjorn Andersson
d5e516a6c6 rmtfs: Update tlv prototypes to accept message header
To support creating and parsing requests and indications as well qmic
adds an extra parameter to the tlv alloc and decode functions, so that
this can be used to generate and validate that the qmi packet header is
of the correct type.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-02-08 11:49:55 -08:00
Bjorn Andersson
1f12cea75b rmtfs: Initial rmtfs implementation
The rmtfs tool pushlishes the two QMI services "rmtfs" and "rfsa", and
implements the necessary requests for rmtfs that's needed to boot the
modem subsystem on a Qualcomm based board.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-02-07 09:32:14 -08:00