[PATCH -next v6 07/10] arm: armv8: mmu: add mmu_unmap_reserved_mem
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Sep 12 08:35:02 CEST 2025
Hi Anshul,
[....]
>
> return 0;
> }
> +
> +int mmu_unmap_reserved_mem(const char *name)
> +{
> + void *fdt = (void *)gd->fdt_blob;
> + char node_path[128];
> + fdt_addr_t addr;
> + fdt_size_t size;
> + int ret;
> +
> + snprintf(node_path, sizeof(node_path), "/reserved-memory/%s", name);
> + ret = fdt_path_offset(fdt, node_path);
> + if (ret < 0)
> + return ret;
> +
> + addr = fdtdec_get_addr_size(fdt, ret, "reg", &size);
> + if (addr == FDT_ADDR_T_NONE)
> + return -1;
> +
> + mmu_change_region_attr(addr, size, PTE_TYPE_FAULT);
Since you are basically breaking the memory map here, you can use
mmu_change_region_attr_nobreak() and not run the loop twice.
[...]
Cheers
/Ilias
More information about the U-Boot
mailing list