From: Arnaud Patard (Rtp) Date: Fri, 5 Mar 2021 10:27:49 +0000 (+0100) Subject: Rockchip: video: vop: Reserve efi fb memory X-Git-Tag: v2021.07-rc1~26^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=decbc18ed2a9788fcaad3ca349def7bad36741f4;p=pandora-u-boot.git Rockchip: video: vop: Reserve efi fb memory When booting with EFI and graphics, the memory used for framebuffer has to be reserved, otherwise it may leads to kernel memory overwrite. Signed-off-by: Arnaud Patard Tested-by: Peter Robinson --- diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index 145a34084c5..3eb5e8c25ca 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include #include @@ -395,6 +397,11 @@ int rk_vop_probe(struct udevice *dev) if (!(gd->flags & GD_FLG_RELOC)) return 0; +#if defined(CONFIG_EFI_LOADER) + debug("Adding to EFI map %d @ %lx\n", plat->size, plat->base); + efi_add_memory_map(plat->base, plat->size, EFI_RESERVED_MEMORY_TYPE); +#endif + priv->regs = (struct rk3288_vop *)dev_read_addr(dev); /*