Lines Matching +full:secure +full:- +full:monitor
2 * Amlogic Secure Monitor driver
15 #define pr_fmt(fmt) "meson-sm: " fmt
17 #include <linux/arm-smccc.h>
66 const struct meson_sm_cmd *cmd = chip->cmd; in meson_sm_get_cmd()
68 while (cmd->smc_id && cmd->index != cmd_index) in meson_sm_get_cmd()
71 return cmd->smc_id; in meson_sm_get_cmd()
95 * meson_sm_call - generic SMC32 call to the secure-monitor
113 return -ENOENT; in meson_sm_call()
117 return -EINVAL; in meson_sm_call()
129 * meson_sm_call_read - retrieve data from secure-monitor
151 return -ENOENT; in meson_sm_call_read()
153 if (!fw.chip->cmd_shmem_out_base) in meson_sm_call_read()
154 return -EINVAL; in meson_sm_call_read()
156 if (bsize > fw.chip->shmem_size) in meson_sm_call_read()
157 return -EINVAL; in meson_sm_call_read()
160 return -EINVAL; in meson_sm_call_read()
163 return -EINVAL; in meson_sm_call_read()
178 * meson_sm_call_write - send data to secure-monitor
197 return -ENOENT; in meson_sm_call_write()
199 if (size > fw.chip->shmem_size) in meson_sm_call_write()
200 return -EINVAL; in meson_sm_call_write()
202 if (!fw.chip->cmd_shmem_in_base) in meson_sm_call_write()
203 return -EINVAL; in meson_sm_call_write()
208 return -EINVAL; in meson_sm_call_write()
211 return -EINVAL; in meson_sm_call_write()
218 { .compatible = "amlogic,meson-gxbb-sm", .data = &gxbb_chip },
226 chip = of_match_device(meson_sm_ids, &pdev->dev)->data; in meson_sm_probe()
228 if (chip->cmd_shmem_in_base) { in meson_sm_probe()
229 fw.sm_shmem_in_base = meson_sm_map_shmem(chip->cmd_shmem_in_base, in meson_sm_probe()
230 chip->shmem_size); in meson_sm_probe()
235 if (chip->cmd_shmem_out_base) { in meson_sm_probe()
236 fw.sm_shmem_out_base = meson_sm_map_shmem(chip->cmd_shmem_out_base, in meson_sm_probe()
237 chip->shmem_size); in meson_sm_probe()
243 pr_info("secure-monitor enabled\n"); in meson_sm_probe()
250 return -EINVAL; in meson_sm_probe()
255 .name = "meson-sm",