Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
449 Discussions

Arria 10 Preloader SPL Uboot Error

R_G
Beginner
1,708 Views

Hi,

I am getting an error loading/debugging uboot through the Arm Development Studio debugger on my custom Arria 10 Han Pilot board that boots from QSPI Flash.

I am following the instructions here for building the preloader and uboot from the custom Quartus project handoff xml file:
https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Arria_10_SoC_45_Boot_from_QSPI

I created a debugger script per the instructions in that same document located here:
https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Arria_10_SoC_45_Debugging_U_45Boot

When I run the script in the debugger, everything seems to work up to the point where u-boot gets loaded. When that happens, I get the following error:

+loadfile u-boot-socfpga/u-boot
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00000805, DFAR = 0x01001020
ERROR(CMD16-TAD59-NAL18):
# in C:\Users\engineering\HD-MRPS\Linux_Boot\11-18-2023\debug-u-boot-A10.ds:27 while executing: loadfile u-boot-socfpga/u-boot
! Failed to load "u-boot"
! Download of 356,184 bytes to address S:0x01000040 failed while writing block of 4,096 bytes to address S:0x01000040
! Bus error on memory operation.ERROR(CMD656): The script C:\Users\engineering\HD-MRPS\Linux_Boot\11-18-2023\debug-u-boot-A10.ds failed to complete due to an error during execution of the script

I checked that memory address in the debugger and verified that it is not writable (all red). This error seems to indicate that the preloader did not correcly initialize the memory for some reason. I also do not get any output form the serial terminal while the preloader executes which indicates that the IO is not configured correctly either.

I have attached the debugger script I am running and the corresponding error log.

I can replicate this error on my Han Pilot Arria 10 dev kit that is configured to load from an SD card. With this setup, I follow these instructions for building the preloader and uboot:
https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Arria_10_SoC_45_Boot_from_SD_Card

It seems like the qts-filter_Arria10.sh script does not import all of the necessary configuration differences of the custom board to the bootloader build environment. It also seems that the Han Pilot dev kit is different that the Intel Arria 10 dev kit and those differences don't get imported by the qts-filter_Arria10.sh either.

I researched the Forums for similar issues and I found this thread where the preloader was not configuring the memory and IO correctly for a custom board, but the solution was never posted to the board even though the problem was apparently solved. Here is that thread:
https://community.intel.com/t5/Intel-SoC-FPGA-Embedded/Preloader-uboot-SPL/td-p/1478716/page/2

Do any Intel employees involved with that thread happen to know what the solution to that problem was?

I would appreciate any help you can provide with this issue.

Thanks,

Richard

0 Kudos
10 Replies
aikeu
Employee
1,698 Views

Hi R_G,


The address 0x01000040 is referring to the DDR address.

The Han Pilot board which you are using, does it has any failure with DDR in the logs during the initial state of booting which is the FSBL, First stage bootloader which is one of the file u-boot-splx4.sfp required in the boot up process.

Expected to have logs like below:


U-Boot SPL 2022.04-21237-gfda0d9176f-dirty (Nov 30 2022 - 22:13:33 -0600)

DDRCAL: Success

DDRCAL: Scrubbing ECC RAM (1024 MiB).

DDRCAL: SDRAM-ECC initialized success with 148 ms


Another thing is without relating to Arm DS debugging, will the system boot up like normal solely by flashing the required files to reach Uboot user space in the boot up operation?


Thanks.

Regards,

Aik Eu


0 Kudos
Richard_P
Beginner
1,673 Views

Hi Aik,

 

I don't get a U-Boot SPL log at all during a normal boot from the SD card (not using the debugger). I don't find the expected u-boot-splx4.sfp file on the SD card image either. How can the DDR RAM get configured without it? I have included the U-Boot log that you requested for your reference. It shows that Linux boots up to the command line prompt.

 

Thanks,

 

Richard

0 Kudos
aikeu
Employee
1,661 Views

Hi Richard_P,


Since you are booting up with sd card. Referring to the building bootloader document for Arria 10

under section Build SD Card Image. u-boot-splx4.sfp will be considered as well along with other files before packaged into a single sdcard_a10.img to be written into the sd card.

I noticed you are using older uboot 2014.10. The bootloader build flow was different from the latest flow found in rocketboards.


You can try with the prebuilt binaries from rocket board release, however I not sure Han Pilot board will work with those binaries which meant for Intel Arria10 soc dev kit. Anyway can try to consider the required uboot files for booting(u-boot-splx4.sfp+u-boot.img).

As for the configuration part, this file fit_spl_fpga.itb is required as part of the boot up to configure the DDRAM. Notes found from the Arria10 building bootloader document:

"

Arria 10 FPGA configuration is done in two steps:

  • Configuration of periphery: this allows HPS DDRAM to be brought up, and must do be done in SPL
  • Configuration of fabric: it configures the actual FPGA core fabric, and can be done from SPL or U-Boot

"


Referring to the rocketboard release link below, you can also find prebuilt sdcard binary(sdimage.tar.gz), extract it and rename as sdcard_a10.img


Rocketboard release:

https://releases.rocketboards.org/2023.09/gsrd/a10_gsrd/



Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,605 Views

Hi Richard_P,


Any further follow up from the previous comments?


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,604 Views

Hi Richard_P,


Any follow up from the previous comments?


Thanks.

Regards,

Aik Eu


0 Kudos
Richard_P
Beginner
1,558 Views

Hi Aik,

I found that the dev kit uses a UEFI bootloader on its SD card image and that explains why there was no u-boot-splx4.sfp file on it. I carefully followed the steps for building the SD card image components on the Rocketboards website. I was able to successfully build all of the image components.  I wasn't able to create the SD card image file though due to a python script error when trying to create a FAT32 filesystem. I'm still trying to resolve that problem. I have attached that error log in case someone knows the fix for that issue.

That problem with making the image file is not holding me up though.  I was still able to test the spl and uboot components that I built, loading them with the debugger, but I got the same memory access error. I now suspect there is something wrong with by Ubuntu build environment that could be causing the u-boot issues I am seeing. I am in the process of reviewing my build environment setup to see if I missed something. I will post my findings later today or tomorrow.

 

Thanks,

 

Richard

0 Kudos
aikeu
Employee
1,542 Views

Hi Richard_P,


I think the error is related to the section Build SD Card Image under Create the folder for the FAT partition and gather the files.

Make sure you have the files with the correct format(generated following the steps/using the pre-built release) for creating the fat partition.


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,493 Views

Hi Richard_P,


May I know any follow up on the issue?


Thanks.

Regards,

Aik EU


0 Kudos
Richard_P
Beginner
1,467 Views

Hi Aik,

Yes, with some help I was able to determine the cause of the original error I was receiving when I tried to load u-boot using the Arm DS debugger:

+loadfile u-boot-socfpga/u-boot
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00000805, DFAR = 0x01001020
ERROR(CMD16-TAD59-NAL18):
# in C:\Users\engineering\HD-MRPS\Linux_Boot\11-18-2023\debug-u-boot-A10.ds:27 while executing: loadfile u-boot-socfpga/u-boot
! Failed to load "u-boot"
! Download of 356,184 bytes to address S:0x01000040 failed while writing block of 4,096 bytes to address S:0x01000040
! Bus error on memory operation.ERROR(CMD656): The script C:\Users\engineering\HD-MRPS\Linux_Boot\11-18-2023\debug-u-boot-A10.ds failed to complete due to an error during execution of the script

 

We found that this error did not occur when following the debugger command line instructions instead of using the Arm DS debugger GUI:

cd a10_soc_devkit_ghrd/software/bootloader
~/intelFPGA_pro/23.3/nios2eds/nios2_command_shell.sh \
/opt/arm/developmentstudio-2021.1/bin/armdbg \
--cdb-entry="Intel SoC FPGA::Arria 10 SoC::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A9_0::USB-Blaster" \
--cdb-entry-param="rvi_address=USB-BlasterII on localhost [3-3.1.1]:USB-BlasterII 3-3.1.1" \
--continue_on_error=true \
--stop_on_connect=false \
-s run-u-boot.ds

So, using the command line debugger instructions fixed the problem. I don't know why the loading of u-boot fails when using the Arm DS debugger GUI though even though it seems to be setup the same way and it calls the same script. Note that I did not use the nios2_command_shell, but I used the Intel SoC EDS Command Shell instead. It works just fine though. So, I can now successfully load u-boot using the command line debugger instructions.

 

Thanks,

 

Richard

0 Kudos
aikeu
Employee
1,367 Views

Hi Richard_P,


Good to heard that the issue has been resolved.

I am closing the thread for now.


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


Thanks.

Regards,

Aik Eu


0 Kudos
Reply