From: Heinrich Schuchardt Date: Sat, 3 Mar 2018 09:30:17 +0000 (+0100) Subject: sunxi: video: mark framebuffer as EFI reserved memory X-Git-Tag: v2018.05-rc1~137^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d06717f853cd98a6a4536e5de5248e6c99a2b7bc;p=u-boot sunxi: video: mark framebuffer as EFI reserved memory Inform the EFI subsystem that the framebuffer memory is reserved. Without the patch the AllocatePool boot service allocates memory from the framebuffer which will will be overwritten by screen output. Signed-off-by: Heinrich Schuchardt --- diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index f191ef16c6..4da169fffd 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -1207,6 +1208,13 @@ void *video_hw_init(void) gd->bd->bi_dram[0].size - sunxi_display.fb_size; sunxi_engines_init(); +#ifdef CONFIG_EFI_LOADER + efi_add_memory_map(gd->fb_base, + ALIGN(sunxi_display.fb_size, EFI_PAGE_SIZE) >> + EFI_PAGE_SHIFT, + EFI_RESERVED_MEMORY_TYPE, false); +#endif + fb_dma_addr = gd->fb_base - CONFIG_SYS_SDRAM_BASE; sunxi_display.fb_addr = gd->fb_base; if (overscan_offset) {