Commit Graph

9 Commits

Author SHA1 Message Date
Madan Srinivas
0830d72bb9 arm: am33xx: security: adds auth support for encrypted images
This patch adds support for authentication of both plain
text and encrypted binaries. A new SECDEV package is needed
to enable encryption of binaries by default for AM3x.

The ROM authentication API detects encrypted images at
runtime and automatically decrypts the image if the
signature verification passes.

Addition of encryption on AM3x results in a change in the
image format. On AM4x, AM5x and, on AM3x devices signing
clear test images, the signature is appended to the end of the
binary.

On AM3x, when the SECDEV package is used to create signed
and encrypted images, the signature is added as a header
to the start of the binary. So the binary size calculation
has been updated to reflect this change.

The signing tools and encrypted image format for AM3x
cannot be changed to behave like AM4x and AM5x to
maintain backward compatibility with older Sitara
M-Shield releases.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-09-29 14:07:55 -04:00
Harinarayan Bhatta
a1e4bc65e1 arm: mach-omap2: Relax checks on OP-TEE location to allow pageable image
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>
2017-09-15 09:03:16 -04:00
Andrew F. Davis
ef3fc42ded arm: mach-omap2: Align image address before cache operations
The image address passed to secure_boot_verify_image() may not be
cacheline aligned, round the address down to the nearest cacheline.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-07-31 12:21:39 -04:00
Andrew F. Davis
03750231a8 arm: mach-omap2: Factor out common FDT fixup suport
Some of the fixups currently done for OMAP5 class boards are common to
other OMAP family devices, move these to fdt-common.c.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-07-22 22:22:43 -04:00
Andrew F. Davis
3348e0c0a6 arm: mach-omap2: Move omap5/sec-fxns.c into sec-common.c
TEE loading and firewall setup are common to all omap2 devices, move
these function out of omap5 and into mach-omap2. This allows us
to use these functions from other omap class devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-07-22 22:22:42 -04:00
xypron.glpk@gmx.de
1ecd2a2f06 arm: omap-common: add missing va_end()
Each call of va_start must be matched by a call of va_end.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-18 10:29:20 -04:00
Andrew F. Davis
4f65ee3813 arm: mach-omap2: Flush cache after FIT post-processing image
After we authenticate/decrypt an image we need to flush the caches
as they may still contain bits of the encrypted image. This will
cause failures if we attempt to jump to this image.

Reported-by: Yogesh Siraswar<yogeshs@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-02-27 12:14:59 -05:00
Andrew F. Davis
4ac19bae2d arm: omap-common: add secure ROM signature verify index for AM33xx
On AM33xx devices the secure ROM uses a different call index for
signature verification, the function and arguments are the same.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-01-14 16:46:24 -05:00
Tom Rini
983e37007d arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms
This moves what was in arch/arm/cpu/armv7/omap-common in to
arch/arm/mach-omap2 and moves
arch/arm/cpu/armv7/{am33xx,omap3,omap4,omap5} in to arch/arm/mach-omap2
as subdirectories.  All refernces to the former locations are updated to
the current locations.  For the logic to decide what our outputs are,
consolidate the tests into a single config.mk rather than including 4.

Signed-off-by: Tom Rini <trini@konsulko.com>
2016-11-21 14:07:29 -05:00