From: Alexander Graf Date: Tue, 14 Feb 2017 20:55:51 +0100 Subject: [U-Boot] [PATCH 4/9] armv8: layerscape: Rewrite memory reservation In-Reply-To: References: <1487043936-10112-1-git-send-email-york.sun@nxp.com> <1487043936-10112-5-git-send-email-york.sun@nxp.com> <320b0ef7-c2eb-014a-b9f8-9ac538c30c3c@nxp.com> Message-ID: <35412ded-cc73-671c-2ce0-3795a371f169@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 On 14/02/2017 18:38, york sun wrote: > On 02/14/2017 09:00 AM, york.sun at nxp.com wrote: >> On 02/14/2017 07:31 AM, Alexander Graf wrote: >>> >>> >>> On 14/02/2017 04:45, York Sun wrote: >>>> For ARMv8 Layerscape SoCs, secure memory and MC memorey are reserved >>>> at the end of DDR. DDR is spit into two or three banks. This patch >>>> reverts commit aabd7ddb and simplifies the calculation of reserved >>>> memory, and moves the code into common SoC file. Secure memory is >>>> carved out first. DDR bank size is reduced. Reserved memory is then >>>> allocated on the top of available memory. U-Boot still has access >>>> to reserved memory as data transferring is needed. Device tree is >>>> fixed with reduced memory size to hide the reserved memory from OS. >>> >>> I haven't looked in detail, but could you please ensure that you also >>> reserve those regions in the efi_loader memory map? >> >> I missed efi reserved memory map. Will add in v2 patch. >> > > Alex, > > Is the misc_init_r() the best place to add such reservation under your > code dealing with DP_DDR? It is per board code. As of now, we only have > ls2080ardb with efi boot. Ideally I'd like to make sure efi boot works on all boards, not just individual ones. So if you find a more generic place that gets called after efi_memory_init(), that would be great. Since you add a global kconfig define for reserved memory, you can even do it inside efi_memory_init() directly for the top-of-ram region. Alex