Skip to content

Commit eee667b

Browse files
committed
fastrpc: hexagonrpcd: interfaces: convert to interp3
Add the remote method definitions for interfaces used by HexagonRPCD according to the 3rd format version.
1 parent 13c14c1 commit eee667b

File tree

3 files changed

+190
-0
lines changed

3 files changed

+190
-0
lines changed

hexagonrpcd/interfaces/adsp_default_listener.def

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,11 @@
2626

2727
HEXAGONRPC_DEFINE_REMOTE_METHOD(0, adsp_default_listener_register, 0, 0, 0, 0)
2828

29+
HEXAGONRPC_DEFINE_REMOTE_METHOD3_EMPTY(0, adsp_default_listener3_register)
30+
31+
static inline int adsp_default_listener3_register(const struct fastrpc_context *ctx)
32+
{
33+
return hexagonrpc(&adsp_default_listener3_register_def, ctx);
34+
}
35+
2936
#endif /* INTERFACE_ADSP_DEFAULT_LISTENER_DEF */

hexagonrpcd/interfaces/adsp_listener.def

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,29 @@
2929
HEXAGONRPC_DEFINE_REMOTE_METHOD(3, adsp_listener_init2, 0, 0, 0, 0)
3030
HEXAGONRPC_DEFINE_REMOTE_METHOD(4, adsp_listener_next2, 2, 1, 4, 1)
3131

32+
HEXAGONRPC_DEFINE_REMOTE_METHOD3_EMPTY(3, adsp_listener3_init2)
33+
34+
static inline int adsp_listener3_init2(int fd)
35+
{
36+
return hexagonrpc2(&adsp_listener3_init2_def, fd, ADSP_LISTENER_HANDLE);
37+
}
38+
39+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(4, adsp_listener3_next2, true,
40+
0, 0, 1, HEXAGONRPC_DELIMITER, 0, 0, 0, 0, 1)
41+
42+
static inline int adsp_listener3_next2(int fd,
43+
uint32_t ret_rctx,
44+
uint32_t ret_res,
45+
uint32_t ret_outbufs_len, const void *ret_outbufs,
46+
uint32_t *rctx,
47+
uint32_t *handle,
48+
uint32_t *sc,
49+
uint32_t *inbufs_len,
50+
uint32_t inbufs_size, void *inbufs)
51+
{
52+
return hexagonrpc2(&adsp_listener3_next2_def, fd, ADSP_LISTENER_HANDLE,
53+
ret_rctx, ret_res, ret_outbufs_len, ret_outbufs,
54+
rctx, handle, sc, inbufs_len, inbufs_size, inbufs);
55+
}
56+
3257
#endif /* INTERFACE_ADSP_LISTENER_DEF */

hexagonrpcd/interfaces/apps_std.def

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,162 @@ HEXAGONRPC_DEFINE_REMOTE_METHOD(27, apps_std_closedir, 2, 0, 0, 0)
3535
HEXAGONRPC_DEFINE_REMOTE_METHOD(28, apps_std_readdir, 2, 0, 66, 0)
3636
HEXAGONRPC_DEFINE_REMOTE_METHOD(31, apps_std_stat, 1, 1, 24, 0)
3737

38+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(1, apps_std3_freopen, true,
39+
0, HEXAGONRPC_DELIMITER, 0, 1)
40+
41+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(2, apps_std3_fflush, false,
42+
0, HEXAGONRPC_DELIMITER)
43+
44+
static inline int apps_std3_fflush(struct fastrpc_context *ctx, uint32_t stream)
45+
{
46+
return hexagonrpc(&apps_std3_fflush_def, ctx, stream);
47+
}
48+
49+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(3, apps_std3_fclose, false,
50+
0, HEXAGONRPC_DELIMITER)
51+
52+
static inline int apps_std3_fclose(struct fastrpc_context *ctx, uint32_t stream)
53+
{
54+
return hexagonrpc(&apps_std3_fclose_def, ctx, stream);
55+
}
56+
57+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(4, apps_std3_fread, true,
58+
0, HEXAGONRPC_DELIMITER, 0, 0, 1)
59+
60+
static inline int apps_std3_fread(struct fastrpc_context *ctx,
61+
uint32_t stream,
62+
uint32_t *written, uint32_t *is_eof,
63+
uint32_t size, void *buf)
64+
{
65+
return hexagonrpc(&apps_std3_fread_def, ctx,
66+
stream, written, is_eof, size, buf);
67+
}
68+
69+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(9, apps_std3_fseek, false,
70+
0, 0, 0, HEXAGONRPC_DELIMITER)
71+
72+
static inline int apps_std3_fseek(struct fastrpc_context *ctx,
73+
uint32_t stream, uint32_t pos, uint32_t whence)
74+
{
75+
return hexagonrpc(&apps_std3_fseek_def, ctx, stream, pos, whence);
76+
}
77+
78+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(19, apps_std3_fopen_with_env, true,
79+
1, 1, 1, 1, HEXAGONRPC_DELIMITER, 0)
80+
81+
static inline int apps_std3_fopen_with_env(struct fastrpc_context *ctx,
82+
uint32_t envvar_len, const char *envvar,
83+
uint32_t delim_len, const char *delim,
84+
uint32_t name_len, const char *name,
85+
uint32_t mode_len, const char *mode)
86+
{
87+
return hexagonrpc(&apps_std3_fopen_with_env_def, ctx,
88+
envvar_len, (const void *) envvar,
89+
delim_len, (const void *) delim,
90+
name_len, (const void *) name,
91+
mode_len, (const void *) mode);
92+
}
93+
94+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(26, apps_std3_opendir, true,
95+
1, HEXAGONRPC_DELIMITER, 0, 0)
96+
97+
static inline int apps_std3_opendir(struct fastrpc_context *ctx,
98+
uint32_t path_len, const char *path,
99+
uint32_t *handle_lo, uint32_t *handle_hi)
100+
{
101+
return hexagonrpc(&apps_std3_opendir_def, ctx,
102+
path_len, (const void *) path,
103+
handle_lo, handle_hi);
104+
}
105+
106+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(27, apps_std3_closedir, false,
107+
0, 0, HEXAGONRPC_DELIMITER)
108+
109+
static inline int apps_std3_closedir(struct fastrpc_context *ctx,
110+
uint32_t handle_lo, uint32_t handle_hi)
111+
{
112+
return hexagonrpc(&apps_std3_closedir_def, ctx, handle_lo, handle_hi);
113+
}
114+
115+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(28, apps_std3_readdir, true,
116+
0, 0, HEXAGONRPC_DELIMITER,
117+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
118+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
119+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
120+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
121+
0, 0)
122+
123+
static inline int apps_std3_readdir(struct fastrpc_context *ctx,
124+
uint32_t handle_lo, uint32_t handle_hi,
125+
uint32_t *inode, char *path, uint32_t *eof)
126+
{
127+
uint32_t *buf = (uint32_t *) path;
128+
129+
return hexagonrpc(&apps_std3_readdir_def, ctx,
130+
handle_lo, handle_hi, inode,
131+
&buf[0], &buf[1], &buf[2], &buf[3],
132+
&buf[4], &buf[5], &buf[6], &buf[7],
133+
&buf[8], &buf[9], &buf[10], &buf[11],
134+
&buf[12], &buf[13], &buf[14], &buf[15],
135+
&buf[16], &buf[17], &buf[18], &buf[19],
136+
&buf[20], &buf[21], &buf[22], &buf[23],
137+
&buf[24], &buf[25], &buf[26], &buf[27],
138+
&buf[28], &buf[29], &buf[30], &buf[31],
139+
&buf[32], &buf[33], &buf[34], &buf[35],
140+
&buf[36], &buf[37], &buf[38], &buf[39],
141+
&buf[40], &buf[41], &buf[42], &buf[43],
142+
&buf[44], &buf[45], &buf[46], &buf[47],
143+
&buf[48], &buf[49], &buf[50], &buf[51],
144+
&buf[52], &buf[53], &buf[54], &buf[55],
145+
&buf[56], &buf[57], &buf[58], &buf[57],
146+
&buf[60], &buf[61], &buf[62], &buf[63], eof);
147+
}
148+
149+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(29, apps_std3_mkdir, false,
150+
1, 0, HEXAGONRPC_DELIMITER)
151+
152+
static inline int apps_std3_mkdir(struct fastrpc_context *ctx,
153+
uint32_t path_size, const char *path,
154+
uint32_t mode)
155+
{
156+
return hexagonrpc(&apps_std3_mkdir_def, ctx,
157+
path_size, (const void *) path, mode);
158+
}
159+
160+
HEXAGONRPC_DEFINE_REMOTE_METHOD3(31, apps_std3_stat, true,
161+
1, HEXAGONRPC_DELIMITER,
162+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163+
0, 0, 0, 0, 0, 0, 0, 0)
164+
165+
static inline int apps_std3_stat(struct fastrpc_context *ctx,
166+
uint32_t path_size, const char *path,
167+
uint32_t *tsz_lo, uint32_t *tsz_hi,
168+
uint32_t *dev_lo, uint32_t *dev_hi,
169+
uint32_t *ino_lo, uint32_t *ino_hi,
170+
uint32_t *mode, uint32_t *nlink,
171+
uint32_t *rdev_lo, uint32_t *rdev_hi,
172+
uint32_t *size_lo, uint32_t *size_hi,
173+
uint32_t *atime_sec_lo, uint32_t *atime_sec_hi,
174+
uint32_t *atime_nsec_lo, uint32_t *atime_nsec_hi,
175+
uint32_t *mtime_sec_lo, uint32_t *mtime_sec_hi,
176+
uint32_t *mtime_nsec_lo, uint32_t *mtime_nsec_hi,
177+
uint32_t *ctime_sec_lo, uint32_t *ctime_sec_hi,
178+
uint32_t *ctime_nsec_lo, uint32_t *ctime_nsec_hi)
179+
{
180+
return hexagonrpc(&apps_std3_stat_def, ctx,
181+
path_size, (const void *) path,
182+
tsz_lo, tsz_hi,
183+
dev_lo, dev_hi,
184+
ino_lo, ino_hi,
185+
mode, nlink,
186+
rdev_lo, rdev_hi,
187+
size_lo, size_hi,
188+
atime_sec_lo, atime_sec_hi,
189+
atime_nsec_lo, atime_nsec_hi,
190+
mtime_sec_lo, mtime_sec_hi,
191+
mtime_nsec_lo, mtime_nsec_hi,
192+
ctime_sec_lo, ctime_sec_hi,
193+
ctime_nsec_lo, ctime_nsec_hi);
194+
}
195+
38196
#endif /* INTERFACE_APPS_STD_DEF */

0 commit comments

Comments
 (0)