[U-Boot] [PATCH] ARM: zynq: Fix SPL SD boot mode
Michal Simek
michal.simek at xilinx.com
Mon Dec 4 14:12:58 UTC 2017
Hi,
On 1.12.2017 18:30, Gerald Van Baren wrote:
> Hi Michal,
>
> On Fri, Dec 1, 2017 at 8:13 AM, Michal Simek <michal.simek at xilinx.com>
> wrote:
>
>> This patch is fixing two issues:
>> 1. Insufficient stack size for fat fs buffers
>> 2. Insufficient space in malloc area
>>
>> Tested on zc702 and zc706.
>>
>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>>
>
> What are the symptoms of this bug?
>
> I am running on a custom board and have been bedeviled by the behavior
> where I can boot off a SD Card with the SPL loading U-Boot also off the SD
> Card for many new build / copy to SD Card / boot iterations and then it
> stops with an error message that the SD Card did not respond to the voltage
> select command. Adding debugging printouts indicate the SD Card does not
> respond to commands right at the start of the capabilities read operations
> for no apparent reason.
>
> Once it fails for a given image, it always fails for that SD Card until I
> load a new image... then it might work or might not. Sometimes if I
> reformat the SD Card it works again (presumably due to shifting where the
> images are on the SD Card), sometimes not.
>
> This has been driving me CRAZY.
>
> I've applied your changes and will see if my problem goes away, but it is a
> "halting problem" in that I don't know how many time it has to succeed
> before I'm sure it will never fail. :-/
There were a lot of changes in fat implementation.
Ad 2) of that issue was that one patch moved buffers to malloc area from
stack
Here is sha1: 2460098cffacd18729262e3ed36656e6943783ed
Also look at:
"arm64: zynqmp: Do not use SPL_SYS_MALLOC_SIMPLE allocator"
This is the log I am getting.
U-Boot SPL 2017.11-00056-gb06c46de632c-dirty (Dec 04 2017 - 15:04:05)
mmc boot
Trying to boot from MMC1
spl_load_image_fat_os: error reading image system.dtb, err - -12
spl_load_image_fat: error reading image u-boot.img, err - -12
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
And the ad 1) issue I found was that if you debug
ALLOC_CACHE_ALIGN_BUFFER() size then you will find out that this buffer
allocated on the stack is quite huge.
It should be maybe enough just to extend Malloc space and don't care
about stack but moving stack to DDR after init makes also sense.
If you want I am happy to separate it.
Thanks,
Michal
More information about the U-Boot
mailing list