* [PATCH] common: optee: improve documentation of options
@ 2025-06-03 10:59 Ahmad Fatoum
2025-06-03 11:00 ` Ahmad Fatoum
2025-06-05 6:55 ` Sascha Hauer
0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2025-06-03 10:59 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum, Fabian Pflug
CONFIG_OPTEE_SIZE and CONFIG_OPTEE_SHM_SIZE have a correspondence to OP-TEE
build config options, so point that out in the help text.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Cc: Fabian Pflug <fpg@pengutronix.de>
---
common/Kconfig | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig
index fe50da8f3084..987148847eac 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1304,9 +1304,11 @@ config OPTEE_SIZE
prompt "OP-TEE Memory Size"
depends on HAVE_OPTEE
help
- Size to reserve in main memory for OP-TEE.
+ Size to reserve in main memory for OP-TEE, including its shared memory.
Can be larger than the actual size used by OP-TEE, this is used to prevent
barebox from using or speculating into this area.
+ On i.MX, this should be at least OP-TEE CFG_TZDRAM + CFG_SHMEM_SIZE.
+ The name of the CFG_ options may differ on other platforms.
config OPTEE_SHM_SIZE
hex
@@ -1315,7 +1317,11 @@ config OPTEE_SHM_SIZE
depends on HAVE_OPTEE
help
Size to reserve in main memory for static OP-TEE shared memory
- communication. Can be used for fixing up the OP-TEE OF node.
+ communication. The OP-TEE shared memory starts directly after
+ the OPTEE TZDRAM region. It should be chosen to be equivalent
+ to CFG_SHMEM_SIZE in OP-TEE.
+
+ This value can be used for fixing up the OP-TEE OF node.
A shared memory size of 0 means that only dynamic shared memory
will be supported for communication with OP-TEE. This is the only
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] common: optee: improve documentation of options
2025-06-03 10:59 [PATCH] common: optee: improve documentation of options Ahmad Fatoum
@ 2025-06-03 11:00 ` Ahmad Fatoum
2025-06-05 6:55 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2025-06-03 11:00 UTC (permalink / raw)
To: barebox; +Cc: Fabian Pflug
Hi,
On 6/3/25 12:59, Ahmad Fatoum wrote:
> CONFIG_OPTEE_SIZE and CONFIG_OPTEE_SHM_SIZE have a correspondence to OP-TEE
> build config options, so point that out in the help text.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
v1 -> v2:
- fix confusion about CFG_SHMEM_SIZE erroneously not being part of
CONFIG_OPTEE_SIZE
> Cc: Fabian Pflug <fpg@pengutronix.de>
> ---
> common/Kconfig | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index fe50da8f3084..987148847eac 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -1304,9 +1304,11 @@ config OPTEE_SIZE
> prompt "OP-TEE Memory Size"
> depends on HAVE_OPTEE
> help
> - Size to reserve in main memory for OP-TEE.
> + Size to reserve in main memory for OP-TEE, including its shared memory.
> Can be larger than the actual size used by OP-TEE, this is used to prevent
> barebox from using or speculating into this area.
> + On i.MX, this should be at least OP-TEE CFG_TZDRAM + CFG_SHMEM_SIZE.
> + The name of the CFG_ options may differ on other platforms.
>
> config OPTEE_SHM_SIZE
> hex
> @@ -1315,7 +1317,11 @@ config OPTEE_SHM_SIZE
> depends on HAVE_OPTEE
> help
> Size to reserve in main memory for static OP-TEE shared memory
> - communication. Can be used for fixing up the OP-TEE OF node.
> + communication. The OP-TEE shared memory starts directly after
> + the OPTEE TZDRAM region. It should be chosen to be equivalent
> + to CFG_SHMEM_SIZE in OP-TEE.
> +
> + This value can be used for fixing up the OP-TEE OF node.
>
> A shared memory size of 0 means that only dynamic shared memory
> will be supported for communication with OP-TEE. This is the only
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] common: optee: improve documentation of options
2025-06-03 10:59 [PATCH] common: optee: improve documentation of options Ahmad Fatoum
2025-06-03 11:00 ` Ahmad Fatoum
@ 2025-06-05 6:55 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2025-06-05 6:55 UTC (permalink / raw)
To: barebox, Ahmad Fatoum; +Cc: Fabian Pflug
On Tue, 03 Jun 2025 12:59:14 +0200, Ahmad Fatoum wrote:
> CONFIG_OPTEE_SIZE and CONFIG_OPTEE_SHM_SIZE have a correspondence to OP-TEE
> build config options, so point that out in the help text.
>
>
Applied, thanks!
[1/1] common: optee: improve documentation of options
https://git.pengutronix.de/cgit/barebox/commit/?id=e542b1115575 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] common: optee: improve documentation of options
2025-06-02 14:55 Ahmad Fatoum
@ 2025-06-03 8:07 ` Ahmad Fatoum
0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2025-06-03 8:07 UTC (permalink / raw)
To: barebox; +Cc: Fabian Pflug
Hi,
On 6/2/25 16:55, Ahmad Fatoum wrote:
> CONFIG_OPTEE_SIZE and CONFIG_OPTEE_SHM_SIZE have a direct correspondence
> to OP-TEE build config options, so point that out in the help text.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Cc: Fabian Pflug <fpg@pengutronix.de>
> ---
> common/Kconfig | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index fe50da8f3084..12982b45c59d 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -1307,6 +1307,7 @@ config OPTEE_SIZE
> Size to reserve in main memory for OP-TEE.
> Can be larger than the actual size used by OP-TEE, this is used to prevent
> barebox from using or speculating into this area.
> + This should be at least as big as CFG_TZDRAM_SIZE in OP-TEE.
This is not completely correct. As OPTEE_SIZE is used as offset from the
end of RAM, this needs to include SHMEM as well. I will revise and
resent a v2.
Cheers,
Ahmad
>
> config OPTEE_SHM_SIZE
> hex
> @@ -1315,7 +1316,11 @@ config OPTEE_SHM_SIZE
> depends on HAVE_OPTEE
> help
> Size to reserve in main memory for static OP-TEE shared memory
> - communication. Can be used for fixing up the OP-TEE OF node.
> + communication. The OP-TEE shared memory starts directly after
> + the OPTEE TZDRAM region. It should be chosen to be equivalent
> + to CFG_SHMEM_SIZE in OP-TEE.
> +
> + This value can be used for fixing up the OP-TEE OF node.
>
> A shared memory size of 0 means that only dynamic shared memory
> will be supported for communication with OP-TEE. This is the only
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] common: optee: improve documentation of options
@ 2025-06-02 14:55 Ahmad Fatoum
2025-06-03 8:07 ` Ahmad Fatoum
0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2025-06-02 14:55 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum, Fabian Pflug
CONFIG_OPTEE_SIZE and CONFIG_OPTEE_SHM_SIZE have a direct correspondence
to OP-TEE build config options, so point that out in the help text.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Cc: Fabian Pflug <fpg@pengutronix.de>
---
common/Kconfig | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig
index fe50da8f3084..12982b45c59d 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1307,6 +1307,7 @@ config OPTEE_SIZE
Size to reserve in main memory for OP-TEE.
Can be larger than the actual size used by OP-TEE, this is used to prevent
barebox from using or speculating into this area.
+ This should be at least as big as CFG_TZDRAM_SIZE in OP-TEE.
config OPTEE_SHM_SIZE
hex
@@ -1315,7 +1316,11 @@ config OPTEE_SHM_SIZE
depends on HAVE_OPTEE
help
Size to reserve in main memory for static OP-TEE shared memory
- communication. Can be used for fixing up the OP-TEE OF node.
+ communication. The OP-TEE shared memory starts directly after
+ the OPTEE TZDRAM region. It should be chosen to be equivalent
+ to CFG_SHMEM_SIZE in OP-TEE.
+
+ This value can be used for fixing up the OP-TEE OF node.
A shared memory size of 0 means that only dynamic shared memory
will be supported for communication with OP-TEE. This is the only
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-05 6:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-03 10:59 [PATCH] common: optee: improve documentation of options Ahmad Fatoum
2025-06-03 11:00 ` Ahmad Fatoum
2025-06-05 6:55 ` Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2025-06-02 14:55 Ahmad Fatoum
2025-06-03 8:07 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox