diff mbox series

[v2,06/17] warp7: Print out the OPTEE DRAM region

Message ID 1522708936-7603-7-git-send-email-bryan.odonoghue@linaro.org
State Superseded
Headers show
Series warp7: Enable automated OPTEE/HAB boot flow | expand

Commit Message

Bryan O'Donoghue April 2, 2018, 10:42 p.m. UTC
Right now a region of 0x300000 bytes is allocated at the end of DRAM for
the purposes of loading an OPTEE firmware inside of it. This patch adds the
printout of the relevant address ranges.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 board/warp7/warp7.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Breno Matheus Lima April 7, 2018, 12:36 p.m. UTC | #1
Hi Bryan,

2018-04-02 19:42 GMT-03:00 Bryan O'Donoghue <bryan.odonoghue@linaro.org>:
> Right now a region of 0x300000 bytes is allocated at the end of DRAM for
> the purposes of loading an OPTEE firmware inside of it. This patch adds the
> printout of the relevant address ranges.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Just a quick question here, It was your intention to do not add
CONFIG_OPTEE_TZDRAM_SIZE=0x300000 in your series? So users can setup
according their requirements?

Thanks,
Breno Lima
Bryan O'Donoghue April 8, 2018, 11:21 a.m. UTC | #2
On 07/04/18 13:36, Breno Matheus Lima wrote:
> Hi Bryan,
> 
> 2018-04-02 19:42 GMT-03:00 Bryan O'Donoghue <bryan.odonoghue@linaro.org>:
>> Right now a region of 0x300000 bytes is allocated at the end of DRAM for
>> the purposes of loading an OPTEE firmware inside of it. This patch adds the
>> printout of the relevant address ranges.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> 
> Just a quick question here, It was your intention to do not add
> CONFIG_OPTEE_TZDRAM_SIZE=0x300000 in your series? So users can setup
> according their requirements?

d89a5aa6d086e4b3242dbdbe97183f5b25468299 ("optee: Add 
CONFIG_OPTEE_TZDRAM_SIZE") defaults to 0x300000 but you can set the size 
to whatever you like in your defconfig.

The important thing is to make sure u-boot and optee agree what the size 
of the eaten chunk is.
diff mbox series

Patch

diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 56f0cdd..da52b18 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -181,7 +181,17 @@  int checkboard(void)
 	else
 		mode = "non-secure";
 
+#ifdef CONFIG_OPTEE_TZDRAM_SIZE
+	unsigned long optee_start, optee_end;
+
+	optee_end = PHYS_SDRAM + PHYS_SDRAM_SIZE;
+	optee_start = optee_end - CONFIG_OPTEE_TZDRAM_SIZE;
+
+	printf("Board: WARP7 in %s mode OPTEE DRAM 0x%08lx-0x%08lx\n",
+	       mode, optee_start, optee_end);
+#else
 	printf("Board: WARP7 in %s mode\n", mode);
+#endif
 
 	return 0;
 }