Thanks Christophe I've sent a v6 in the meanwhile, but this part remains unchanged
Thanks Ilias On Tue, Jun 9, 2026, 17:23 Christophe Leroy (CS GROUP) <[email protected]> wrote: > > > Le 05/06/2026 à 01:09, Tom Rini a écrit : > > On Fri, Jun 05, 2026 at 12:31:10AM +0200, Marek Vasut wrote: > >> On 6/4/26 9:37 AM, Ilias Apalodimas wrote: > >>> Currently, the bi_dram[] information is stored in the board info > >>> structure (bd). Because bd is only valid after reserve_board(), > >>> dram_init_banksize() must be called late in the initialization process. > >>> This limitation is problematic, as it forces us to rely on a variety of > >>> bespoke functions to determine board RAM, bank memory sizes, and other > >>> early setup requirements. > >>> > >>> By moving bi_dram[] into the global data (gd), we can run it earlier. > >>> This is particularly convenient since boards define their own > >>> dram_init_banksize() routines, which do not always rely on parsing > >>> Device Tree (DT) memory nodes. > >>> > >>> Additionally, U-Boot defaults to relocating to the top of the first > memory > >>> bank. While boards currently use custom functions to override this > >>> behavior, having the DRAM bank information available earlier in gd > makes > >>> relocating to a different bank trivial and standardizes the process. > >> Regarding the BD, this is likely really old, but it seems BD might be > passed > >> from U-Boot to Linux somehow ? See [1] and U-Boot > >> include/asm-generic/u-boot.h : > >> > >> 8 * NOTE: This header file defines an interface to U-Boot. Including > >> 9 * this (unmodified) header file in another file is considered > normal > >> 10 * use of U-Boot, and does *not* fall under the heading of "derived > >> 11 * work". > >> > >> Are we certain we are not breaking ABI here ? > >> > >> [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/boot/ppcboot.h > > > > I've added in Christophe as the maintainer of one of the active and in > > some ways oldest (since MPC8xx is very old) PowerPC platforms we still > > actively support. A tested-by on this series that also includes > > verifying Linux still comes up would be much appreciated. > > Traveling at the moment. I will try to give it a go in a couple weeks. > > > > > My suspicion is that anything DT-based shouldn't change here, and in > > turn if you're doing modern U-Boot you're probably doing > > not-extremely-ancient kernel and so DT based booting. > > > > Linux receives a pointer to the device tree from U-boot, nothing else as > far as I know. > > Christophe >

