Skip to content
Snippets Groups Projects
Select Git revision
  • a148920e12cb9aa09589634966737c0fe88de2cc
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
8 results

efi_boottime.c

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    • Alexander Graf's avatar
      a148920e
      efi_loader: Fix efi_exit gd clobbering · a148920e
      Alexander Graf authored
      
      Commit f494950b (efi_loader: call __efi_exit_check in efi_exit) added a call
      to __efi_exit_check inside efi_exit to account for the fact that we're exiting
      the efi_exit function via a longjmp call.
      
      However, __efi_exit_check also swizzles gd to the application gd while the
      longjmp will put us back into EFI context, so we need the efi (u-boot) gd.
      
      This patch fixes that up by explicitly setting gd back to efi_gd before
      doing the longjmp. It also adds a few comments on why it does that.
      
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      a148920e
      History
      efi_loader: Fix efi_exit gd clobbering
      Alexander Graf authored
      
      Commit f494950b (efi_loader: call __efi_exit_check in efi_exit) added a call
      to __efi_exit_check inside efi_exit to account for the fact that we're exiting
      the efi_exit function via a longjmp call.
      
      However, __efi_exit_check also swizzles gd to the application gd while the
      longjmp will put us back into EFI context, so we need the efi (u-boot) gd.
      
      This patch fixes that up by explicitly setting gd back to efi_gd before
      doing the longjmp. It also adds a few comments on why it does that.
      
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    cmd_boot.c NaN GiB