On Thu, Jan 18, 2024 at 10:02:37AM +0100, Linus Walleij wrote: > On Thu, Jan 18, 2024 at 12:04 AM Christian Marangi <ansuelsmth@xxxxxxxxx> wrote: > > > Some followup on this... I manage to enable DEBUG_LL and can have debug > > output from the decompressor... > > Yeah that is helpful! > > > From what I can see fdt_check_mem_start is not called at all... > > > > What I'm using with kernel config are: > > CONFIG_ARM_APPENDED_DTB=y > > CONFIG_ARM_ATAG_DTB_COMPAT=y > > And a downstream patch that mangle all the atags and takes only the > > cmdline one. > > > > The load and entry point is: > > 0x42208000 > > > > With the current setup I have this (I also added some debug log that > > print what is actually passed to do decompress > > > > DTB:0x42AED270 (0x00008BA7) > > Uncompressing Linux... > > 40208000 > > 4220F10C done, booting the kernel. > > > > Where 40208000 is the value of output_start and 4220F10C is input_data. > > > > And I think this confirm that it's getting loaded in the wrong position > > actually in reserved memory... But how this is possible??? Hope can > > someone help me in this since I wasted the entire day with this and > > didn't manage to make any progress... aside from having fun with the > > head.S assembly code. > > I have no idea how this happens, but when I boot images I do > it using fastboot like this: > > fastboot --base 40200000 --cmdline "console=ttyMSM0,115200,n8" boot zImage > > So I definitely hammer it to boot from 0x40200000 (+0x8000). > Consider that this is uboot so nothing about fastboot. Without AUTO_ZRELADDR enabled this is the output from the decompressor. Starting kernel ... DTB:0x42B214A0 (0x00008B79) C:0x422080C0-0x42B2A040->0x4349C600-0x43DBE580 DTB:0x43DB59E0 (0x00008B85) Uncompressing Linux... 42208000 434A362C done, booting the kernel. 42208000 input 434A362C output The DTB location match but I can see the ADDR to the right place and getting moved to a new location (I assume as it would get overwritten by itself...) guess the main problem is mov r0, pc (line 279) With pc veing 0x40200000 instead of 0x42200000 -- Ansuel