How to load intel RSU driver using "insmod"?
Hi,
This question is slightly related to my question in this thread about Intel Stratix-10 RSU feature.
I have been following the instruction from this official document.
Currently, I am trying to load the "intel RSU driver" in Linux on an stratix-10 FPGA board. I have checked and confirmed that the the kernel configuration file sets the "CONFIG_INTEL_STRATIX10_RSU=m". This page of the RSU documentation suggests to use "insmod" to load this module in, but how would I go about this? Do I need a ".ko" file? If you can provide the command, or a link to a more thorough document, that would also be great!
I have noticed that the "dev/mtd0", which is the interface for the LIBRSU (RSU_CLIENT) is not mounted. The "/etc/librsu.rc" file has the default values as shown here. However when I try to run the "rsu_client" with any arguments I get the following:
root@board:~# ./rsu_client -c librsu: librsu_misc_get_devattr(): error: Unable to open device attribute file '/sys/devices/platform/stratix10-rsu.0/spt0_address' [LOW] librsu: librsu_ll_open_qspi(): error: Unable to open '/dev/mtd0' [LOW] librsu_init return -2
I assume it at least partially has to do with the fact that the RSU driver is not loaded!
If it is any help, when I run "lsmod" I simply get "not tainted".
Lastly, the documentation mentions "the MTD QSPI partition to be used
by LIBRSU must start at the location of the SPT0, in order for LIBRSU to be able to
determine the flash partitioning information" here ; does this mean that in the device tree, it is not enough to describe the QSPI flash start location and we have to jump over the "BOOT_INFO" and "FACTORY_IMAGE" section in the flash by making a modification inthe device tree? how would one go about this? can this be done without rebuilding the kernel?
If there is a reference design/file/sample that'd be great too!
Thank you!
I will leave this here in case someone in the future needs to do this.
checkout this link for version compatibility:
Remote System Update Compatibility | Documentation | RocketBoards.org
What "worked" for me was to compile ATF 2.4.1, kernel 5.4.114 with RSU and u-boot 2021.01 plus the RSU libraries that needs to be put on the HPS, essentially the exact version they had in their manual.
ATF 2.6.1 crashed when booting into the kernel, with u-boot 2021.01, Intel does not really support older versions, so performance most likely will regress.
Side note:
Updating to u-boot 2021.01 from 2019 also meant that the L3 registers needed to be handled differently, the "sec_reg" driver that they introduced that can touch the L3 registers in the DTS file, only starts to exist from uboot 2021.04 and even then, it does not preserve the values of the RESERVED registers.
So for that I had to follow the suggestions at here and recompile ATF with the modification to its source code and add a script in u-boot to set them before booting the kernel.