Commit Graph

19 Commits

Author SHA1 Message Date
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
8c79959935 storage: Reuse already open caller objects
In the event that the remote crashes, or for other reasons try to open a
partition that we already have open we should reuse the caller objects,
so that we don't run out of them. This should likely be replaced by a
working mechanism for notifications when the remote is going away.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-11-29 09:09:04 -08:00
Bjorn Andersson
d28f52c246 rmtfs: Build with optimization
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-07-01 17:34:41 -07:00
Bjorn Andersson
7a0bd0f561 rmtfs: Don't mark memory busy
We don't have a way to notice if the remote crashes and free the memory,
so for now don't mark it as busy and just hand out the same memory the
next time.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-07-01 17:34:12 -07:00
Bjorn Andersson
dc7de6ef56 Merge pull request #1 from ndechesne/gnu
Makefile: implement GNU Coding Standard for Makefiles
2016-06-06 08:39:42 -07:00
Nicolas Dechesne
bf673a675d Makefile: implement GNU Coding Standard for Makefiles
GNU coding standards notably specifies:
 * install files with the $(DESTDIR) to the target system image
 * install files with the $(prefix), not $(PREFIX)
 * the default value of $(prefix) should be /usr/local

as per
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2016-06-05 22:07:46 +02:00
Bjorn Andersson
dcdc8e8603 rmtfs: Add .gitignore
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-06-02 10:30:22 -07:00
Bjorn Andersson
dce9fcf267 rmtfs: Add missing LICENSE file
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-06-02 10:29:40 -07:00
Bjorn Andersson
2150e2ae74 rmtfs: Fetch rmtfs address from device-tree
The rmtfs address differes from platform to platform, so fetch these
from the device-tree node in /proc instead of hard coding them.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-02-08 16:30:25 -08:00
Bjorn Andersson
6e467200c5 rmtfs: Include fsc partition in white list
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-02-08 16:29:51 -08: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
Bjorn Andersson
1e0cc246ed Initial commit for rmtfs 2016-02-07 09:29:38 -08:00