efi_loader: allow compiling with clang
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 26 May 2020 23:58:30 +0000 (01:58 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 3 Jun 2020 15:19:17 +0000 (17:19 +0200)
commit4f7dc5f608c07f5bc169217bedac6883b0d998df
tree462d9e5d76b654737c733eef78b23c1e141ea9ad
parent0e69bcfb27644f9e7c575aa3565bcff922c7dec2
efi_loader: allow compiling with clang

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

In the UEFI sub-system we need to save gd when leaving to UEFI binaries and
have to restore gd when reentering U-Boot.

Define a new function set_gd() for setting gd and use it in the UEFI
sub-system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Tom Rini <trini@konsulko.com>
arch/arm/include/asm/global_data.h
lib/efi_loader/efi_boottime.c