summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/arm-runtime.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-04-25 23:06:46 +0300
committerIngo Molnar <mingo@kernel.org>2016-04-28 12:33:55 +0300
commit789957ef72f976cb325e9057225fc4e9c4513060 (patch)
treecbe6b0eebfbe5658c0b841e6fee2940a9968a899 /drivers/firmware/efi/arm-runtime.c
parent10f0d2f57705350bbbe5f28e9292ae3905823c3c (diff)
downloadlinux-789957ef72f976cb325e9057225fc4e9c4513060.tar.xz
efi/arm*: Take the Memory Attributes table into account
Call into the generic memory attributes table support code at the appropriate times during the init sequence so that the UEFI Runtime Services region are mapped according to the strict permissions it specifies. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Borislav Petkov <bp@alien8.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Jones <pjones@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1461614832-17633-15-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/arm-runtime.c')
-rw-r--r--drivers/firmware/efi/arm-runtime.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
index 19283deac375..17ccf0a8787a 100644
--- a/drivers/firmware/efi/arm-runtime.c
+++ b/drivers/firmware/efi/arm-runtime.c
@@ -77,9 +77,15 @@ static bool __init efi_virtmap_init(void)
systab_found = true;
}
}
- if (!systab_found)
+ if (!systab_found) {
pr_err("No virtual mapping found for the UEFI System Table\n");
- return systab_found;
+ return false;
+ }
+
+ if (efi_memattr_apply_permissions(&efi_mm, efi_set_mapping_permissions))
+ return false;
+
+ return true;
}
/*