From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Anderson Date: Thu, 4 Mar 2021 21:01:44 -0500 Subject: reserved memory from devicetree definition In-Reply-To: References: Message-ID: <82403790-b18e-e500-382f-bf0a9077208e@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 3/4/21 8:04 PM, Bin Meng wrote: > On Fri, Mar 5, 2021 at 8:26 AM jorge courett wrote: >> >> Hi! >> Is there any way to use a reserved memory definition in the device tree to >> avoid that u-boot could use that SDRAM memory region? Or the only way is by >> compiler configuration? > > The use case you pointed out is not supported by U-Boot. U-Boot > currently only supports insert /reserved-memory node on some boards. > > Patches are welcome to support the new use case :) > > Regards, > Bin In the general case you can do this if your arch/board's dram_init calls fdtdec_setup_mem_size_base. Though there are numerous ways to override these values, so see setup_dest_addr for details. Do note that many memory addresses are set via several different methods, depending on the board. So you might need to have some compile-time modification anyway. --Sean