diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2021-03-05 13:27:49 +0300 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2021-04-10 12:53:36 +0300 |
commit | decbc18ed2a9788fcaad3ca349def7bad36741f4 (patch) | |
tree | 78a7285da79c0bd22dbc6905a37da2b052632d7e /drivers/video | |
parent | ead61b8f7331ecbe95e0345365a1f1094465b6b4 (diff) | |
download | u-boot-decbc18ed2a9788fcaad3ca349def7bad36741f4.tar.xz |
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 <arnaud.patard@rtp-net.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/rockchip/rk_vop.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index 145a34084c..3eb5e8c25c 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -21,6 +21,8 @@ #include <asm/arch-rockchip/vop_rk3288.h> #include <dm/device-internal.h> #include <dm/uclass-internal.h> +#include <efi.h> +#include <efi_loader.h> #include <linux/bitops.h> #include <linux/err.h> #include <power/regulator.h> @@ -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); /* |