From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Mon, 13 Feb 2017 19:45:28 -0800 Subject: [U-Boot] [PATCH 1/9] armv8: Add global variable resv_ram In-Reply-To: <1487043936-10112-1-git-send-email-york.sun@nxp.com> References: <1487043936-10112-1-git-send-email-york.sun@nxp.com> Message-ID: <1487043936-10112-2-git-send-email-york.sun@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Use gd->arch.resv_ram to track reserved memory allocation. Signed-off-by: York Sun --- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 6 ++++++ arch/arm/include/asm/global_data.h | 3 +++ cmd/bdinfo.c | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index adccdf1..a40556f 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -273,6 +273,12 @@ config SYS_FSL_SDHC_CLK_DIV clock, in another word SDHC_clk = Platform_clk / this_divider. endmenu +config RESV_RAM_TOP + bool + help + Reserve memory from the top, tracked by gd->arch.resv_ram. It's up + to implementation to allow access to this reserved memory or not. + config SYS_FSL_ERRATUM_A008336 bool diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index aee87cd..b1fc410 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -59,6 +59,9 @@ struct arch_global_data { phys_addr_t secure_ram; unsigned long tlb_allocated; #endif +#ifdef CONFIG_RESV_RAM_TOP + phys_addr_t resv_ram; +#endif #ifdef CONFIG_ARCH_OMAP2 u32 omap_boot_device; diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index ae3027a..0c5fa56 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -392,6 +392,10 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, gd->arch.secure_ram & MEM_RESERVE_SECURE_ADDR_MASK); } #endif +#ifdef CONFIG_RESV_RAM_TOP + if (gd->arch.resv_ram) + print_num("Reserved ram", gd->arch.resv_ram); +#endif #if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH) print_eths(); #endif -- 2.7.4