From 05532260aee0302e43a4935a402c7b9268036267 Mon Sep 17 00:00:00 2001 From: Ting Shen Date: Mon, 28 Jan 2019 17:22:22 +0800 Subject: selfload: check target memory type in selfload_check Currently, selflock_check() verifies that the binary is loaded in an usable RAM area. Extend its functionality so we can also check that BL31 is loaded in a manually reserved area, and fail early if the range is not protected. Change-Id: Iecdeedd9e8da67f73ac47d2a82e85b306469a626 Signed-off-by: Ting Shen Reviewed-on: https://review.coreboot.org/c/31122 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/include/program_loading.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/include/program_loading.h') diff --git a/src/include/program_loading.h b/src/include/program_loading.h index 468f0b35a6..7be59e2878 100644 --- a/src/include/program_loading.h +++ b/src/include/program_loading.h @@ -16,6 +16,7 @@ #ifndef PROGRAM_LOADING_H #define PROGRAM_LOADING_H +#include #include #include #include @@ -206,7 +207,7 @@ void mirror_payload(struct prog *payload); * * Defined in src/lib/selfboot.c */ -bool selfload_check(struct prog *payload); +bool selfload_check(struct prog *payload, enum bootmem_type dest_type); bool selfload(struct prog *payload); #endif /* PROGRAM_LOADING_H */ -- cgit v1.2.3