u-boot/common
Ye Li b08a044d92 MLK-16758-4 SPL: Add HAB image authentication to FIT
Introduce two board level callback functions to FIT image loading process, and
a SPL_FIT_FOUND flag to differentiate FIT image or RAW image.

Implement functions in imx common SPL codes to call HAB funtion
to authenticate the FIT image. Generally, we have to sign multiple regions
in FIT image:
1. Sign FIT FDT data (configuration)
2. Sign FIT external data (Sub-images)

Because the CSF supports to sign multiple memory blocks, so that we can use one
signature to cover all regions in FIT image and only authenticate once.
The authentication should be done after the entire FIT image is loaded into
memory including all sub-images.
We use "-p" option to generate FIT image to reserve a space for FIT IVT
and FIT CSF, also this help to fix the offset of the external data (u-boot-nodtb.bin,
ATF, u-boot DTB).

The signed FIT image layout is as below:
--------------------------------------------------
|     |     |     |   |           |     |        |
| FIT | FIT | FIT |   | U-BOOT    | ATF | U-BOOT |
| FDT | IVT | CSF |   | nodtb.bin |     |   DTB  |
|     |     |     |   |           |     |        |
--------------------------------------------------

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 078dd4eed6a04c3db7ec49a1bd1fbc63ebb82e1b)
2018-04-27 02:32:17 -07:00
..
eeprom
init spl: make SPL and normal u-boot stage use independent SYS_MALLOC_F_LEN 2017-07-27 14:59:03 +02:00
spl MLK-16758-4 SPL: Add HAB image authentication to FIT 2018-04-27 02:32:17 -07:00
Kconfig Convert CONFIG_BOOTP_BOOTPATH et al to Kconfig 2018-02-23 21:41:49 -05:00
Makefile dfu: Rename _FUNCTION_DFU to DFU_OVER_ 2018-02-21 20:28:15 +01:00
autoboot.c MLK-18157 mfgtool: Add mfgtool support 2018-04-27 02:30:47 -07:00
bedbug.c
board_f.c common: board_f: Fix style violations 2018-01-28 09:36:28 -05:00
board_info.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
board_r.c fix spelling of 'functions' in 2 places (was 'funtcions') 2018-02-13 23:24:22 -05:00
boot_fit.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
bootm.c fpga: allow programming fpga from FIT image for all FPGA drivers 2017-12-14 16:09:39 +01:00
bootm_os.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
bootretry.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
bootstage.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
bouncebuf.c
cli.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cli_hush.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cli_readline.c common: cli_readline: Improve command line editing 2016-08-20 14:03:24 -04:00
cli_simple.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
command.c common: command: tempory buffer should have size of command line buf 2017-11-29 22:30:50 -05:00
common_fit.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
console.c Revert "sandbox: Drop special case console code for sandbox" 2017-12-07 15:17:00 -05:00
cros_ec.c
ddr_spd.c
dfu.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
dlmalloc.c malloc: don't compare pointers to 0 2017-11-20 20:18:39 -05:00
dlmalloc.src
edid.c edid: Use sizeof() in cea_is_hdmi_vsdb_present() 2017-06-12 08:38:06 -04:00
exports.c
fb_mmc.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
fb_nand.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
fdt_support.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
flash.c flash: Fix spelling of "ERR_TIMOUT" 2018-01-29 07:48:59 +01:00
hash.c crypto/fsl: Fix HW accelerated hash commands 2018-01-23 11:21:20 -08:00
hwconfig.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
image-android.c parse the second area of android image 2018-02-07 21:58:26 -05:00
image-fdt.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
image-fit.c fix incorrect usage of DT node unit address in comments 2018-01-15 18:29:21 -07:00
image-sig.c fix incorrect usage of DT node unit address in comments 2018-01-15 18:29:21 -07:00
image-sparse.c
image.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
iomux.c console: Don't enable CONFIG-CONSOLE_MUX, etc. in SPL 2017-02-06 11:38:46 +08:00
iotrace.c
kallsyms.c
kgdb.c
kgdb_stubs.c
lcd.c MLK-11211 lcd: fix build warning 2018-04-27 02:21:18 -07:00
lcd_console.c MLK-12425-2 video: epdc: introduce epdc support 2018-04-27 02:21:17 -07:00
lcd_console_rotation.c
lcd_simplefb.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
log.c log: add category LOGC_EFI 2018-02-03 10:09:28 -07:00
log_console.c log: Update log_console to honour the log format 2018-02-03 10:09:27 -07:00
lynxkdi.c powerpc: remove 4xx support 2017-07-03 17:35:28 -04:00
main.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
malloc_simple.c malloc_simple: Add debug statements to memalign_simple 2017-01-28 14:04:34 -05:00
memsize.c
menu.c
miiphyutil.c common: miiphyutil: Add helper function for mdio bus name 2016-12-20 07:40:04 +01:00
s_record.c
splash.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
splash_source.c splash_source: Verify FIT magic 2017-09-04 23:53:47 +02:00
stdio.c Drop the log buffer 2017-12-07 15:17:00 -05:00
system_map.c
update.c tftp: update: Include missing cfi_flash.h header 2018-02-13 20:34:07 -05:00
usb.c usb: Read device descriptor after device is addressed for xHCI 2017-10-01 16:32:53 +02:00
usb_hub.c usb: Correct use of debug() 2017-12-07 15:17:00 -05:00
usb_kbd.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
usb_storage.c usb: storage: Fix overwritten in usb_stor_set_max_xfer_blk() 2017-10-01 16:32:55 +02:00
xyzModem.c common/xyzModem.c: Do not use hard-coded address for debug buffer 2017-04-08 09:26:55 -04:00