diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-07-18 09:53:01 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-07-22 12:32:42 +0200 |
commit | e7d64065cb4b74357e50b54e54adc780e2f44db1 (patch) | |
tree | 08f46a933b8e11d0b1d8d18adbbe2f2293c0d588 /lib | |
parent | 1ef1cf1f93345cbeb5ff52cbf00c6ee6fee1a47b (diff) |
efi_loader: document efi_save_gd(), efi_restore_gd()
Provide function descriptions for efi_save_gd() and efi_restore_gd().
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 0b16554ba2..d49145fc76 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -104,7 +104,15 @@ int __efi_exit_check(void) return ret; } -/* Called from do_bootefi_exec() */ +/** + * efi_save_gd() - save global data register + * + * On the ARM architecture gd is mapped to a fixed register (r9 or x18). + * As this register may be overwritten by an EFI payload we save it here + * and restore it on every callback entered. + * + * This function is called after relocation from initr_reloc_global_data(). + */ void efi_save_gd(void) { #ifdef CONFIG_ARM @@ -112,10 +120,12 @@ void efi_save_gd(void) #endif } -/* - * Special case handler for error/abort that just forces things back to u-boot - * world so we can dump out an abort message, without any care about returning - * back to UEFI world. +/** + * efi_restore_gd() - restore global data register + * + * On the ARM architecture gd is mapped to a fixed register (r9 or x18). + * Restore it after returning from the UEFI world to the value saved via + * efi_save_gd(). */ void efi_restore_gd(void) { |