Lines Matching refs:msg

27 	struct sc_rpc_msg_s msg;  in sc_pm_set_clock_rate()  local
30 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_set_clock_rate()
31 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_set_clock_rate()
32 RPC_FUNC(&msg) = (u8)PM_FUNC_SET_CLOCK_RATE; in sc_pm_set_clock_rate()
33 RPC_U32(&msg, 0U) = *(u32 *)rate; in sc_pm_set_clock_rate()
34 RPC_U16(&msg, 4U) = (u16)resource; in sc_pm_set_clock_rate()
35 RPC_U8(&msg, 6U) = (u8)clk; in sc_pm_set_clock_rate()
36 RPC_SIZE(&msg) = 3U; in sc_pm_set_clock_rate()
38 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_set_clock_rate()
41 __func__, *rate, resource, clk, RPC_R8(&msg)); in sc_pm_set_clock_rate()
43 *rate = RPC_U32(&msg, 0U); in sc_pm_set_clock_rate()
53 struct sc_rpc_msg_s msg; in sc_pm_get_clock_rate() local
56 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_get_clock_rate()
57 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_get_clock_rate()
58 RPC_FUNC(&msg) = (u8)PM_FUNC_GET_CLOCK_RATE; in sc_pm_get_clock_rate()
59 RPC_U16(&msg, 0U) = (u16)resource; in sc_pm_get_clock_rate()
60 RPC_U8(&msg, 2U) = (u8)clk; in sc_pm_get_clock_rate()
61 RPC_SIZE(&msg) = 2U; in sc_pm_get_clock_rate()
63 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_get_clock_rate()
66 __func__, resource, clk, RPC_R8(&msg)); in sc_pm_get_clock_rate()
71 *rate = RPC_U32(&msg, 0U); in sc_pm_get_clock_rate()
81 struct sc_rpc_msg_s msg; in sc_pm_clock_enable() local
84 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_clock_enable()
85 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_clock_enable()
86 RPC_FUNC(&msg) = (u8)PM_FUNC_CLOCK_ENABLE; in sc_pm_clock_enable()
87 RPC_U16(&msg, 0U) = (u16)resource; in sc_pm_clock_enable()
88 RPC_U8(&msg, 2U) = (u8)clk; in sc_pm_clock_enable()
89 RPC_U8(&msg, 3U) = (u8)enable; in sc_pm_clock_enable()
90 RPC_U8(&msg, 4U) = (u8)autog; in sc_pm_clock_enable()
91 RPC_SIZE(&msg) = 3U; in sc_pm_clock_enable()
93 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_clock_enable()
96 __func__, resource, clk, enable, autog, RPC_R8(&msg)); in sc_pm_clock_enable()
106 struct sc_rpc_msg_s msg; in sc_pm_set_clock_parent() local
109 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_set_clock_parent()
110 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_set_clock_parent()
111 RPC_FUNC(&msg) = (u8)PM_FUNC_SET_CLOCK_PARENT; in sc_pm_set_clock_parent()
112 RPC_U16(&msg, 0U) = (u16)resource; in sc_pm_set_clock_parent()
113 RPC_U8(&msg, 2U) = (u8)clk; in sc_pm_set_clock_parent()
114 RPC_U8(&msg, 3U) = (u8)parent; in sc_pm_set_clock_parent()
115 RPC_SIZE(&msg) = 2U; in sc_pm_set_clock_parent()
117 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_set_clock_parent()
120 __func__, resource, clk, parent, RPC_R8(&msg)); in sc_pm_set_clock_parent()
130 struct sc_rpc_msg_s msg; in sc_pm_set_resource_power_mode() local
136 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_set_resource_power_mode()
137 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_set_resource_power_mode()
138 RPC_FUNC(&msg) = (u8)PM_FUNC_SET_RESOURCE_POWER_MODE; in sc_pm_set_resource_power_mode()
139 RPC_U16(&msg, 0U) = (u16)resource; in sc_pm_set_resource_power_mode()
140 RPC_U8(&msg, 2U) = (u8)mode; in sc_pm_set_resource_power_mode()
141 RPC_SIZE(&msg) = 2U; in sc_pm_set_resource_power_mode()
143 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_set_resource_power_mode()
146 __func__, resource, mode, RPC_R8(&msg)); in sc_pm_set_resource_power_mode()
155 struct sc_rpc_msg_s msg; in sc_pm_is_partition_started() local
159 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_is_partition_started()
160 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_PM); in sc_pm_is_partition_started()
161 RPC_FUNC(&msg) = (u8)(PM_FUNC_IS_PARTITION_STARTED); in sc_pm_is_partition_started()
162 RPC_U8(&msg, 0U) = (u8)(pt); in sc_pm_is_partition_started()
163 RPC_SIZE(&msg) = 2U; in sc_pm_is_partition_started()
165 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_is_partition_started()
167 result = RPC_R8(&msg); in sc_pm_is_partition_started()
170 __func__, pt, RPC_R8(&msg)); in sc_pm_is_partition_started()
173 RPC_R8(&msg)); in sc_pm_is_partition_started()
182 struct sc_rpc_msg_s msg; in sc_pm_resource_reset() local
185 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_resource_reset()
186 RPC_SIZE(&msg) = 2U; in sc_pm_resource_reset()
187 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_PM); in sc_pm_resource_reset()
188 RPC_FUNC(&msg) = (u8)(PM_FUNC_RESOURCE_RESET); in sc_pm_resource_reset()
190 RPC_U16(&msg, 0U) = (u16)(resource); in sc_pm_resource_reset()
192 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_resource_reset()
195 __func__, resource, RPC_R8(&msg)); in sc_pm_resource_reset()
205 struct sc_rpc_msg_s msg; in sc_pad_set() local
211 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pad_set()
212 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PAD; in sc_pad_set()
213 RPC_FUNC(&msg) = (u8)PAD_FUNC_SET; in sc_pad_set()
214 RPC_U32(&msg, 0U) = (u32)val; in sc_pad_set()
215 RPC_U16(&msg, 4U) = (u16)pad; in sc_pad_set()
216 RPC_SIZE(&msg) = 3U; in sc_pad_set()
218 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pad_set()
221 __func__, val, pad, RPC_R8(&msg)); in sc_pad_set()
230 struct sc_rpc_msg_s msg; in sc_pad_get() local
236 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pad_get()
237 RPC_SIZE(&msg) = 2U; in sc_pad_get()
238 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_PAD); in sc_pad_get()
239 RPC_FUNC(&msg) = (u8)(PAD_FUNC_GET); in sc_pad_get()
241 RPC_U16(&msg, 0U) = (u16)(pad); in sc_pad_get()
243 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pad_get()
246 __func__, pad, RPC_R8(&msg)); in sc_pad_get()
249 *val = (u32)RPC_U32(&msg, 0U); in sc_pad_get()
260 struct sc_rpc_msg_s msg; in sc_misc_set_control() local
266 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_set_control()
267 RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC; in sc_misc_set_control()
268 RPC_FUNC(&msg) = (u8)MISC_FUNC_SET_CONTROL; in sc_misc_set_control()
269 RPC_U32(&msg, 0U) = (u32)ctrl; in sc_misc_set_control()
270 RPC_U32(&msg, 4U) = (u32)val; in sc_misc_set_control()
271 RPC_U16(&msg, 8U) = (u16)resource; in sc_misc_set_control()
272 RPC_SIZE(&msg) = 4U; in sc_misc_set_control()
274 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_set_control()
277 __func__, ctrl, resource, RPC_R8(&msg)); in sc_misc_set_control()
287 struct sc_rpc_msg_s msg; in sc_misc_get_control() local
293 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_get_control()
294 RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC; in sc_misc_get_control()
295 RPC_FUNC(&msg) = (u8)MISC_FUNC_GET_CONTROL; in sc_misc_get_control()
296 RPC_U32(&msg, 0U) = (u32)ctrl; in sc_misc_get_control()
297 RPC_U16(&msg, 4U) = (u16)resource; in sc_misc_get_control()
298 RPC_SIZE(&msg) = 3U; in sc_misc_get_control()
300 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_get_control()
303 __func__, ctrl, resource, RPC_R8(&msg)); in sc_misc_get_control()
306 *val = RPC_U32(&msg, 0U); in sc_misc_get_control()
314 struct sc_rpc_msg_s msg; in sc_rm_set_master_sid() local
318 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_set_master_sid()
319 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_set_master_sid()
320 RPC_FUNC(&msg) = (u8)RM_FUNC_SET_MASTER_SID; in sc_rm_set_master_sid()
321 RPC_U16(&msg, 0U) = (u16)resource; in sc_rm_set_master_sid()
322 RPC_U16(&msg, 2U) = (u16)sid; in sc_rm_set_master_sid()
323 RPC_SIZE(&msg) = 2U; in sc_rm_set_master_sid()
325 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_set_master_sid()
328 __func__, resource, sid, RPC_R8(&msg)); in sc_rm_set_master_sid()
337 struct sc_rpc_msg_s msg; in sc_misc_get_boot_dev() local
343 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_get_boot_dev()
344 RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC; in sc_misc_get_boot_dev()
345 RPC_FUNC(&msg) = (u8)MISC_FUNC_GET_BOOT_DEV; in sc_misc_get_boot_dev()
346 RPC_SIZE(&msg) = 1U; in sc_misc_get_boot_dev()
348 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_get_boot_dev()
350 printf("%s: res:%d\n", __func__, RPC_R8(&msg)); in sc_misc_get_boot_dev()
353 *boot_dev = RPC_U16(&msg, 0U); in sc_misc_get_boot_dev()
360 struct sc_rpc_msg_s msg; in sc_misc_boot_status() local
366 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_boot_status()
367 RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC; in sc_misc_boot_status()
368 RPC_FUNC(&msg) = (u8)MISC_FUNC_BOOT_STATUS; in sc_misc_boot_status()
369 RPC_U8(&msg, 0U) = (u8)status; in sc_misc_boot_status()
370 RPC_SIZE(&msg) = 2U; in sc_misc_boot_status()
372 ret = misc_call(dev, SC_TRUE, &msg, size, &msg, size); in sc_misc_boot_status()
375 __func__, status, RPC_R8(&msg)); in sc_misc_boot_status()
382 struct sc_rpc_msg_s msg; in sc_misc_get_boot_container() local
388 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_get_boot_container()
389 RPC_SIZE(&msg) = 1U; in sc_misc_get_boot_container()
390 RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC; in sc_misc_get_boot_container()
391 RPC_FUNC(&msg) = (u8)MISC_FUNC_GET_BOOT_CONTAINER; in sc_misc_get_boot_container()
393 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_get_boot_container()
398 *idx = (u8)RPC_U8(&msg, 0U); in sc_misc_get_boot_container()
407 struct sc_rpc_msg_s msg; in sc_misc_build_info() local
413 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_build_info()
414 RPC_SVC(&msg) = SC_RPC_SVC_MISC; in sc_misc_build_info()
415 RPC_FUNC(&msg) = MISC_FUNC_BUILD_INFO; in sc_misc_build_info()
416 RPC_SIZE(&msg) = 1; in sc_misc_build_info()
418 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_build_info()
425 *build = RPC_U32(&msg, 0); in sc_misc_build_info()
427 *commit = RPC_U32(&msg, 4); in sc_misc_build_info()
434 struct sc_rpc_msg_s msg; in sc_misc_otp_fuse_read() local
440 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_otp_fuse_read()
441 RPC_SVC(&msg) = SC_RPC_SVC_MISC; in sc_misc_otp_fuse_read()
442 RPC_FUNC(&msg) = MISC_FUNC_OTP_FUSE_READ; in sc_misc_otp_fuse_read()
443 RPC_U32(&msg, 0) = word; in sc_misc_otp_fuse_read()
444 RPC_SIZE(&msg) = 2; in sc_misc_otp_fuse_read()
446 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_otp_fuse_read()
451 *val = RPC_U32(&msg, 0U); in sc_misc_otp_fuse_read()
461 struct sc_rpc_msg_s msg; in sc_misc_get_temp() local
464 RPC_VER(&msg) = SC_RPC_VERSION; in sc_misc_get_temp()
465 RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC; in sc_misc_get_temp()
466 RPC_FUNC(&msg) = (u8)MISC_FUNC_GET_TEMP; in sc_misc_get_temp()
467 RPC_U16(&msg, 0U) = (u16)resource; in sc_misc_get_temp()
468 RPC_U8(&msg, 2U) = (u8)temp; in sc_misc_get_temp()
469 RPC_SIZE(&msg) = 2U; in sc_misc_get_temp()
471 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_misc_get_temp()
476 *celsius = RPC_I16(&msg, 0U); in sc_misc_get_temp()
479 *tenths = RPC_I8(&msg, 2U); in sc_misc_get_temp()
489 struct sc_rpc_msg_s msg; in sc_rm_is_memreg_owned() local
496 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_is_memreg_owned()
497 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_is_memreg_owned()
498 RPC_FUNC(&msg) = (u8)RM_FUNC_IS_MEMREG_OWNED; in sc_rm_is_memreg_owned()
499 RPC_U8(&msg, 0U) = (u8)mr; in sc_rm_is_memreg_owned()
500 RPC_SIZE(&msg) = 2U; in sc_rm_is_memreg_owned()
502 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_is_memreg_owned()
503 result = RPC_R8(&msg); in sc_rm_is_memreg_owned()
506 printf("%s: mr:%d res:%d\n", __func__, mr, RPC_R8(&msg)); in sc_rm_is_memreg_owned()
509 RPC_R8(&msg)); in sc_rm_is_memreg_owned()
520 struct sc_rpc_msg_s msg; in sc_rm_find_memreg() local
526 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_find_memreg()
527 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_RM); in sc_rm_find_memreg()
528 RPC_FUNC(&msg) = (u8)(RM_FUNC_FIND_MEMREG); in sc_rm_find_memreg()
529 RPC_U32(&msg, 0U) = (u32)(addr_start >> 32ULL); in sc_rm_find_memreg()
530 RPC_U32(&msg, 4U) = (u32)(addr_start); in sc_rm_find_memreg()
531 RPC_U32(&msg, 8U) = (u32)(addr_end >> 32ULL); in sc_rm_find_memreg()
532 RPC_U32(&msg, 12U) = (u32)(addr_end); in sc_rm_find_memreg()
533 RPC_SIZE(&msg) = 5U; in sc_rm_find_memreg()
535 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_find_memreg()
537 printf("%s: start:0x%llx, end:0x%llx res:%d\n", __func__, addr_start, addr_end, RPC_R8(&msg)); in sc_rm_find_memreg()
540 *mr = RPC_U8(&msg, 0U); in sc_rm_find_memreg()
550 struct sc_rpc_msg_s msg; in sc_rm_set_memreg_permissions() local
556 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_set_memreg_permissions()
557 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_RM); in sc_rm_set_memreg_permissions()
558 RPC_FUNC(&msg) = (u8)(RM_FUNC_SET_MEMREG_PERMISSIONS); in sc_rm_set_memreg_permissions()
559 RPC_U8(&msg, 0U) = (u8)(mr); in sc_rm_set_memreg_permissions()
560 RPC_U8(&msg, 1U) = (u8)(pt); in sc_rm_set_memreg_permissions()
561 RPC_U8(&msg, 2U) = (u8)(perm); in sc_rm_set_memreg_permissions()
562 RPC_SIZE(&msg) = 2U; in sc_rm_set_memreg_permissions()
564 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_set_memreg_permissions()
567 mr, pt, perm, RPC_R8(&msg)); in sc_rm_set_memreg_permissions()
578 struct sc_rpc_msg_s msg; in sc_rm_get_memreg_info() local
584 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_get_memreg_info()
585 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_get_memreg_info()
586 RPC_FUNC(&msg) = (u8)RM_FUNC_GET_MEMREG_INFO; in sc_rm_get_memreg_info()
587 RPC_U8(&msg, 0U) = (u8)mr; in sc_rm_get_memreg_info()
588 RPC_SIZE(&msg) = 2U; in sc_rm_get_memreg_info()
590 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_get_memreg_info()
592 printf("%s: mr:%d res:%d\n", __func__, mr, RPC_R8(&msg)); in sc_rm_get_memreg_info()
595 *addr_start = ((u64)RPC_U32(&msg, 0U) << 32U) | in sc_rm_get_memreg_info()
596 RPC_U32(&msg, 4U); in sc_rm_get_memreg_info()
599 *addr_end = ((u64)RPC_U32(&msg, 8U) << 32U) | in sc_rm_get_memreg_info()
600 RPC_U32(&msg, 12U); in sc_rm_get_memreg_info()
609 struct sc_rpc_msg_s msg; in sc_rm_is_resource_owned() local
616 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_is_resource_owned()
617 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_is_resource_owned()
618 RPC_FUNC(&msg) = (u8)RM_FUNC_IS_RESOURCE_OWNED; in sc_rm_is_resource_owned()
619 RPC_U16(&msg, 0U) = (u16)resource; in sc_rm_is_resource_owned()
620 RPC_SIZE(&msg) = 2U; in sc_rm_is_resource_owned()
622 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_is_resource_owned()
623 result = RPC_R8(&msg); in sc_rm_is_resource_owned()
626 __func__, resource, RPC_R8(&msg)); in sc_rm_is_resource_owned()
629 RPC_R8(&msg)); in sc_rm_is_resource_owned()
640 struct sc_rpc_msg_s msg; in sc_rm_partition_alloc() local
644 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_partition_alloc()
645 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_partition_alloc()
646 RPC_FUNC(&msg) = (u8)RM_FUNC_PARTITION_ALLOC; in sc_rm_partition_alloc()
647 RPC_U8(&msg, 0U) = B2U8(secure); in sc_rm_partition_alloc()
648 RPC_U8(&msg, 1U) = B2U8(isolated); in sc_rm_partition_alloc()
649 RPC_U8(&msg, 2U) = B2U8(restricted); in sc_rm_partition_alloc()
650 RPC_U8(&msg, 3U) = B2U8(grant); in sc_rm_partition_alloc()
651 RPC_U8(&msg, 4U) = B2U8(coherent); in sc_rm_partition_alloc()
652 RPC_SIZE(&msg) = 3U; in sc_rm_partition_alloc()
654 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_partition_alloc()
658 RPC_R8(&msg)); in sc_rm_partition_alloc()
662 *pt = RPC_U8(&msg, 0U); in sc_rm_partition_alloc()
670 struct sc_rpc_msg_s msg; in sc_rm_partition_free() local
674 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_partition_free()
675 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_partition_free()
676 RPC_FUNC(&msg) = (u8)RM_FUNC_PARTITION_FREE; in sc_rm_partition_free()
677 RPC_U8(&msg, 0U) = (u8)pt; in sc_rm_partition_free()
678 RPC_SIZE(&msg) = 2U; in sc_rm_partition_free()
680 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_partition_free()
683 __func__, pt, RPC_R8(&msg)); in sc_rm_partition_free()
692 struct sc_rpc_msg_s msg; in sc_rm_get_partition() local
696 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_get_partition()
697 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_get_partition()
698 RPC_FUNC(&msg) = (u8)RM_FUNC_GET_PARTITION; in sc_rm_get_partition()
699 RPC_SIZE(&msg) = 1U; in sc_rm_get_partition()
701 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_get_partition()
703 printf("%s: res:%d\n", __func__, RPC_R8(&msg)); in sc_rm_get_partition()
706 *pt = RPC_U8(&msg, 0U); in sc_rm_get_partition()
714 struct sc_rpc_msg_s msg; in sc_rm_set_parent() local
718 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_set_parent()
719 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_set_parent()
720 RPC_FUNC(&msg) = (u8)RM_FUNC_SET_PARENT; in sc_rm_set_parent()
721 RPC_U8(&msg, 0U) = (u8)pt; in sc_rm_set_parent()
722 RPC_U8(&msg, 1U) = (u8)pt_parent; in sc_rm_set_parent()
723 RPC_SIZE(&msg) = 2U; in sc_rm_set_parent()
725 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_set_parent()
728 __func__, pt, pt_parent, RPC_R8(&msg)); in sc_rm_set_parent()
737 struct sc_rpc_msg_s msg; in sc_rm_assign_resource() local
741 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_assign_resource()
742 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_assign_resource()
743 RPC_FUNC(&msg) = (u8)RM_FUNC_ASSIGN_RESOURCE; in sc_rm_assign_resource()
744 RPC_U16(&msg, 0U) = (u16)resource; in sc_rm_assign_resource()
745 RPC_U8(&msg, 2U) = (u8)pt; in sc_rm_assign_resource()
746 RPC_SIZE(&msg) = 2U; in sc_rm_assign_resource()
748 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_assign_resource()
751 __func__, pt, resource, RPC_R8(&msg)); in sc_rm_assign_resource()
760 struct sc_rpc_msg_s msg; in sc_rm_assign_pad() local
764 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_assign_pad()
765 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_assign_pad()
766 RPC_FUNC(&msg) = (u8)RM_FUNC_ASSIGN_PAD; in sc_rm_assign_pad()
767 RPC_U16(&msg, 0U) = (u16)pad; in sc_rm_assign_pad()
768 RPC_U8(&msg, 2U) = (u8)pt; in sc_rm_assign_pad()
769 RPC_SIZE(&msg) = 2U; in sc_rm_assign_pad()
771 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_assign_pad()
774 __func__, pt, pad, RPC_R8(&msg)); in sc_rm_assign_pad()
783 struct sc_rpc_msg_s msg; in sc_rm_is_pad_owned() local
788 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_is_pad_owned()
789 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_is_pad_owned()
790 RPC_FUNC(&msg) = (u8)RM_FUNC_IS_PAD_OWNED; in sc_rm_is_pad_owned()
791 RPC_U8(&msg, 0U) = (u8)pad; in sc_rm_is_pad_owned()
792 RPC_SIZE(&msg) = 2U; in sc_rm_is_pad_owned()
794 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_is_pad_owned()
795 result = RPC_R8(&msg); in sc_rm_is_pad_owned()
797 printf("%s: pad:%d res:%d\n", __func__, pad, RPC_R8(&msg)); in sc_rm_is_pad_owned()
800 pad, RPC_R8(&msg)); in sc_rm_is_pad_owned()
811 struct sc_rpc_msg_s msg; in sc_rm_get_resource_owner() local
815 RPC_VER(&msg) = SC_RPC_VERSION; in sc_rm_get_resource_owner()
816 RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; in sc_rm_get_resource_owner()
817 RPC_FUNC(&msg) = (u8)RM_FUNC_GET_RESOURCE_OWNER; in sc_rm_get_resource_owner()
818 RPC_U16(&msg, 0U) = (u16)resource; in sc_rm_get_resource_owner()
819 RPC_SIZE(&msg) = 2U; in sc_rm_get_resource_owner()
821 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_rm_get_resource_owner()
823 *pt = RPC_U8(&msg, 0U); in sc_rm_get_resource_owner()
832 struct sc_rpc_msg_s msg; in sc_pm_cpu_start() local
836 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_cpu_start()
837 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_cpu_start()
838 RPC_FUNC(&msg) = (u8)PM_FUNC_CPU_START; in sc_pm_cpu_start()
839 RPC_U32(&msg, 0U) = (u32)(address >> 32ULL); in sc_pm_cpu_start()
840 RPC_U32(&msg, 4U) = (u32)address; in sc_pm_cpu_start()
841 RPC_U16(&msg, 8U) = (u16)resource; in sc_pm_cpu_start()
842 RPC_U8(&msg, 10U) = B2U8(enable); in sc_pm_cpu_start()
843 RPC_SIZE(&msg) = 4U; in sc_pm_cpu_start()
845 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_cpu_start()
848 __func__, resource, address, RPC_R8(&msg)); in sc_pm_cpu_start()
858 struct sc_rpc_msg_s msg; in sc_pm_get_resource_power_mode() local
862 RPC_VER(&msg) = SC_RPC_VERSION; in sc_pm_get_resource_power_mode()
863 RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; in sc_pm_get_resource_power_mode()
864 RPC_FUNC(&msg) = (u8)PM_FUNC_GET_RESOURCE_POWER_MODE; in sc_pm_get_resource_power_mode()
865 RPC_U16(&msg, 0U) = (u16)resource; in sc_pm_get_resource_power_mode()
866 RPC_SIZE(&msg) = 2U; in sc_pm_get_resource_power_mode()
868 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_pm_get_resource_power_mode()
871 __func__, resource, RPC_R8(&msg)); in sc_pm_get_resource_power_mode()
875 *mode = RPC_U8(&msg, 0U); in sc_pm_get_resource_power_mode()
884 struct sc_rpc_msg_s msg; in sc_seco_authenticate() local
888 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_authenticate()
889 RPC_SVC(&msg) = (u8)SC_RPC_SVC_SECO; in sc_seco_authenticate()
890 RPC_FUNC(&msg) = (u8)SECO_FUNC_AUTHENTICATE; in sc_seco_authenticate()
891 RPC_U32(&msg, 0U) = (u32)(addr >> 32ULL); in sc_seco_authenticate()
892 RPC_U32(&msg, 4U) = (u32)addr; in sc_seco_authenticate()
893 RPC_U8(&msg, 8U) = (u8)cmd; in sc_seco_authenticate()
894 RPC_SIZE(&msg) = 4U; in sc_seco_authenticate()
896 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_authenticate()
898 printf("%s: res:%d\n", __func__, RPC_R8(&msg)); in sc_seco_authenticate()
906 struct sc_rpc_msg_s msg; in sc_seco_forward_lifecycle() local
910 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_forward_lifecycle()
911 RPC_SVC(&msg) = (u8)SC_RPC_SVC_SECO; in sc_seco_forward_lifecycle()
912 RPC_FUNC(&msg) = (u8)SECO_FUNC_FORWARD_LIFECYCLE; in sc_seco_forward_lifecycle()
913 RPC_U32(&msg, 0U) = (u32)change; in sc_seco_forward_lifecycle()
914 RPC_SIZE(&msg) = 2U; in sc_seco_forward_lifecycle()
916 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_forward_lifecycle()
919 change, RPC_R8(&msg)); in sc_seco_forward_lifecycle()
929 struct sc_rpc_msg_s msg; in sc_seco_chip_info() local
933 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_chip_info()
934 RPC_SVC(&msg) = (u8)SC_RPC_SVC_SECO; in sc_seco_chip_info()
935 RPC_FUNC(&msg) = (u8)SECO_FUNC_CHIP_INFO; in sc_seco_chip_info()
936 RPC_SIZE(&msg) = 1U; in sc_seco_chip_info()
938 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_chip_info()
940 printf("%s: res:%d\n", __func__, RPC_R8(&msg)); in sc_seco_chip_info()
943 *uid_l = RPC_U32(&msg, 0U); in sc_seco_chip_info()
946 *uid_h = RPC_U32(&msg, 4U); in sc_seco_chip_info()
949 *lc = RPC_U16(&msg, 8U); in sc_seco_chip_info()
952 *monotonic = RPC_U16(&msg, 10U); in sc_seco_chip_info()
960 struct sc_rpc_msg_s msg; in sc_seco_build_info() local
963 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_build_info()
964 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_SECO); in sc_seco_build_info()
965 RPC_FUNC(&msg) = (u8)(SECO_FUNC_BUILD_INFO); in sc_seco_build_info()
966 RPC_SIZE(&msg) = 1U; in sc_seco_build_info()
968 misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_build_info()
971 *version = RPC_U32(&msg, 0U); in sc_seco_build_info()
974 *commit = RPC_U32(&msg, 4U); in sc_seco_build_info()
980 struct sc_rpc_msg_s msg; in sc_seco_get_event() local
984 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_get_event()
985 RPC_SVC(&msg) = (u8)SC_RPC_SVC_SECO; in sc_seco_get_event()
986 RPC_FUNC(&msg) = (u8)SECO_FUNC_GET_EVENT; in sc_seco_get_event()
987 RPC_U8(&msg, 0U) = (u8)idx; in sc_seco_get_event()
988 RPC_SIZE(&msg) = 2U; in sc_seco_get_event()
990 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_get_event()
992 printf("%s: idx: %u, res:%d\n", __func__, idx, RPC_R8(&msg)); in sc_seco_get_event()
995 *event = RPC_U32(&msg, 0U); in sc_seco_get_event()
1004 struct sc_rpc_msg_s msg; in sc_seco_gen_key_blob() local
1008 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_gen_key_blob()
1009 RPC_SVC(&msg) = (u8)SC_RPC_SVC_SECO; in sc_seco_gen_key_blob()
1010 RPC_FUNC(&msg) = (u8)SECO_FUNC_GEN_KEY_BLOB; in sc_seco_gen_key_blob()
1011 RPC_U32(&msg, 0U) = (u32)(load_addr >> 32ULL); in sc_seco_gen_key_blob()
1012 RPC_U32(&msg, 4U) = (u32)load_addr; in sc_seco_gen_key_blob()
1013 RPC_U32(&msg, 8U) = (u32)(export_addr >> 32ULL); in sc_seco_gen_key_blob()
1014 RPC_U32(&msg, 12U) = (u32)export_addr; in sc_seco_gen_key_blob()
1015 RPC_U32(&msg, 16U) = (u32)id; in sc_seco_gen_key_blob()
1016 RPC_U16(&msg, 20U) = (u16)max_size; in sc_seco_gen_key_blob()
1017 RPC_SIZE(&msg) = 7U; in sc_seco_gen_key_blob()
1019 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_gen_key_blob()
1022 __func__, id, load_addr, export_addr, RPC_R8(&msg)); in sc_seco_gen_key_blob()
1032 struct sc_rpc_msg_s msg; in sc_seco_get_mp_key() local
1036 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_get_mp_key()
1037 RPC_SIZE(&msg) = 4U; in sc_seco_get_mp_key()
1038 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_SECO); in sc_seco_get_mp_key()
1039 RPC_FUNC(&msg) = (u8)(SECO_FUNC_GET_MP_KEY); in sc_seco_get_mp_key()
1041 RPC_U32(&msg, 0U) = (u32)(dst_addr >> 32ULL); in sc_seco_get_mp_key()
1042 RPC_U32(&msg, 4U) = (u32)(dst_addr); in sc_seco_get_mp_key()
1043 RPC_U16(&msg, 8U) = (u16)(dst_size); in sc_seco_get_mp_key()
1045 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_get_mp_key()
1048 __func__, dst_addr, RPC_R8(&msg)); in sc_seco_get_mp_key()
1057 struct sc_rpc_msg_s msg; in sc_seco_update_mpmr() local
1061 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_update_mpmr()
1062 RPC_SIZE(&msg) = 4U; in sc_seco_update_mpmr()
1063 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_SECO); in sc_seco_update_mpmr()
1064 RPC_FUNC(&msg) = (u8)(SECO_FUNC_UPDATE_MPMR); in sc_seco_update_mpmr()
1066 RPC_U32(&msg, 0U) = (u32)(addr >> 32ULL); in sc_seco_update_mpmr()
1067 RPC_U32(&msg, 4U) = (u32)(addr); in sc_seco_update_mpmr()
1068 RPC_U8(&msg, 8U) = (u8)(size_m); in sc_seco_update_mpmr()
1069 RPC_U8(&msg, 9U) = (u8)(lock); in sc_seco_update_mpmr()
1071 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_update_mpmr()
1074 __func__, addr, size_m, lock, RPC_R8(&msg)); in sc_seco_update_mpmr()
1083 struct sc_rpc_msg_s msg; in sc_seco_get_mp_sign() local
1087 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_get_mp_sign()
1088 RPC_SIZE(&msg) = 6U; in sc_seco_get_mp_sign()
1089 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_SECO); in sc_seco_get_mp_sign()
1090 RPC_FUNC(&msg) = (u8)(SECO_FUNC_GET_MP_SIGN); in sc_seco_get_mp_sign()
1092 RPC_U32(&msg, 0U) = (u32)(msg_addr >> 32ULL); in sc_seco_get_mp_sign()
1093 RPC_U32(&msg, 4U) = (u32)(msg_addr); in sc_seco_get_mp_sign()
1094 RPC_U32(&msg, 8U) = (u32)(dst_addr >> 32ULL); in sc_seco_get_mp_sign()
1095 RPC_U32(&msg, 12U) = (u32)(dst_addr); in sc_seco_get_mp_sign()
1096 RPC_U16(&msg, 16U) = (u16)(msg_size); in sc_seco_get_mp_sign()
1097 RPC_U16(&msg, 18U) = (u16)(dst_size); in sc_seco_get_mp_sign()
1099 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_get_mp_sign()
1103 dst_addr, dst_size, RPC_R8(&msg)); in sc_seco_get_mp_sign()
1113 struct sc_rpc_msg_s msg; in sc_seco_secvio_config() local
1117 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_secvio_config()
1118 RPC_SIZE(&msg) = 7U; in sc_seco_secvio_config()
1119 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_SECO); in sc_seco_secvio_config()
1120 RPC_FUNC(&msg) = (u8)(SECO_FUNC_SECVIO_CONFIG); in sc_seco_secvio_config()
1122 RPC_U32(&msg, 0U) = (u32)(*data0); in sc_seco_secvio_config()
1123 RPC_U32(&msg, 4U) = (u32)(*data1); in sc_seco_secvio_config()
1124 RPC_U32(&msg, 8U) = (u32)(*data2); in sc_seco_secvio_config()
1125 RPC_U32(&msg, 12U) = (u32)(*data3); in sc_seco_secvio_config()
1126 RPC_U32(&msg, 16U) = (u32)(*data4); in sc_seco_secvio_config()
1127 RPC_U8(&msg, 20U) = (u8)(id); in sc_seco_secvio_config()
1128 RPC_U8(&msg, 21U) = (u8)(access); in sc_seco_secvio_config()
1129 RPC_U8(&msg, 22U) = (u8)(size); in sc_seco_secvio_config()
1131 ret = misc_call(dev, SC_FALSE, &msg, msg_size, &msg, msg_size); in sc_seco_secvio_config()
1134 __func__, id, access, RPC_R8(&msg)); in sc_seco_secvio_config()
1136 *data0 = (u32)RPC_U32(&msg, 0U); in sc_seco_secvio_config()
1137 *data1 = (u32)RPC_U32(&msg, 4U); in sc_seco_secvio_config()
1138 *data2 = (u32)RPC_U32(&msg, 8U); in sc_seco_secvio_config()
1139 *data3 = (u32)RPC_U32(&msg, 12U); in sc_seco_secvio_config()
1140 *data4 = (u32)RPC_U32(&msg, 16U); in sc_seco_secvio_config()
1148 struct sc_rpc_msg_s msg; in sc_seco_secvio_dgo_config() local
1152 RPC_VER(&msg) = SC_RPC_VERSION; in sc_seco_secvio_dgo_config()
1153 RPC_SIZE(&msg) = 3U; in sc_seco_secvio_dgo_config()
1154 RPC_SVC(&msg) = (u8)(SC_RPC_SVC_SECO); in sc_seco_secvio_dgo_config()
1155 RPC_FUNC(&msg) = (u8)(SECO_FUNC_SECVIO_DGO_CONFIG); in sc_seco_secvio_dgo_config()
1157 RPC_U32(&msg, 0U) = (u32)(*data); in sc_seco_secvio_dgo_config()
1158 RPC_U8(&msg, 4U) = (u8)(id); in sc_seco_secvio_dgo_config()
1159 RPC_U8(&msg, 5U) = (u8)(access); in sc_seco_secvio_dgo_config()
1161 ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); in sc_seco_secvio_dgo_config()
1164 __func__, id, access, RPC_R8(&msg)); in sc_seco_secvio_dgo_config()
1167 *data = RPC_U32(&msg, 0U); in sc_seco_secvio_dgo_config()