mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
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>
This commit is contained in:
parent
ead61b8f73
commit
decbc18ed2
1 changed files with 7 additions and 0 deletions
|
@ -21,6 +21,8 @@
|
||||||
#include <asm/arch-rockchip/vop_rk3288.h>
|
#include <asm/arch-rockchip/vop_rk3288.h>
|
||||||
#include <dm/device-internal.h>
|
#include <dm/device-internal.h>
|
||||||
#include <dm/uclass-internal.h>
|
#include <dm/uclass-internal.h>
|
||||||
|
#include <efi.h>
|
||||||
|
#include <efi_loader.h>
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <power/regulator.h>
|
#include <power/regulator.h>
|
||||||
|
@ -395,6 +397,11 @@ int rk_vop_probe(struct udevice *dev)
|
||||||
if (!(gd->flags & GD_FLG_RELOC))
|
if (!(gd->flags & GD_FLG_RELOC))
|
||||||
return 0;
|
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);
|
priv->regs = (struct rk3288_vop *)dev_read_addr(dev);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue