diff mbox series

[v2,09/17] warp7: defconfig: Enable CONFIG_BOOTM_TEE

Message ID 1522708936-7603-10-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
This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to
chain-load Linux through OPTEE.

Loading kernel to 0x80800000
=> run loadimage

Load FDT to 0x83000000
=> run loadfdt

Load OPTEE to 0x84000000
=> fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee

Then chain-load to the kernel via OPTEE

=> bootm 0x84000000 - 0x83000000

   Image Name:
   Image Type:   ARM Trusted Execution Environment Kernel Image (uncompressed)
   Data Size:    249844 Bytes = 244 KiB
   Load Address: 9dffffe4
   Entry Point:  9e000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 configs/warp7_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

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

2018-04-02 19:42 GMT-03:00 Bryan O'Donoghue <bryan.odonoghue@linaro.org>:
> This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to
> chain-load Linux through OPTEE.
>
> Loading kernel to 0x80800000
> => run loadimage
>
> Load FDT to 0x83000000
> => run loadfdt
>
> Load OPTEE to 0x84000000
> => fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee
>
> Then chain-load to the kernel via OPTEE
>
> => bootm 0x84000000 - 0x83000000
>
>    Image Name:
>    Image Type:   ARM Trusted Execution Environment Kernel Image (uncompressed)
>    Data Size:    249844 Bytes = 244 KiB
>    Load Address: 9dffffe4
>    Entry Point:  9e000000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK


I'm seeing the following cache misaligned operation warning in my
environment, did I miss something on my OPTEE build?

=> bootm 0x84000000 - 0x83000000
## Booting kernel from Legacy Image at 84000000 ...
   Image Name:
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    274844 Bytes = 268.4 KiB
   Load Address: 9dffffe4
   Entry Point:  9e000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Loading Kernel Image ... OK
CACHE: Misaligned operation at range [9dffffe4, 9e0431a4]
   Using Device Tree in place at 83000000, end 830095b6

Thanks,
Breno Lima
Bryan O'Donoghue April 8, 2018, 11:40 a.m. UTC | #2
On 07/04/18 13:32, Breno Matheus Lima wrote:
> Hi Bryan,
> 
> 2018-04-02 19:42 GMT-03:00 Bryan O'Donoghue <bryan.odonoghue@linaro.org>:
>> This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to
>> chain-load Linux through OPTEE.
>>
>> Loading kernel to 0x80800000
>> => run loadimage
>>
>> Load FDT to 0x83000000
>> => run loadfdt
>>
>> Load OPTEE to 0x84000000
>> => fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee
>>
>> Then chain-load to the kernel via OPTEE
>>
>> => bootm 0x84000000 - 0x83000000
>>
>>     Image Name:
>>     Image Type:   ARM Trusted Execution Environment Kernel Image (uncompressed)
>>     Data Size:    249844 Bytes = 244 KiB
>>     Load Address: 9dffffe4
>>     Entry Point:  9e000000
>>     Verifying Checksum ... OK
>>     Loading Kernel Image ... OK
> 
> 
> I'm seeing the following cache misaligned operation warning in my
> environment, did I miss something on my OPTEE build?
> 
> => bootm 0x84000000 - 0x83000000
> ## Booting kernel from Legacy Image at 84000000 ...
>     Image Name:
>     Image Type:   ARM Linux Kernel Image (uncompressed)
>     Data Size:    274844 Bytes = 268.4 KiB
>     Load Address: 9dffffe4
>     Entry Point:  9e000000
>     Verifying Checksum ... OK
> ## Flattened Device Tree blob at 83000000
>     Booting using the fdt blob at 0x83000000
>     Loading Kernel Image ... OK
> CACHE: Misaligned operation at range [9dffffe4, 9e0431a4]
>     Using Device Tree in place at 83000000, end 830095b6

No.

I hadn't paid too much attention to this but - yeah, I'll add something 
to this series to flush the range starting at (9e000000 - cache_line_size).

The alternative is to change the entry point address which requires an 
OPTEE change
diff mbox series

Patch

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index efb6f51..d5dc009 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -47,3 +47,4 @@  CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_OF_LIBFDT=y
 CONFIG_OPTEE=y
 CONFIG_OPTEE_LOAD_ADDR=0x84000000
+CONFIG_BOOTM_OPTEE=y