xiaoxiang781216 commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2865483158
> Thanks everyone for your reviews and patience.
Your contribution improve the original driver a lot, thanks too.
--
This is an automated message from the Apache Git Servi
gpoulios commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2865334420
Thanks everyone for your reviews and patience.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to g
xiaoxiang781216 merged PR #16309:
URL: https://github.com/apache/nuttx/pull/16309
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscr...@nu
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079713761
##
drivers/misc/optee.c:
##
@@ -200,7 +522,19 @@ static int optee_open(FAR struct file *filep)
static int optee_close(FAR struct file *filep)
{
FAR struct
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079738587
##
drivers/misc/optee.c:
##
@@ -594,6 +993,204 @@ static int optee_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
* Public Functions
**
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079758107
##
drivers/misc/optee.c:
##
@@ -594,6 +993,204 @@ static int optee_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
* Public Functions
***
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079759628
##
drivers/misc/optee.h:
##
@@ -44,8 +46,17 @@
* Public Types
/
+struct optee_
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079753290
##
drivers/misc/optee.c:
##
@@ -200,7 +522,19 @@ static int optee_open(FAR struct file *filep)
static int optee_close(FAR struct file *filep)
{
FAR struct
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079727596
##
drivers/misc/optee.c:
##
@@ -200,7 +522,19 @@ static int optee_open(FAR struct file *filep)
static int optee_close(FAR struct file *filep)
{
FAR struct optee_p
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079744696
##
drivers/misc/optee.h:
##
@@ -44,8 +46,17 @@
* Public Types
/
+struct optee_shm_ent
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079738587
##
drivers/misc/optee.c:
##
@@ -594,6 +993,204 @@ static int optee_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
* Public Functions
**
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079727596
##
drivers/misc/optee.c:
##
@@ -200,7 +522,19 @@ static int optee_open(FAR struct file *filep)
static int optee_close(FAR struct file *filep)
{
FAR struct optee_p
xiaoxiang781216 commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2862951631
> > @gpoulios why mark the patch to draft?
>
> 3 reasons:
>
> * I don't see this getting @raiden00pl 's approval so I thought I'd
try re-writing some parts of the
gpoulios commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2862772230
Summary of changes in order of commit log:
- **sanity**: return `-EINVAL` (instead of `-EACCESS`) for all failures of
`optee_is_valid_range()`
- **shm**: add `static` to `optee_sh
gpoulios commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2862471447
And one more thing regarding mutexes: I see half of the code base checks
return codes of `nx{r}mutex_lock()`, half doesn't, and some outliers do `while
(nxmutex_lock(&lock) < 0);`. I wou
gpoulios commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2862158650
> @gpoulios why mark the patch to draft?
3 reasons:
- I don't see this getting @raiden00pl 's approval so I thought I'd try
re-writing some parts of the code but it turns out I
xiaoxiang781216 commented on PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#issuecomment-2862125127
@gpoulios why mark the patch to draft?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2078061212
##
drivers/misc/optee.c:
##
@@ -55,21 +57,87 @@
/* Some GlobalPlatform error codes used in this driver */
#define TEE_SUCCESS0x
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077933601
##
drivers/misc/optee.c:
##
@@ -55,21 +57,87 @@
/* Some GlobalPlatform error codes used in this driver */
#define TEE_SUCCESS0x
+#defin
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077895877
##
drivers/misc/optee.c:
##
@@ -55,21 +57,87 @@
/* Some GlobalPlatform error codes used in this driver */
#define TEE_SUCCESS0x
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077908265
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size) (true)
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077905466
##
drivers/misc/optee.c:
##
@@ -55,21 +57,87 @@
/* Some GlobalPlatform error codes used in this driver */
#define TEE_SUCCESS0x
+#defin
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077901273
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size)
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077496878
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size) (true)
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077150237
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size)
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077032401
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size) (true)
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077026793
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size)
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2077000910
##
drivers/misc/optee.c:
##
@@ -154,6 +202,245 @@ static bool optee_is_valid_range(FAR const void *va,
size_t size)
# define optee_is_valid_range(addr, size) (true)
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076634069
##
drivers/misc/optee.c:
##
@@ -70,7 +70,7 @@
#define TEE_ORIGIN_COMMS 0x0002
-#define OPTEE_DEV_PATH "/dev/tee0"
+#defi
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076606320
##
drivers/misc/optee.c:
##
@@ -125,52 +115,24 @@ static const struct file_operations g_optee_ops =
static int optee_open(FAR struct file *filep)
{
- FAR s
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076605132
##
include/nuttx/tee.h:
##
@@ -378,6 +378,13 @@ struct tee_iocl_supp_send_arg
#define TEE_IOC_SUPPL_SEND _IOC(TEE_IOC_MAGIC << 8, TEE_IOC_BASE + 7)
+/* Sha
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076604374
##
drivers/misc/optee.c:
##
@@ -125,52 +115,24 @@ static const struct file_operations g_optee_ops =
static int optee_open(FAR struct file *filep)
{
- FAR s
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076570540
##
drivers/misc/optee.c:
##
@@ -154,6 +202,248 @@ static bool optee_is_valid_range(FAR void *va, size_t
size)
# define optee_is_valid_range(addr, size) (true)
#end
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076562339
##
drivers/misc/optee.h:
##
@@ -64,6 +72,16 @@ extern "C"
#define EXTERN extern
#endif
+#ifdef CONFIG_ARCH_ADDRENV
+uintptr_t optee_va_to_pa(FAR void *va);
+#else
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076288814
##
drivers/misc/optee.c:
##
@@ -125,52 +115,24 @@ static const struct file_operations g_optee_ops =
static int optee_open(FAR struct file *filep)
{
- FAR struct s
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076288814
##
drivers/misc/optee.c:
##
@@ -125,52 +115,24 @@ static const struct file_operations g_optee_ops =
static int optee_open(FAR struct file *filep)
{
- FAR struct s
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076301484
##
include/nuttx/tee.h:
##
@@ -378,6 +378,13 @@ struct tee_iocl_supp_send_arg
#define TEE_IOC_SUPPL_SEND _IOC(TEE_IOC_MAGIC << 8, TEE_IOC_BASE + 7)
+/* Shared mem
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2076288814
##
drivers/misc/optee.c:
##
@@ -125,52 +115,24 @@ static const struct file_operations g_optee_ops =
static int optee_open(FAR struct file *filep)
{
- FAR struct s
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075981968
##
drivers/misc/optee_smc.c:
##
@@ -0,0 +1,322 @@
+/
+ * drivers/misc/optee_smc.c
+
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075950987
##
drivers/misc/optee.c:
##
@@ -154,6 +202,248 @@ static bool optee_is_valid_range(FAR void *va, size_t
size)
# define optee_is_valid_range(addr, size) (true
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075217001
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075276174
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075276174
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075217001
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075194354
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075194354
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075185420
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075183253
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_AR
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075016912
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2075016912
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074827254
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074827254
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074983072
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_ARCH_ADDR
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074827254
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074827254
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074827254
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074827254
##
drivers/misc/optee.c:
##
@@ -476,62 +956,83 @@ static int optee_ioctl_invoke(FAR struct optee_priv_data
*priv,
arg->ret = TEE_ERROR_COMMUNICATION;
arg->ret_o
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074817879
##
drivers/misc/optee.c:
##
@@ -348,8 +419,8 @@ static int optee_ioctl_open_session(FAR struct
optee_priv_data *priv,
msg->params + 2);
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074805787
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro to help
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074805787
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro to help
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074805787
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro to help
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074809921
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_ARCH_ADDR
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074805787
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro to help
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074805206
##
drivers/misc/optee.h:
##
@@ -0,0 +1,77 @@
+/
+ * drivers/misc/optee.h
+ *
+ * SPD
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074804683
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_AR
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074773932
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_ARCH_ADDR
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074799936
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074799133
##
drivers/misc/optee.h:
##
@@ -0,0 +1,77 @@
+/
+ * drivers/misc/optee.h
+ *
+ * SPD
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074781958
##
drivers/misc/optee.h:
##
@@ -0,0 +1,77 @@
+/
+ * drivers/misc/optee.h
+ *
+ * SPDX-Licen
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074781958
##
drivers/misc/optee.h:
##
@@ -0,0 +1,77 @@
+/
+ * drivers/misc/optee.h
+ *
+ * SPDX-Licen
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074777223
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_ARCH_ADDR
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074773932
##
drivers/misc/optee.c:
##
@@ -145,10 +207,398 @@ static bool optee_safe_va_range(FAR void *va, size_t
size)
return false;
}
-#else
+#else /* !CONFIG_ARCH_ADDR
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074746657
##
drivers/misc/optee.c:
##
@@ -125,52 +115,24 @@ static const struct file_operations g_optee_ops =
static int optee_open(FAR struct file *filep)
{
- FAR struct s
gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2074743563
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro to help
xiaoxiang781216 commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2073947475
##
include/nuttx/tee.h:
##
@@ -198,6 +198,10 @@ struct tee_ioctl_shm_register_fd_data
#define TEE_IOCTL_LOGIN_REE_KERNEL 0x8000
+/* Macro
75 matches
Mail list logo