|
@@ -224,6 +224,8 @@ static bool __init efi_virtmap_init(void)
|
|
{
|
|
{
|
|
efi_memory_desc_t *md;
|
|
efi_memory_desc_t *md;
|
|
|
|
|
|
|
|
+ init_new_context(NULL, &efi_mm);
|
|
|
|
+
|
|
for_each_efi_memory_desc(&memmap, md) {
|
|
for_each_efi_memory_desc(&memmap, md) {
|
|
u64 paddr, npages, size;
|
|
u64 paddr, npages, size;
|
|
pgprot_t prot;
|
|
pgprot_t prot;
|
|
@@ -254,7 +256,8 @@ static bool __init efi_virtmap_init(void)
|
|
else
|
|
else
|
|
prot = PAGE_KERNEL;
|
|
prot = PAGE_KERNEL;
|
|
|
|
|
|
- create_pgd_mapping(&efi_mm, paddr, md->virt_addr, size, prot);
|
|
|
|
|
|
+ create_pgd_mapping(&efi_mm, paddr, md->virt_addr, size,
|
|
|
|
+ __pgprot(pgprot_val(prot) | PTE_NG));
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -329,14 +332,7 @@ core_initcall(arm64_dmi_init);
|
|
|
|
|
|
static void efi_set_pgd(struct mm_struct *mm)
|
|
static void efi_set_pgd(struct mm_struct *mm)
|
|
{
|
|
{
|
|
- if (mm == &init_mm)
|
|
|
|
- cpu_set_reserved_ttbr0();
|
|
|
|
- else
|
|
|
|
- cpu_switch_mm(mm->pgd, mm);
|
|
|
|
-
|
|
|
|
- local_flush_tlb_all();
|
|
|
|
- if (icache_is_aivivt())
|
|
|
|
- __local_flush_icache_all();
|
|
|
|
|
|
+ switch_mm(NULL, mm, NULL);
|
|
}
|
|
}
|
|
|
|
|
|
void efi_virtmap_load(void)
|
|
void efi_virtmap_load(void)
|