mirror of
https://github.com/linux-msm/hexagonrpc.git
synced 2026-10-07 15:29:50 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
435ed1cd68 | ||
|
|
dd9ac70c02 | ||
|
|
ffd300c27e | ||
|
|
5c4e11360d | ||
|
|
eec389f322 | ||
|
|
196c72e80f | ||
|
|
cfc745ce09 | ||
|
|
93f3467dcf | ||
|
|
c4109b4502 | ||
|
|
5d3cef4e5b |
No files matched your search
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
root = true
|
||||
|
||||
[*.{c,h}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Buildtest
|
||||
name: Build+test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -27,3 +27,7 @@ jobs:
|
||||
run: |
|
||||
meson setup build
|
||||
ninja -C build
|
||||
|
||||
- name: run tests
|
||||
run: |
|
||||
ninja -C build test
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
cc_defaults {
|
||||
name: "hexagonrpc_defaults",
|
||||
cflags: [
|
||||
"-Wno-unused-parameter",
|
||||
],
|
||||
header_libs: [
|
||||
"device_kernel_headers",
|
||||
"hexagonrpc_headers",
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
cc_binary {
|
||||
name: "chrecd",
|
||||
defaults: ["hexagonrpc_defaults"],
|
||||
srcs: [
|
||||
"interfaces.c",
|
||||
"main.c",
|
||||
],
|
||||
shared_libs: [
|
||||
"libhexagonrpc",
|
||||
],
|
||||
vendor: true,
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
prebuilt_etc {
|
||||
name: "hexagonrpcd-adsp-rootpd.rc",
|
||||
src: "hexagonrpcd-adsp-rootpd.rc",
|
||||
sub_dir: "init",
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "hexagonrpcd-adsp-sensorspd.rc",
|
||||
src: "hexagonrpcd-adsp-sensorspd.rc",
|
||||
sub_dir: "init",
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "hexagonrpcd-sdsp.rc",
|
||||
src: "hexagonrpcd-sdsp.rc",
|
||||
sub_dir: "init",
|
||||
vendor: true,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
service vendor.hexagonrpcd-adsp-rootpd /vendor/bin/hexagonrpcd -f /dev/fastrpc-adsp -d adsp -R /vendor/etc/hexagonrpcd-root
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
stdio_to_kmsg
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Server for FastRPC remote procedure calls from Qualcomm ADSP - RootPD
|
||||
Conflicts=suspend.target
|
||||
Before=suspend.target
|
||||
# FIXME: Remove this once hexagonrpcd can serve rootpd on the ADSP
|
||||
# of the SDM845 devices
|
||||
ConditionPathExists=!/dev/fastrpc-sdsp
|
||||
ConditionPathExists=/dev/fastrpc-adsp
|
||||
|
||||
[Service]
|
||||
ExecStart=@bindir@/hexagonrpcd -f /dev/fastrpc-adsp -d adsp
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
User=fastrpc
|
||||
Group=fastrpc
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,4 @@
|
||||
service vendor.hexagonrpcd-adsp-sensorspd /vendor/bin/hexagonrpcd -f /dev/fastrpc-adsp -d adsp -s -R /vendor/etc/hexagonrpcd-root
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Server for FastRPC remote procedure calls from Qualcomm ADSP - sensorspd
|
||||
Conflicts=suspend.target
|
||||
Before=suspend.target
|
||||
# This service shouldn't be run on devices with an SDSP
|
||||
ConditionPathExists=!/dev/fastrpc-sdsp
|
||||
ConditionPathExists=/dev/fastrpc-adsp
|
||||
|
||||
[Service]
|
||||
ExecStart=@bindir@/hexagonrpcd -f /dev/fastrpc-adsp -d adsp -s
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
User=fastrpc
|
||||
Group=fastrpc
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,4 @@
|
||||
service vendor.hexagonrpcd-sdsp /vendor/bin/hexagonrpcd -f /dev/fastrpc-sdsp -d sdsp -s -R /vendor/etc/hexagonrpcd-root
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Server for FastRPC remote procedure calls from Qualcomm SDSP
|
||||
ConditionPathExists=/dev/fastrpc-sdsp
|
||||
|
||||
[Service]
|
||||
ExecStart=@bindir@/hexagonrpcd -f /dev/fastrpc-sdsp -d sdsp -s
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
User=fastrpc
|
||||
Group=fastrpc
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,15 @@
|
||||
systemd_units = [
|
||||
'hexagonrpcd-adsp-rootpd.service',
|
||||
'hexagonrpcd-adsp-sensorspd.service',
|
||||
'hexagonrpcd-sdsp.service',
|
||||
]
|
||||
|
||||
foreach unit : systemd_units
|
||||
configure_file(
|
||||
input: unit + '.in',
|
||||
output: unit,
|
||||
configuration: { 'bindir': get_option('prefix') / get_option('bindir') },
|
||||
install: true,
|
||||
install_dir: get_option('libdir') / 'systemd/system',
|
||||
)
|
||||
endforeach
|
||||
@@ -0,0 +1,23 @@
|
||||
cc_binary {
|
||||
name: "hexagonrpcd",
|
||||
defaults: ["hexagonrpc_defaults"],
|
||||
srcs: [
|
||||
"aee_error.c",
|
||||
"apps_mem.c",
|
||||
"apps_std.c",
|
||||
"hexagonfs.c",
|
||||
"hexagonfs_mapped.c",
|
||||
"hexagonfs_plat_subtype_name.c",
|
||||
"hexagonfs_virt_dir.c",
|
||||
"interfaces.c",
|
||||
"iobuffer.c",
|
||||
"listener.c",
|
||||
"localctl.c",
|
||||
"rpcd.c",
|
||||
"rpcd_builder.c",
|
||||
],
|
||||
shared_libs: [
|
||||
"libhexagonrpc",
|
||||
],
|
||||
vendor: true,
|
||||
}
|
||||
@@ -197,9 +197,10 @@ static uint32_t apps_std_fopen_with_env(void *data,
|
||||
}
|
||||
|
||||
#ifdef HEXAGONRPC_VERBOSE
|
||||
printf("openat($%s, %s) -> %d\n", (const char *) inbufs[1].p,
|
||||
(const char *) inbufs[3].p,
|
||||
fd);
|
||||
printf("openat($%s, %s, %c) -> %d\n", (const char *) inbufs[1].p,
|
||||
(const char *) inbufs[3].p,
|
||||
rw_mode,
|
||||
fd);
|
||||
#endif
|
||||
|
||||
*out = fd;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <endian.h>
|
||||
#include <libhexagonrpc/fastrpc.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@@ -39,6 +40,9 @@ static size_t consume_size(struct fastrpc_decoder_context *ctx,
|
||||
ctx->size_off = (ctx->size_off + segment) % 4;
|
||||
ctx->align = (ctx->align + segment) & 0x7;
|
||||
|
||||
if (ctx->size_off == 0)
|
||||
ctx->size = le32toh(ctx->size);
|
||||
|
||||
return segment;
|
||||
}
|
||||
|
||||
@@ -212,7 +216,7 @@ void outbufs_encode(size_t n_outbufs, const struct fastrpc_io_buffer *outbufs,
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n_outbufs; i++) {
|
||||
*(uint32_t *) ptr = outbufs[i].s;
|
||||
*(uint32_t *) ptr = htole32(outbufs[i].s);
|
||||
ptr = &ptr[4];
|
||||
align = (align + 4) & 0x7;
|
||||
|
||||
|
||||
@@ -254,7 +254,10 @@ static int invoke_requested_procedure(size_t n_ifaces,
|
||||
|
||||
if (REMOTE_SCALARS_INBUFS(sc) != in_count
|
||||
|| REMOTE_SCALARS_OUTBUFS(sc) != out_count) {
|
||||
fprintf(stderr, "Unexpected buffer count: %08x\n", sc);
|
||||
fprintf(stderr, "Unexpected buffer count for method %u: %08x (in: %d vs %d, out: %d vs %d)\n",
|
||||
method, sc,
|
||||
REMOTE_SCALARS_INBUFS(sc), in_count,
|
||||
REMOTE_SCALARS_OUTBUFS(sc), out_count);
|
||||
*result = AEE_EBADPARM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
cc_library_headers {
|
||||
name: "hexagonrpc_headers",
|
||||
export_include_dirs: ["."],
|
||||
vendor: true,
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
cc_library_shared {
|
||||
name: "libhexagonrpc",
|
||||
defaults: ["hexagonrpc_defaults"],
|
||||
srcs: [
|
||||
"context.c",
|
||||
"fastrpc.c",
|
||||
"interfaces.c",
|
||||
"session.c",
|
||||
],
|
||||
vendor: true,
|
||||
}
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
project('fastrpc', 'c', version: '0.4.0', meson_version: '>=1.1')
|
||||
project('fastrpc', 'c', version: '0.5.0', meson_version: '>=1.1')
|
||||
|
||||
version_array = meson.project_version().split('.')
|
||||
api_version = version_array[0] + '.' + version_array[1]
|
||||
@@ -16,6 +16,7 @@ subdir('libhexagonrpc')
|
||||
subdir('hexagonrpcd')
|
||||
subdir('chrecd')
|
||||
|
||||
subdir('data')
|
||||
subdir('tools')
|
||||
|
||||
subdir('tests')
|
||||
Reference in new issue
Block a user