From fc4a2ecbb3689a631b88c56f93e2d26cc7b10139 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 23 Sep 2023 16:20:49 +0200 Subject: [PATCH] kboot/gpu: Add "no-map" property for reserved memory nodes Without this property u-boot will add reserved memory regions to the EFI memory map with the wrong type. This results in Linux mapping it and thus breaking the intended use in the asahi driver. Signed-off-by: Janne Grunau --- src/kboot_gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kboot_gpu.c b/src/kboot_gpu.c index fe0ab8234..eaff7f215 100644 --- a/src/kboot_gpu.c +++ b/src/kboot_gpu.c @@ -395,6 +395,9 @@ static int dt_set_region(void *dt, int sgx, const char *name, const char *path) if (fdt_setprop_inplace(dt, node, "reg", reg, sizeof(reg))) bail("FDT: GPU: failed to set reg prop for %s\n", path); + if (fdt_setprop_empty(dt, node, "no-map")) + bail("FDT: GPU: failed to set no-map prop for %s\n", path); + return 0; }