mirror of
https://github.com/linux-msm/hexagonrpc.git
synced 2026-10-07 15:29:50 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da7a3742ab | ||
|
|
598b591ae9 | ||
|
|
ab26a830a6 | ||
|
|
605b90ac7e | ||
|
|
5218213f66 | ||
|
|
4210f6d851 | ||
|
|
9da2b5ec0c | ||
|
|
0b2b5d245e | ||
|
|
0390727bca | ||
|
|
2469c21ca7 | ||
|
|
e53998a12e | ||
|
|
1dacea0470 | ||
|
|
8cbdeb5ebf | ||
|
|
7d71de1ebc | ||
|
|
85d96d4df6 | ||
|
|
034d35a6ed | ||
|
|
4fd9efcde2 | ||
|
|
ea3e58d9e6 | ||
|
|
78e2a94251 | ||
|
|
daab6ff190 |
No files matched your search
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Context Hub Runtime Environment interface - method definitions
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
const struct hrpc_method_def_interp4 chre_slpi_start_thread_def = {
|
||||
.msg_id = 0,
|
||||
.n_args = 0,
|
||||
.args = NULL,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 chre_slpi_wait_on_thread_exit_def = {
|
||||
.msg_id = 1,
|
||||
.n_args = 0,
|
||||
.args = NULL,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Context Hub Runtime Environment interface - API
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_CHRE_SLPI_H
|
||||
#define INTERFACE_CHRE_SLPI_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
extern struct hrpc_method_def_interp4 chre_slpi_start_thread_def;
|
||||
static inline int chre_slpi_start_thread(int fd, uint32_t hdl)
|
||||
{
|
||||
return hexagonrpc(&chre_slpi_start_thread_def, fd, hdl);
|
||||
}
|
||||
|
||||
extern struct hrpc_method_def_interp4 chre_slpi_wait_on_thread_exit_def;
|
||||
static inline int chre_slpi_wait_on_thread_exit(int fd, uint32_t hdl)
|
||||
{
|
||||
return hexagonrpc(&chre_slpi_wait_on_thread_exit_def, fd, hdl);
|
||||
}
|
||||
|
||||
|
||||
#endif /* INTERFACE_CHRE_SLPI_H */
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Context Hub Runtime Environment interface
|
||||
*
|
||||
* Copyright (C) 2023 The Sensor Shell Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_CHRE_SLPI_DEF
|
||||
#define INTERFACE_CHRE_SLPI_DEF
|
||||
|
||||
#include <libhexagonrpc/interface.h>
|
||||
|
||||
HEXAGONRPC_DEFINE_REMOTE_METHOD(0, chre_slpi_start_thread, 0, 0, 0, 0)
|
||||
HEXAGONRPC_DEFINE_REMOTE_METHOD(1, chre_slpi_wait_on_thread_exit, 0, 0, 0, 0)
|
||||
|
||||
#endif /* INTERFACE_CHRE_SLPI_DEF */
|
||||
+11
-74
@@ -20,105 +20,42 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <libhexagonrpc/fastrpc.h>
|
||||
#include <libhexagonrpc/interfaces/remotectl.def>
|
||||
#include <libhexagonrpc/handle.h>
|
||||
#include <libhexagonrpc/session.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "interfaces/chre_slpi.def"
|
||||
|
||||
/* TODO move these to libhexagonrpc since most clients use them */
|
||||
static int remotectl_open(int fd, char *name, struct fastrpc_context **ctx, void (*err_cb)(const char *err))
|
||||
{
|
||||
uint32_t handle;
|
||||
int32_t dlret;
|
||||
char err[256];
|
||||
int ret;
|
||||
|
||||
ret = fastrpc2(&remotectl_open_def, fd, REMOTECTL_HANDLE,
|
||||
strlen(name) + 1, name,
|
||||
&handle,
|
||||
&dlret,
|
||||
256, err);
|
||||
|
||||
if (ret == -1) {
|
||||
err_cb(strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (dlret == -5) {
|
||||
err_cb(err);
|
||||
return dlret;
|
||||
}
|
||||
|
||||
*ctx = fastrpc_create_context(fd, handle);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int remotectl_close(struct fastrpc_context *ctx, void (*err_cb)(const char *err))
|
||||
{
|
||||
uint32_t dlret;
|
||||
char err[256];
|
||||
int ret;
|
||||
|
||||
ret = fastrpc2(&remotectl_close_def, ctx->fd, REMOTECTL_HANDLE,
|
||||
ctx->handle,
|
||||
&dlret,
|
||||
256, err);
|
||||
|
||||
if (ret == -1) {
|
||||
err_cb(strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
|
||||
fastrpc_destroy_context(ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void remotectl_err(const char *err)
|
||||
{
|
||||
fprintf(stderr, "Could not remotectl: %s\n", err);
|
||||
}
|
||||
|
||||
static int chre_slpi_start_thread(struct fastrpc_context *ctx)
|
||||
{
|
||||
return fastrpc(&chre_slpi_start_thread_def, ctx);
|
||||
}
|
||||
|
||||
static int chre_slpi_wait_on_thread_exit(struct fastrpc_context *ctx)
|
||||
{
|
||||
return fastrpc(&chre_slpi_wait_on_thread_exit_def, ctx);
|
||||
}
|
||||
#include "interface/chre_slpi.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
struct fastrpc_context *ctx;
|
||||
uint32_t hdl;
|
||||
char err[256];
|
||||
int fd, ret;
|
||||
|
||||
fd = hexagonrpc_fd_from_env();
|
||||
if (fd == -1)
|
||||
return 1;
|
||||
|
||||
ret = remotectl_open(fd, "chre_slpi", &ctx, remotectl_err);
|
||||
if (ret)
|
||||
ret = hexagonrpc_open(fd, "chre_slpi", &hdl, 256, err);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Could not open CHRE remote interface: %s\n", err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = chre_slpi_start_thread(ctx);
|
||||
ret = chre_slpi_start_thread(fd, hdl);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Could not start CHRE\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = chre_slpi_wait_on_thread_exit(ctx);
|
||||
ret = chre_slpi_wait_on_thread_exit(fd, hdl);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Could not wait for CHRE thread\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
err:
|
||||
remotectl_close(ctx, remotectl_err);
|
||||
hexagonrpc_close(fd, hdl);
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
executable('chrecd',
|
||||
'interfaces.c',
|
||||
'interface/chre_slpi.c',
|
||||
'main.c',
|
||||
c_args : cflags,
|
||||
include_directories : include,
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <libhexagonrpc/error.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <misc/fastrpc.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "aee_error.h"
|
||||
#include "apps_mem.h"
|
||||
#include "interfaces/apps_mem.def"
|
||||
#include "interface/apps_mem.h"
|
||||
#include "listener.h"
|
||||
|
||||
// See fastrpc.git/src/apps_mem_imp.c
|
||||
@@ -71,11 +71,9 @@ static uint32_t apps_mem_request_map64(void *data,
|
||||
mmap.size = first_in->len;
|
||||
|
||||
ret = ioctl(ctx->fd, FASTRPC_IOCTL_MMAP, &mmap);
|
||||
if (ret == -1) {
|
||||
perror("Memory map failed");
|
||||
return AEE_EFAILED;
|
||||
} else if (ret) {
|
||||
fprintf(stderr, "Memory map failed: %s\n", aee_strerror[ret]);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Memory map failed: %s\n",
|
||||
hexagonrpc_strerror(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <libhexagonrpc/error.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "aee_error.h"
|
||||
#include "interfaces/apps_std.def"
|
||||
#include "hexagonfs.h"
|
||||
#include "interface/apps_std.h"
|
||||
#include "iobuffer.h"
|
||||
#include "listener.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
hexagonrpcd - Server for FastRPC remote procedure calls from Qualcomm DSPs
|
||||
.SH SYNOPSIS
|
||||
\fBhexagonrpcd\fP [\fIoptions\&.\&.\&.\fP] -f \fIDEVICE
|
||||
.PP
|
||||
\fBhexagonrpcd\fP -h
|
||||
.SH DESCRIPTION
|
||||
Server for FastRPC remote procedure calls from Qualcomm DSPs\&.
|
||||
.PP
|
||||
@@ -25,6 +27,9 @@ Root directory of served files (default: /usr/share/qcom/)
|
||||
.TP
|
||||
\fB\-s\fP
|
||||
Attach to sensorspd
|
||||
.TP
|
||||
\fB\-h\fP
|
||||
Print help and exit
|
||||
.PP
|
||||
.SH NOTES
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* FastRPC interface list for building method definitions
|
||||
* FastRPC reverse tunnel registration interface - method definitions
|
||||
*
|
||||
* Copyright (C) 2023 The Sensor Shell Contributors
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -19,6 +19,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define HEXAGONRPC_BUILD_METHOD_DEFINITIONS 1
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
#include "interfaces/chre_slpi.def"
|
||||
const struct hrpc_method_def_interp4 adsp_default_listener_register_def = {
|
||||
.msg_id = 0,
|
||||
.n_args = 0,
|
||||
.args = NULL,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* FastRPC reverse tunnel registration interface - API
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_ADSP_DEFAULT_LISTENER_H
|
||||
#define INTERFACE_ADSP_DEFAULT_LISTENER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
extern struct hrpc_method_def_interp4 adsp_default_listener_register_def;
|
||||
static inline int adsp_default_listener_register(int fd, uint32_t hdl)
|
||||
{
|
||||
return hexagonrpc(&adsp_default_listener_register_def, fd, hdl);
|
||||
}
|
||||
|
||||
#endif /* INTERFACE_ADSP_DEFAULT_LISTENER_H */
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* FastRPC reverse tunnel main interface - method definitions
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
const struct hrpc_method_def_interp4 adsp_listener_init2_def = {
|
||||
.msg_id = 3,
|
||||
.n_args = 0,
|
||||
.args = NULL,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
struct hrpc_arg_def_interp4 adsp_listener_next2_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB_SEQ, sizeof(char) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 adsp_listener_next2_def = {
|
||||
.msg_id = 4,
|
||||
.n_args = HRPC_ARRAY_SIZE(adsp_listener_next2_args),
|
||||
.args = adsp_listener_next2_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* FastRPC reverse tunnel main interface - API
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_ADSP_LISTENER_H
|
||||
#define INTERFACE_ADSP_LISTENER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
#define ADSP_LISTENER 3
|
||||
|
||||
extern struct hrpc_method_def_interp4 adsp_listener_init2_def;
|
||||
static inline int adsp_listener_init2(int fd)
|
||||
{
|
||||
return hexagonrpc(&adsp_listener_init2_def, fd, ADSP_LISTENER);
|
||||
}
|
||||
|
||||
extern struct hrpc_method_def_interp4 adsp_listener_next2_def;
|
||||
static inline int adsp_listener_next2(int fd,
|
||||
uint32_t ret_rctx,
|
||||
uint32_t ret_res,
|
||||
uint32_t ret_outbufs_len, const char *ret_outbufs,
|
||||
uint32_t *rctx,
|
||||
uint32_t *handle,
|
||||
uint32_t *sc,
|
||||
uint32_t *inbufs_len,
|
||||
uint32_t inbufs_size, char *inbufs)
|
||||
{
|
||||
return hexagonrpc(&adsp_listener_next2_def, fd, ADSP_LISTENER,
|
||||
ret_rctx, ret_res,
|
||||
ret_outbufs_len, (const void *) ret_outbufs,
|
||||
rctx, handle, sc, inbufs_len,
|
||||
inbufs_size, (void *) inbufs);
|
||||
}
|
||||
|
||||
#endif /* INTERFACE_ADSP_LISTENER_H */
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* FastRPC memory mapping interface - method definitions
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_mem_request_map64_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_mem_request_map64_def = {
|
||||
.msg_id = 2,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_mem_request_map64_args),
|
||||
.args = apps_mem_request_map64_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* FastRPC interface list for building common method definitions
|
||||
* FastRPC memory mapping interface - API
|
||||
*
|
||||
* Copyright (C) 2023 The Sensor Shell Contributors
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define HEXAGONRPC_BUILD_METHOD_DEFINITIONS 1
|
||||
#ifndef INTERFACE_APPS_MEM_H
|
||||
#define INTERFACE_APPS_MEM_H
|
||||
|
||||
#include <libhexagonrpc/interfaces/remotectl.def>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
extern struct hrpc_method_def_interp4 apps_mem_request_map64_def;
|
||||
|
||||
#endif /* INTERFACE_APPS_MEM_H */
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* FastRPC operating system interface - method definitions
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_freopen_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB_SEQ, sizeof(char) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_freopen_def = {
|
||||
.msg_id = 1,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_freopen_args),
|
||||
.args = apps_std_freopen_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_fflush_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_fflush_def = {
|
||||
.msg_id = 2,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_fflush_args),
|
||||
.args = apps_std_fflush_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_fclose_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_fclose_def = {
|
||||
.msg_id = 3,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_fclose_args),
|
||||
.args = apps_std_fclose_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_fread_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB_SEQ, sizeof(char) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_fread_def = {
|
||||
.msg_id = 4,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_fread_args),
|
||||
.args = apps_std_fread_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_fseek_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_fseek_def = {
|
||||
.msg_id = 9,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_fseek_args),
|
||||
.args = apps_std_fseek_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_fopen_with_env_args[] = {
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_fopen_with_env_def = {
|
||||
.msg_id = 19,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_fopen_with_env_args),
|
||||
.args = apps_std_fopen_with_env_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_opendir_args[] = {
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_opendir_def = {
|
||||
.msg_id = 26,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_opendir_args),
|
||||
.args = apps_std_opendir_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_closedir_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint64_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_closedir_def = {
|
||||
.msg_id = 27,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_closedir_args),
|
||||
.args = apps_std_closedir_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_readdir_args[] = {
|
||||
{ HRPC_ARG_WORD, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(char) * 256 },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_readdir_def = {
|
||||
.msg_id = 28,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_readdir_args),
|
||||
.args = apps_std_readdir_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_mkdir_args[] = {
|
||||
{ HRPC_ARG_BLOB, sizeof(char) },
|
||||
{ HRPC_ARG_WORD, sizeof(uint32_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_mkdir_def = {
|
||||
.msg_id = 29,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_mkdir_args),
|
||||
.args = apps_std_mkdir_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
|
||||
static struct hrpc_arg_def_interp4 apps_std_stat_args[] = {
|
||||
{ HRPC_ARG_BLOB_SEQ, sizeof(char) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint32_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
|
||||
};
|
||||
|
||||
const struct hrpc_method_def_interp4 apps_std_stat_def = {
|
||||
.msg_id = 31,
|
||||
.n_args = HRPC_ARRAY_SIZE(apps_std_stat_args),
|
||||
.args = apps_std_stat_args,
|
||||
.n_inner_types = 0,
|
||||
.inner_types = NULL,
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* FastRPC operating system interface - API
|
||||
*
|
||||
* Copyright (C) 2025 HexagonRPC Contributors
|
||||
*
|
||||
* This file is part of HexagonRPC.
|
||||
*
|
||||
* HexagonRPC is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_APPS_STD_H
|
||||
#define INTERFACE_APPS_STD_H
|
||||
|
||||
#include <libhexagonrpc/hexagonrpc.h>
|
||||
|
||||
extern struct hrpc_method_def_interp4 apps_std_freopen_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_fflush_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_fclose_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_fread_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_fseek_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_fopen_with_env_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_opendir_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_closedir_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_readdir_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_mkdir_def;
|
||||
extern struct hrpc_method_def_interp4 apps_std_stat_def;
|
||||
|
||||
#endif /* INTERFACE_APPS_STD_H */
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* FastRPC interface list for building method definitions
|
||||
*
|
||||
* Copyright (C) 2023 The Sensor Shell Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define HEXAGONRPC_BUILD_METHOD_DEFINITIONS 1
|
||||
|
||||
#include "interfaces/adsp_default_listener.def"
|
||||
#include "interfaces/apps_mem.def"
|
||||
#include "interfaces/apps_std.def"
|
||||
#include "interfaces/adsp_listener.def"
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* FastRPC reverse tunnel registration interface
|
||||
*
|
||||
* Copyright (C) 2023 The Sensor Shell Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_ADSP_DEFAULT_LISTENER_DEF
|
||||
#define INTERFACE_ADSP_DEFAULT_LISTENER_DEF
|
||||
|
||||
#include <libhexagonrpc/interface.h>
|
||||
|
||||
HEXAGONRPC_DEFINE_REMOTE_METHOD(0, adsp_default_listener_register, 0, 0, 0, 0)
|
||||
|
||||
#endif /* INTERFACE_ADSP_DEFAULT_LISTENER_DEF */
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* FastRPC reverse tunnel main interface
|
||||
*
|
||||
* Copyright (C) 2023 The Sensor Shell Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_ADSP_LISTENER_DEF
|
||||
#define INTERFACE_ADSP_LISTENER_DEF
|
||||
|
||||
#include <libhexagonrpc/interface.h>
|
||||
|
||||
#define ADSP_LISTENER_HANDLE 3
|
||||
|
||||
HEXAGONRPC_DEFINE_REMOTE_METHOD(3, adsp_listener_init2, 0, 0, 0, 0)
|
||||
HEXAGONRPC_DEFINE_REMOTE_METHOD(4, adsp_listener_next2, 2, 1, 4, 1)
|
||||
|
||||
#endif /* INTERFACE_ADSP_LISTENER_DEF */
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* FastRPC operating system interface
|
||||
*
|
||||
* Copyright (C) 2024 The Sensor Shell Contributors
|
||||
*
|
||||
* This file is part of sensh.
|
||||
*
|
||||
* Sensh is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_APPS_MEM_DEF
|
||||
#define INTERFACE_APPS_MEM_DEF
|
||||
|
||||
#include <libhexagonrpc/interface.h>
|
||||
|
||||
HEXAGONRPC_DEFINE_REMOTE_METHOD(2, apps_mem_request_map64, 8, 0, 4, 0)
|
||||
|
||||
#endif /* INTERFACE_APPS_MEM_DEF */
|
||||
Loaded 20 of 46 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user