From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Fri, 10 Jun 2016 13:07:42 +0200 Subject: [U-Boot] [PATCH] libfdt: Add option to disable arch_fixup_fdt() calls In-Reply-To: <57597FE5.6060407@suse.de> References: <7bfd9751694a9be0b2c74e10345dfc6e51e5f86b.1465482210.git.michal.simek@xilinx.com> <57597D2F.4000707@suse.de> <57597E1A.3060109@xilinx.com> <57597FE5.6060407@suse.de> Message-ID: <575A9F7E.30405@xilinx.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 9.6.2016 16:40, Alexander Graf wrote: > On 06/09/2016 04:32 PM, Michal Simek wrote: >> On 9.6.2016 16:29, Alexander Graf wrote: >>> On 06/09/2016 04:23 PM, Michal Simek wrote: >>>> Disable arch_fixup_fdt() calls for cases where U-Boot shouldn't update >>>> memory setup in DTB file. >>>> One example of usage of this option is to boot OS with different memory >>>> setup than U-Boot use. >>>> >>>> Signed-off-by: Michal Simek >>> Could we instead just have the board file provide a fixup? It could then >>> also fix up the efi memory map. >> Not sure what exactly you are asking for. >> Do you mean to add fixup function to board file and overwrite default >> one? > > You have to touch some other code anyway to make this work with a > particular board, right? In that case, you can as well add a function to > the board file that explicitly provides a different, known good memory map. I cant' see the reason to touch particular board. In past AMP solution where one core use the part of memory and second another part was the reason I needed this. For ARM64 case as you know from arm IRC I was trying to boot Linux from memory above 32bit space and for these tests I need to convince u-boot not to touch dtb memory setup. But for the same board I want to use standard behavior but for some case this needs to be enabled. > > Can you have a weaker overload? Basically I would like to have a board > provide arch_fixup_fdt() which would override the one in bootm-fdt.c. > But we can also rename arch_fixup_fdt() in bootm-fdt.c to > board_fixup_fdt() function, declare it weak and have arch_fixup_fdt() > call that. arch_fixup_fdt is already weaker function in image-fdt.c and ARM and MIPS define it. I don't think that renaming solve anything. This patch is really just ON/OFF switch of fixup behavior. Thanks, Michal