Factor out cross-BL API into export headers suitable for 3rd party code
authorJulius Werner <jwerner@chromium.org>
Wed, 29 May 2019 04:03:58 +0000 (21:03 -0700)
committerJulius Werner <jwerner@chromium.org>
Wed, 24 Jul 2019 03:25:34 +0000 (20:25 -0700)
commit57bf6057721306d1ad1af1122a831789ded92885
tree53dc0c59a20a684d7f9d0784cba78942e4ae56db
parent9352be88033900f89aa50dfbb13a13d40d698a9e
Factor out cross-BL API into export headers suitable for 3rd party code

This patch adds a new include/export/ directory meant for inclusion in
third-party code. This is useful for cases where third-party code needs
to interact with TF-A interfaces and data structures (such as a custom
BL2-implementation like coreboot handing off to BL31). Directly
including headers from the TF-A repository avoids having to duplicate
all these definitions (and risk them going stale), but with the current
header structure this is not possible because handoff API definitions
are too deeply intertwined with other TF code/headers and chain-include
other headers that will not be available in the other environment.

The new approach aims to solve this by separating only the parts that
are really needed into these special headers that are self-contained and
will not chain-include other (non-export) headers. TF-A code should
never include them directly but should instead always include the
respective wrapper header, which will include the required prerequisites
(like <stdint.h>) before including the export header. Third-party code
can include the export headers via its own wrappers that make sure the
necessary definitions are available in whatever way that environment can
provide them.

Change-Id: Ifd769320ba51371439a8e5dd5b79c2516c3b43ab
Signed-off-by: Julius Werner <jwerner@chromium.org>
17 files changed:
include/common/bl_common.h
include/common/ep_info.h
include/common/param_header.h
include/common/tbbr/tbbr_img_def.h
include/drivers/gpio.h
include/export/README [new file with mode: 0644]
include/export/common/bl_common_exp.h [new file with mode: 0644]
include/export/common/ep_info_exp.h [new file with mode: 0644]
include/export/common/param_header_exp.h [new file with mode: 0644]
include/export/common/tbbr/tbbr_img_def_exp.h [new file with mode: 0644]
include/export/drivers/gpio_exp.h [new file with mode: 0644]
include/export/lib/bl_aux_params/bl_aux_params_exp.h [new file with mode: 0644]
include/export/lib/utils_def_exp.h [new file with mode: 0644]
include/export/plat/rockchip/common/plat_params_exp.h [new file with mode: 0644]
include/lib/bl_aux_params/bl_aux_params.h
include/lib/utils_def.h
plat/rockchip/common/include/plat_params.h