+ Simon, On Wednesday 22 November 2017 07:29 AM, Kever Yang wrote: > Hi Lukasz, > > > Thanks for your quick comments on this topic. > On 11/21/2017 06:29 PM, Lukasz Majewski wrote: >> Hi Kever, >> >>> Hi Guys, >>> >>> I try to understand why we need to do the relocate in U-Boot. >>> From the document README/crt0.S, I think the relocation feature comes >>> from some SoC have limited SRAM whose size is enough to load the whole >>> U-Boot, but not enough to run all the drivers. >>> >>> I don't know how many SoCs/Archs still must use this feature, >>> but I'm sure all >>> Rockchip SoCs do not need this feature in both SPL and proper U-Boot, >>> because rockchip using SPL always running in SRAM to init DDR SDRAM, >>> and after DRAM available always running U-Boot in DRAM. >> I always thought that u-boot needs relocation to place itself in the >> "known" area of SDRAM (which ends in its very end). > > I can understand this feature, we always do dram_init_banks() first, > then we relocate to 'known' area, then will be no risk to access memory. > I believe there must be some historical reason for some kind of device, > the relocate feature is a wonderful idea for it. > > In another case, we can also have a choice for not relocate because: > - we still can have similar 'bdinfo' but without relocate, we can init > dram info > first, and then init SP, malloc area and so on, and then other > driver init. > - All solution for Rockchip SoCs at least have 512MByte DRAM, > which should be enough for U-Boot and could consider to be 'known' > area, > many other SoCs should be similar. > - Without relocate we can save many step, some of our customer really > care much about the boot time duration. > * no need to relocate everything > * no need to copy all the code > * no need init the driver more than once
I agree that there should be an option for avoiding relocation. There is a flag "GD_FLG_SKIP_RELOC" which when enabled on gd->flags tries to skip relocation for u-boot proper. I am sure that this must be working for x86 but it can be ported for other architectures as well? Thanks and regards, Lokesh _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot