We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c6c706 commit 491db21Copy full SHA for 491db21
arch/arm64/kernel/efi.c
@@ -34,8 +34,16 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md)
34
u64 attr = md->attribute;
35
u32 type = md->type;
36
37
- if (type == EFI_MEMORY_MAPPED_IO)
38
- return PROT_DEVICE_nGnRE;
+ if (type == EFI_MEMORY_MAPPED_IO) {
+ pgprot_t prot = __pgprot(PROT_DEVICE_nGnRE);
39
+
40
+ if (arm64_is_protected_mmio(md->phys_addr,
41
+ md->num_pages << EFI_PAGE_SHIFT))
42
+ prot = pgprot_encrypted(prot);
43
+ else
44
+ prot = pgprot_decrypted(prot);
45
+ return pgprot_val(prot);
46
+ }
47
48
if (region_is_misaligned(md)) {
49
static bool __initdata code_is_misaligned;
0 commit comments