提交 d9b63ea9 编写于 作者: E Emmanuel Vadot 提交者: Alexander Graf

video: sunxi: de2: Reserve the fb region in the EFI memory map

If compile with support for the efi loader we need to mark the pages
allocated for the framebuffer as reserved so the kernel won't attempt
to use them for other uses.
Signed-off-by: NEmmanuel Vadot <manu@freebsd.org>
Acked-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 d73c8bc0
......@@ -9,6 +9,7 @@
#include <display.h>
#include <dm.h>
#include <edid.h>
#include <efi_loader.h>
#include <fdtdec.h>
#include <fdt_support.h>
#include <video.h>
......@@ -221,6 +222,13 @@ static int sunxi_de2_init(struct udevice *dev, ulong fbbase,
uc_priv->bpix = l2bpp;
debug("fb=%lx, size=%d %d\n", fbbase, uc_priv->xsize, uc_priv->ysize);
#ifdef CONFIG_EFI_LOADER
efi_add_memory_map(fbbase,
ALIGN(timing.hactive.typ * timing.vactive.typ *
(1 << l2bpp) / 8, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT,
EFI_RESERVED_MEMORY_TYPE, false);
#endif
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册