diff mbox

[U-Boot,v4,05/10] board: am33xx-hs: Allow post-processing of FIT image on AM33xx

Message ID 20160830190629.13956-6-afd@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Andrew Davis Aug. 30, 2016, 7:06 p.m. UTC
When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS
is enabled board_fit_image_post_process will be called, add this
function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to
verify the loaded image.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 board/ti/am335x/board.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Lokesh Vutla Aug. 31, 2016, 3:28 a.m. UTC | #1
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote:
> When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS
> is enabled board_fit_image_post_process will be called, add this
> function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to
> verify the loaded image.


Acked-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> ---
>  board/ti/am335x/board.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 56f4984..0ed16ca 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -25,6 +25,7 @@
>  #include <asm/io.h>
>  #include <asm/emif.h>
>  #include <asm/gpio.h>
> +#include <asm/omap_sec_common.h>
>  #include <i2c.h>
>  #include <miiphy.h>
>  #include <cpsw.h>
> @@ -775,3 +776,10 @@ int board_fit_config_name_match(const char *name)
>  		return -1;
>  }
>  #endif
> +
> +#ifdef CONFIG_TI_SECURE_DEVICE
> +void board_fit_image_post_process(void **p_image, size_t *p_size)
> +{
> +	secure_boot_verify_image(p_image, p_size);
> +}
> +#endif
>
Tom Rini Sept. 2, 2016, 2:53 p.m. UTC | #2
On Tue, Aug 30, 2016 at 02:06:24PM -0500, Andrew F. Davis wrote:

> When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS
> is enabled board_fit_image_post_process will be called, add this
> function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to
> verify the loaded image.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini Oct. 3, 2016, 1:38 p.m. UTC | #3
On Tue, Aug 30, 2016 at 02:06:24PM -0500, Andrew F. Davis wrote:

> When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS
> is enabled board_fit_image_post_process will be called, add this
> function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to
> verify the loaded image.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 56f4984..0ed16ca 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -25,6 +25,7 @@ 
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
+#include <asm/omap_sec_common.h>
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
@@ -775,3 +776,10 @@  int board_fit_config_name_match(const char *name)
 		return -1;
 }
 #endif
+
+#ifdef CONFIG_TI_SECURE_DEVICE
+void board_fit_image_post_process(void **p_image, size_t *p_size)
+{
+	secure_boot_verify_image(p_image, p_size);
+}
+#endif