FWU: Add Generic Firmware Update framework support in BL1
Firmware update(a.k.a FWU) feature is part of the TBB architecture.
BL1 is responsible for carrying out the FWU process if platform
specific code detects that it is needed.

This patch adds support for FWU feature support in BL1 which is
included by enabling `TRUSTED_BOARD_BOOT` compile time flag.

This patch adds bl1_fwu.c which contains all the core operations
of FWU, which are; SMC handler, image copy, authentication, execution
and resumption. It also adds bl1.h introducing #defines for all
BL1 SMCs.

Following platform porting functions are introduced:

int bl1_plat_mem_check(uintptr_t mem_base, unsigned int mem_size,
unsigned int flags);
	This function can be used to add platform specific memory checks
	for the provided base/size for the given security state.
	The weak definition will invoke `assert()` and return -ENOMEM.

__dead2 void bl1_plat_fwu_done(void *cookie, void *reserved);
	This function can be used to initiate platform specific procedure
	to mark completion of the FWU process.
	The weak definition waits forever calling `wfi()`.

plat_bl1_common.c contains weak definitions for above functions.

FWU process starts when platform detects it and return the image_id
other than BL2_IMAGE_ID by using `bl1_plat_get_next_image_id()` in
`bl1_main()`.

NOTE: User MUST provide platform specific real definition for
bl1_plat_mem_check() in order to use it for Firmware update.

Change-Id: Ice189a0885d9722d9e1dd03f76cac1aceb0e25ed
1 parent 7baff11 commit 48bfb88eb6087bb3a293a13a0f702a0e40466b14
@Yatharth Kochar Yatharth Kochar authored on 10 Oct 2015
Showing 16 changed files
View
Makefile
View
bl1/aarch64/bl1_exceptions.S
View
bl1/bl1.mk
View
bl1/bl1_context_mgmt.c
View
bl1/bl1_fwu.c 0 → 100644
View
bl1/bl1_main.c
View
bl1/bl1_private.h
View
bl1/tbbr/tbbr_img_desc.c 0 → 100644
View
bl2/bl2_main.c
View
drivers/auth/tbbr/tbbr_cot.c
View
include/bl1/bl1.h 0 → 100644
View
include/bl1/tbbr/tbbr_img_desc.h 0 → 100644
View
include/common/bl_common.h
View
include/common/tbbr/tbbr_img_def.h
View
include/plat/common/platform.h
View
plat/common/plat_bl1_common.c