Skip to content

Commit 61fc668

Browse files
committed
hexagonrpcd: interface: switch apps_mem interface to interp4
1 parent e93906a commit 61fc668

File tree

5 files changed

+59
-12
lines changed

5 files changed

+59
-12
lines changed

hexagonrpcd/apps_mem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <sys/ioctl.h>
2929

3030
#include "apps_mem.h"
31-
#include "interfaces/apps_mem.def"
31+
#include "interface/apps_mem.h"
3232
#include "listener.h"
3333

3434
// See fastrpc.git/src/apps_mem_imp.c
@@ -128,7 +128,7 @@ void fastrpc_apps_mem_deinit(struct fastrpc_interface *iface)
128128
static const struct fastrpc_function_impl apps_mem_procs[] = {
129129
{ .def = NULL, .impl = NULL, },
130130
{ .def = NULL, .impl = NULL, },
131-
{ .def = &apps_mem_request_map64_def, .impl = apps_mem_request_map64, },
131+
{ .def4 = &apps_mem_request_map64_def, .impl = apps_mem_request_map64, },
132132
{ .def = NULL, .impl = NULL, },
133133
{ .def = NULL, .impl = NULL, },
134134
{ .def = NULL, .impl = NULL, },

hexagonrpcd/interface/apps_mem.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* FastRPC memory mapping interface - method definitions
3+
*
4+
* Copyright (C) 2025 HexagonRPC Contributors
5+
*
6+
* This file is part of HexagonRPC.
7+
*
8+
* HexagonRPC is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#include <stdint.h>
23+
24+
#include <libhexagonrpc/hexagonrpc.h>
25+
#include <libhexagonrpc/session.h>
26+
27+
static struct hrpc_arg_def_interp4 apps_mem_request_map64_args[] = {
28+
{ HRPC_ARG_WORD, sizeof(uint32_t) },
29+
{ HRPC_ARG_WORD, sizeof(uint32_t) },
30+
{ HRPC_ARG_WORD, sizeof(uint32_t) },
31+
{ HRPC_ARG_WORD, sizeof(uint32_t) },
32+
{ HRPC_ARG_WORD, sizeof(uint64_t) },
33+
{ HRPC_ARG_WORD, sizeof(uint64_t) },
34+
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
35+
{ HRPC_ARG_OUT_BLOB, sizeof(uint64_t) },
36+
};
37+
38+
struct hrpc_method_def_interp4 apps_mem_request_map64_def = {
39+
.msg_id = 2,
40+
.n_args = HRPC_ARRAY_SIZE(apps_mem_request_map64_args),
41+
.args = apps_mem_request_map64_args,
42+
.n_inner_types = 0,
43+
.inner_types = NULL,
44+
};
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* FastRPC operating system interface
2+
* FastRPC memory mapping interface - API
33
*
4-
* Copyright (C) 2024 The Sensor Shell Contributors
4+
* Copyright (C) 2025 HexagonRPC Contributors
55
*
6-
* This file is part of sensh.
6+
* This file is part of HexagonRPC.
77
*
8-
* Sensh is free software: you can redistribute it and/or modify
8+
* HexagonRPC is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
1010
* the Free Software Foundation, either version 3 of the License, or
1111
* (at your option) any later version.
@@ -19,11 +19,14 @@
1919
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
*/
2121

22-
#ifndef INTERFACE_APPS_MEM_DEF
23-
#define INTERFACE_APPS_MEM_DEF
22+
#ifndef INTERFACE_APPS_MEM_H
23+
#define INTERFACE_APPS_MEM_H
2424

25-
#include <libhexagonrpc/interface.h>
25+
#include <stdint.h>
2626

27-
HEXAGONRPC_DEFINE_REMOTE_METHOD(2, apps_mem_request_map64, 8, 0, 4, 0)
27+
#include <libhexagonrpc/hexagonrpc.h>
28+
#include <libhexagonrpc/session.h>
2829

29-
#endif /* INTERFACE_APPS_MEM_DEF */
30+
extern struct hrpc_method_def_interp4 apps_mem_request_map64_def;
31+
32+
#endif /* INTERFACE_APPS_MEM_H */

hexagonrpcd/interfaces.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@
2222
#define HEXAGONRPC_BUILD_METHOD_DEFINITIONS 1
2323

2424
#include "interfaces/adsp_default_listener.def"
25-
#include "interfaces/apps_mem.def"
2625
#include "interfaces/adsp_listener.def"

hexagonrpcd/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ executable('hexagonrpcd',
22
'apps_mem.c',
33
'apps_std.c',
44
'interfaces.c',
5+
'interface/apps_mem.c',
56
'interface/apps_std.c',
67
'hexagonfs.c',
78
'hexagonfs_mapped.c',

0 commit comments

Comments
 (0)