diff options
author | Shannon Zhao <shannon.zhao@linaro.org> | 2016-05-12 14:19:54 +0200 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2016-07-06 11:34:47 +0200 |
commit | 0cac5c3018b32707b3bab40e4beb83f91c4204f1 (patch) | |
tree | 2782afbb0fd9f861df6d0af6aa3d1f9481145708 /drivers/firmware/efi/arm-runtime.c | |
parent | FDT: Add a helper to get the subnode by given name (diff) | |
download | linux-0cac5c3018b32707b3bab40e4beb83f91c4204f1.tar.xz linux-0cac5c3018b32707b3bab40e4beb83f91c4204f1.zip |
Xen: EFI: Parse DT parameters for Xen specific UEFI
The EFI DT parameters for bare metal are located under /chosen node,
while for Xen Dom0 they are located under /hyperviosr/uefi node. These
parameters under /chosen and /hyperviosr/uefi are not expected to appear
at the same time.
Parse these EFI parameters and initialize EFI like the way for bare
metal except the runtime services because the runtime services for Xen
Dom0 are available through hypercalls and they are always enabled. So it
sets the EFI_RUNTIME_SERVICES flag if it finds /hyperviosr/uefi node and
bails out in arm_enable_runtime_services() when EFI_RUNTIME_SERVICES
flag is set already.
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Diffstat (limited to 'drivers/firmware/efi/arm-runtime.c')
-rw-r--r-- | drivers/firmware/efi/arm-runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 17ccf0a8787a..c394b81fe452 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c @@ -107,6 +107,11 @@ static int __init arm_enable_runtime_services(void) return 0; } + if (efi_enabled(EFI_RUNTIME_SERVICES)) { + pr_info("EFI runtime services access via paravirt.\n"); + return 0; + } + pr_info("Remapping and enabling EFI services.\n"); mapsize = efi.memmap.map_end - efi.memmap.map; |