From: Alexander Graf Date: Wed, 16 Nov 2016 23:34:57 +0100 Subject: [U-Boot] [PATCH v7 3/7] ls2080ardb: Reserve DP-DDR RAM In-Reply-To: <1479335701-149961-1-git-send-email-agraf@suse.de> References: <1479335701-149961-1-git-send-email-agraf@suse.de> Message-ID: <1479335701-149961-4-git-send-email-agraf@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- v6 -> v7: - Don't call efi_loader function in SPL land --- board/freescale/ls2080ardb/ls2080ardb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index fab44b9..02954ef 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; } -- 1.8.5.6