From 50149ea37a21dcbed675297f1536c31a7db39c19 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 4 Mar 2016 01:10:01 +0100 Subject: efi_loader: Add runtime services After booting has finished, EFI allows firmware to still interact with the OS using the "runtime services". These callbacks live in a separate address space, since they are available long after U-Boot has been overwritten by the OS. This patch adds enough framework for arbitrary code inside of U-Boot to become a runtime service with the right section attributes set. For now, we don't make use of it yet though. We could maybe in the future map U-boot environment variables to EFI variables here. Signed-off-by: Alexander Graf Reviewed-by: Simon Glass Tested-by: Simon Glass --- common/board_r.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/board_r.c b/common/board_r.c index 52a9b262eb..6432d2374a 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -65,6 +65,7 @@ #ifdef CONFIG_AVR32 #include #endif +#include DECLARE_GLOBAL_DATA_PTR; @@ -177,6 +178,9 @@ static int initr_reloc_global_data(void) */ gd->fdt_blob += gd->reloc_off; #endif +#ifdef CONFIG_EFI_LOADER + efi_runtime_relocate(gd->relocaddr, NULL); +#endif return 0; } -- cgit v1.2.1