Lines Matching refs:md
20 static __init pteval_t create_mapping_protection(efi_memory_desc_t *md) in create_mapping_protection() argument
22 u64 attr = md->attribute; in create_mapping_protection()
23 u32 type = md->type; in create_mapping_protection()
28 if (WARN_ONCE(!PAGE_ALIGNED(md->phys_addr), in create_mapping_protection()
59 int __init efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md) in efi_create_mapping() argument
61 pteval_t prot_val = create_mapping_protection(md); in efi_create_mapping()
62 bool page_mappings_only = (md->type == EFI_RUNTIME_SERVICES_CODE || in efi_create_mapping()
63 md->type == EFI_RUNTIME_SERVICES_DATA); in efi_create_mapping()
65 if (!PAGE_ALIGNED(md->phys_addr) || in efi_create_mapping()
66 !PAGE_ALIGNED(md->num_pages << EFI_PAGE_SHIFT)) { in efi_create_mapping()
79 create_pgd_mapping(mm, md->phys_addr, md->virt_addr, in efi_create_mapping()
80 md->num_pages << EFI_PAGE_SHIFT, in efi_create_mapping()
87 efi_memory_desc_t *md = data; in set_permissions() local
90 if (md->attribute & EFI_MEMORY_RO) in set_permissions()
92 if (md->attribute & EFI_MEMORY_XP) in set_permissions()
99 efi_memory_desc_t *md) in efi_set_mapping_permissions() argument
101 BUG_ON(md->type != EFI_RUNTIME_SERVICES_CODE && in efi_set_mapping_permissions()
102 md->type != EFI_RUNTIME_SERVICES_DATA); in efi_set_mapping_permissions()
111 return apply_to_page_range(mm, md->virt_addr, in efi_set_mapping_permissions()
112 md->num_pages << EFI_PAGE_SHIFT, in efi_set_mapping_permissions()
113 set_permissions, md); in efi_set_mapping_permissions()