From: Alexander Graf Date: Thu, 17 Nov 2016 00:02:59 +0000 (+0100) Subject: ls2080ardb: Reserve DP-DDR RAM X-Git-Tag: v2017.01-rc1~252^2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=215b1fb9fa43049aee34e824bfd994b335155750;p=oweals%2Fu-boot.git ls2080ardb: Reserve DP-DDR RAM The DP-DDR shouldn't be exposed as conventional memory to an OS, so let's rather claim it's a reserved region in the EFI memory map Signed-off-by: Alexander Graf Reviewed-by: York Sun --- diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index fab44b96ba..02954ef6d7 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -201,6 +202,14 @@ int misc_init_r(void) if (adjust_vdd(0)) printf("Warning: Adjusting core voltage failed.\n"); +#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) + if (soc_has_dp_ddr() && gd->bd->bi_dram[2].size) { + efi_add_memory_map(gd->bd->bi_dram[2].start, + gd->bd->bi_dram[2].size >> EFI_PAGE_SHIFT, + EFI_RESERVED_MEMORY_TYPE, false); + } +#endif + return 0; }