Skip to main content
Graduate
January 23, 2025
Question

IAC exceptions when launching M33 core

  • January 23, 2025
  • 1 reply
  • 3708 views

Hello,

I am trying to load an .elf file on the M33 core on my stm32mp257f processor. When I launch the remote core using remoteproc I get the following errors.

 

 

 

root@stm32mp257f-hydra-mx:~# echo -n /home/root > /sys/module/firmware_class/parameters/path
root@stm32mp257f-hydra-mx:~# echo Sparta.elf > /sys/class/remoteproc/remoteproc0/firmware
root@stm32mp257f-hydra-mx:~# echo start > /sys/class/remoteproc/remoteproc0/state
[ 119.336297] remoteproc remoteproc0: powering up m33
[ 119.511444] remoteproc remoteproc0: Booting fw image Sparta.elf, size 6237772
[ 119.513130] remoteproc remoteproc0: unsupported fw ver: 0
[ 119.518401] remoteproc remoteproc0: no resource table found for this firmware
E/TC:0 stm32_iac_itr:192 IAC exceptions [159:128]: 0x200
E/TC:0 stm32_iac_itr:197 IAC exception ID: 137
E/TC:0 stm32_risaf_dump_erroneous_data:256

DUMPING DATA FOR risaf@420d0000
E/TC:0 stm32_risaf_dump_erroneous_data:257 =====================================================
E/TC:0 stm32_risaf_dump_erroneous_data:258 Status register (IAESR0): 0x91
E/TC:0 stm32_risaf_dump_erroneous_data:266 -----------------------------------------------------
E/TC:0 stm32_risaf_dump_erroneous_data:268 Faulty address (IADDR0): 0x80000000
E/TC:0 stm32_risaf_dump_erroneous_data:287 =====================================================
E/TC:1 stm32_iac_itr:192 IAC exceptions [159:128]: 0x200
[ 119.587786] remoteproc remoteproc0: unsupported fw ver: 0
[ 119.592833] remoteproc remoteproc0: remote processor m33 is now up
root@stm32mp257f-hydra-mx:~# E/TC:1 stm32_iac_itr:197 IAC exception ID: 137
E/TC:1 stm32_iac_itr:197 IAC exception ID: 132
E/TC:1 stm32_risaf_dump_erroneous_data:256

DUMPING DATA FOR risaf@420d0000
E/TC:1 stm32_risaf_dump_erroneous_data:257 =====================================================
E/TC:1 stm32_risaf_dump_erroneous_data:258 Status register (IAESR0): 0x91
E/TC:1 stm32_risaf_dump_erroneous_data:266 -----------------------------------------------------
E/TC:1 stm32_risaf_dump_erroneous_data:268 Faulty address (IADDR0): 0x80000080
E/TC:1 stm32_risaf_dump_erroneous_data:287 =====================================================
E/TC:1 stm32_risab_dump_erroneous_data:146

DUMPING DATA FOR risab@42130000
E/TC:1 stm32_risab_dump_erroneous_data:147 =====================================================
E/TC:1 stm32_risab_dump_erroneous_data:148 Status register (IAESR): 0x12
E/TC:1 stm32_risab_dump_erroneous_data:150 -----------------------------------------------------
E/TC:1 stm32_risab_dump_erroneous_data:151 Faulty address (IADDR): 0xa080004
E/TC:1 stm32_risab_dump_erroneous_data:154 =====================================================

 

 

 

 Any suggestions?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    January 23, 2025

    Hi @nielsenni101 ,

    Seems you are trying to start an unsigned .elf while by default OpenSTLinux requires a signed binary. 

    Note also that running M33 firmware requires appropriate Riff configuration. 

    In Starter package you might use m33-exemples flavor of tsv. 

    Please check Wiki : 

    Modify, rebuild and reload the firmware - stm32mpu

    Hope it help 

    Olivier 

     

     

     

    Graduate
    January 24, 2025

    Thanks for your response,

    I was thinking that there is an RIF issue, I have just not been able to figure out what is wrong.

    I believe the issue is due to something over here at address 0xa080000?

    nielsenni101_0-1737735804811.png

    From what I understand the error below means CID2 is making an illegal access to address 0xa080004. But from the configuration above I do not see why that is happening.

    DUMPING DATA FOR risab@42130000
    E/TC:1 stm32_risab_dump_erroneous_data:147 =====================================================
    E/TC:1 stm32_risab_dump_erroneous_data:148 Status register (IAESR): 0x12
    E/TC:1 stm32_risab_dump_erroneous_data:150 -----------------------------------------------------
    E/TC:1 stm32_risab_dump_erroneous_data:151 Faulty address (IADDR): 0xa080004
    E/TC:1 stm32_risab_dump_erroneous_data:154 =====================================================

     

    Just to preface, I am running on custom hardware.

    I set up the m33_rproc node to support the non-signed .elf file. See below

    &m33_rproc {
    	status = "okay";
    
    	/* USER CODE BEGIN m33_rproc */
     	compatible = "st,stm32mp2-m33";
     	mboxes = <&ipcc1 0x100>, <&ipcc1 0x101>, <&ipcc1 2>;
     	mbox-names = "vq0", "vq1", "shutdown";
     	memory-region = <&ipc_shmem_1>, <&vdev0vring0>,<&vdev0vring1>,
     <&vdev0buffer>, <&cm33_sram1>, <&cm33_sram2>, <&cm33_retram>, <&cm33_cube_fw>, <&cm33_cube_data>;
     
     /* The resets are managed by the Linux remoteproc driver */
    	resets = <&scmi_reset RST_SCMI_C2_R>,
    			 <&scmi_reset RST_SCMI_C2_HOLDBOOT_R>;
    	reset-names = "mcu_rst", "hold_boot";
     	/* declare boot address register */
    	st,syscfg-nsvtor = <&a35ss_syscfg 0xa8 0xffffff80>;
    
    	/* USER CODE END m33_rproc */
    };

     Is there something in openstlinux that can be configured to allow unsigned packages?

    ST Employee
    January 27, 2025

    Hello,

    could you add dynamic trace in the linux kernel befor staring the Cortex-M33 firmware?

    echo -n 'file stm32_rproc.c +p' > /sys/kernel/debug/dynamic_debug/control


    Loading and staring the Cortex-M33, you have similar extra debug traces:

    [ 44.224640] remoteproc remoteproc0: phdr: type 1 da 0x80100000 memsz 0x540 filesz 0x540
    [ 44.224651] remoteproc remoteproc0: phdr: type 1 da 0x80100600 memsz 0x8 filesz 0x8
    [ 44.224660] remoteproc remoteproc0: phdr: type 1 da 0x80a00000 memsz 0x18488 filesz 0x18488
    [ 44.224737] remoteproc remoteproc0: phdr: type 1 da 0x80e00000 memsz 0x12070 filesz 0x1f8
    [ 44.224762] remoteproc remoteproc0: phdr: type 1 da 0x81200000 memsz 0x8c filesz 0x8c
    [ 44.224775] remoteproc remoteproc0: boot vector address = 0x80100000

    This provides addresses and sizes of Cortex-M33 firmware segments that contain code and data.

    Then you have to give RIF access rights to both CID1 (for the load) and CID2 (for the execution) on these memory regions.

    A simpler alternative is to suppress CID filtering on these memory regions. Since you are not using OP-TEE with firmware signature and authentication, protecting the memory region is not really necessary.