Hi Sughosh [...]
> > > - (ulong)lmb_alloc_base(rd_len, > > > - 0x1000, > > > - > > > initrd_high, > > > - > > > LMB_NONE); > > > + err = lmb_allocate_mem(LMB_MEM_ALLOC_MAX, > > > + 0x1000, &initrd_high, > > > + rd_len, LMB_NONE); > > > else > > > - *initrd_start = (ulong)lmb_alloc(rd_len, > > > - 0x1000); > > > + err = lmb_allocate_mem(LMB_MEM_ALLOC_ANY, > > > + 0x1000, &initrd_high, > > > + rd_len, LMB_NONE); > > > > You are now calling the same function, put > > LMB_MEM_ALLOC_ANY/LMB_MEM_ALLOC_MAX in a variable instead > > and make the if smaller > > Will do. > > > > > [...] > > > > > diff --git a/boot/image-fdt.c b/boot/image-fdt.c > > > index 6585813de00..b8e1b0f35bb 100644 > > > --- a/boot/image-fdt.c > > > +++ b/boot/image-fdt.c > > > @@ -198,15 +198,27 @@ int boot_relocate_fdt(char **of_flat_tree, ulong > > > *of_size) > > > of_start = (void *)(uintptr_t)addr; > > > disable_relocation = 1; > > > } else if (desired_addr) { > > > - addr = lmb_alloc_base(of_len, 0x1000, desired_addr, > > > - LMB_NONE); > > > + addr = desired_addr; > > > + err = lmb_allocate_mem(LMB_MEM_ALLOC_MAX, 0x1000, > > > &addr, > > > > Is this LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ADDR? > > This is a case for LMB_MEM_ALLOC_MAX as the desired_addr variable that > is read as fdt_high has a valid value. So the allocated address should > be below desired_addr. Ah you are right, I misread lmb_alloc_base() for lmb_alloc_addr(). But in that case, can you rename 'desired_addr' as well to something that makes more sense -- e.g high_addr or something like that. [...] Thanks /Ilias