From dae5c2dcdc2bc826a4ee0a58b08fd004b6259373 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Sun, 10 Feb 2019 21:34:37 +0100 Subject: spl: implement CRC check on U-Boot uImage SPL currently does not check uImage CRCs when loading U-Boot. This patch adds checking the uImage CRC when SPL loads U-Boot. It does this by reusing the existing config option SPL_CRC32_SUPPORT to allow leaving out the CRC check on boards where the additional code size or boot time is a problem (adding the CRC check currently adds ~1.4 kByte to flash). The SPL_CRC32_SUPPORT config option now gets enabled by default if SPL support for legacy images is enabled to check the CRC on all boards that don't actively take countermeasures. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- include/spl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/spl.h') diff --git a/include/spl.h b/include/spl.h index c82f2fd033..f09909e189 100644 --- a/include/spl.h +++ b/include/spl.h @@ -74,6 +74,11 @@ struct spl_image_info { u32 size; u32 flags; void *arg; +#ifdef CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK + ulong dcrc_data; + ulong dcrc_length; + ulong dcrc; +#endif }; /* -- cgit v1.2.3