arm: mach-omap2: Relax checks on OP-TEE location to allow pageable image
authorHarinarayan Bhatta <harinarayan@ti.com>
Wed, 13 Sep 2017 18:27:44 +0000 (13:27 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 15 Sep 2017 13:03:16 +0000 (09:03 -0400)
When the OP-TEE image is built for secure paging the load address may be
in SRAM, remove checks that prevent this.

Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-omap2/sec-common.c

index 2d54a3165ef3a278b86002e3d1d266c84cfffa97..52e1785b4aaa73eae184f59c2d6b67f655d61cba 100644 (file)
@@ -305,12 +305,8 @@ int secure_tee_install(u32 addr)
 
        if ((hdr->magic != OPTEE_MAGIC) ||
            (hdr->version != OPTEE_VERSION) ||
-           (hdr->init_load_addr_hi != 0) ||
-           (hdr->init_load_addr_lo < (sec_mem_start + sizeof(struct optee_header))) ||
-           (tee_file_size > size) ||
-           ((hdr->init_load_addr_lo + tee_file_size - 1) >
-            (sec_mem_start + size - 1))) {
-               printf("Error in TEE header. Check load address and sizes\n");
+           (tee_file_size > size)) {
+               printf("Error in TEE header. Check firewall and TEE sizes\n");
                unmap_sysmem(hdr);
                return CMD_RET_FAILURE;
        }