Lines Matching full:md

20 static bool region_is_misaligned(const efi_memory_desc_t *md)  in region_is_misaligned()  argument
24 return !PAGE_ALIGNED(md->phys_addr) || in region_is_misaligned()
25 !PAGE_ALIGNED(md->num_pages << EFI_PAGE_SHIFT); in region_is_misaligned()
33 static __init ptdesc_t create_mapping_protection(efi_memory_desc_t *md) in create_mapping_protection() argument
35 u64 attr = md->attribute; in create_mapping_protection()
36 u32 type = md->type; in create_mapping_protection()
41 if (arm64_is_protected_mmio(md->phys_addr, in create_mapping_protection()
42 md->num_pages << EFI_PAGE_SHIFT)) in create_mapping_protection()
49 if (region_is_misaligned(md)) { in create_mapping_protection()
85 int __init efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md) in efi_create_mapping() argument
87 ptdesc_t prot_val = create_mapping_protection(md); in efi_create_mapping()
88 bool page_mappings_only = (md->type == EFI_RUNTIME_SERVICES_CODE || in efi_create_mapping()
89 md->type == EFI_RUNTIME_SERVICES_DATA); in efi_create_mapping()
99 if (region_is_misaligned(md)) in efi_create_mapping()
102 create_pgd_mapping(mm, md->phys_addr, md->virt_addr, in efi_create_mapping()
103 md->num_pages << EFI_PAGE_SHIFT, in efi_create_mapping()
109 const efi_memory_desc_t *md; member
116 const efi_memory_desc_t *md = spd->md; in set_permissions() local
119 if (md->attribute & EFI_MEMORY_RO) in set_permissions()
121 if (md->attribute & EFI_MEMORY_XP) in set_permissions()
130 efi_memory_desc_t *md, in efi_set_mapping_permissions() argument
133 struct set_perm_data data = { md, has_bti }; in efi_set_mapping_permissions()
135 BUG_ON(md->type != EFI_RUNTIME_SERVICES_CODE && in efi_set_mapping_permissions()
136 md->type != EFI_RUNTIME_SERVICES_DATA); in efi_set_mapping_permissions()
138 if (region_is_misaligned(md)) in efi_set_mapping_permissions()
148 return apply_to_page_range(mm, md->virt_addr, in efi_set_mapping_permissions()
149 md->num_pages << EFI_PAGE_SHIFT, in efi_set_mapping_permissions()