Необработанное исключение: недопустимая инструкция при запуске приложения в U-Boot
Я написал драйвер SPI для платы, и теперь, когда я пытаюсь запустить ядро Linux или любое отдельное приложение, я вижу
=> go 0x80200000
## Starting application at 0x80200000 ...
Unhandled exception: Illegal instruction
EPC: 0000000080200000 RA: 000000008ff995fa TVAL: 00000000464c457f
EPC: 0000000070468000 RA: 00000000802015fa reloc adjusted
resetting ...
reset not supported yet
### ERROR ### Please RESET the board ###
Когда я сбрасываю данные с помощью команды md.b, я вижу, что в первых нескольких местах есть значения, а в некоторых других - 0x00.
Дамп прилагается:
=> md.b 0x80200000
80200000: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 .ELF............
80200010: 02 00 f3 00 01 00 00 00 00 00 00 80 00 00 00 00 ................
80200020: 40 00 00 00 00 00 00 00 90 16 01 00 00 00 00 00 @...............
80200030: 01 00 00 00 40 00 38 00 01 00 40 00 15 00 14 00 ....@.8...@.....
80200040: 01 00 00 00 07 00 00 00 00 10 00 00 00 00 00 00 ................
80200050: 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 ................
80200060: 34 40 00 00 00 00 00 00 f0 43 00 00 00 00 00 00 4@.......C......
80200070: 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80200080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80200090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
802000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
802000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
802000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
802000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
802000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
802000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Почему мы получаем эту ошибку с недопустимой инструкцией. Когда я пытаюсь загрузить ядро Linux, я получаю ту же ловушку (недопустимая инструкция).
И когда я копирую dtb для ядра Linux, я могу просмотреть подробности (см. Ниже)
=> md.b ${fdt_addr_r}
88000000: d0 0d fe ed 00 00 0b 24 00 00 00 38 00 00 08 54 .......$...8...T
88000010: 00 00 00 28 00 00 00 11 00 00 00 10 00 00 00 00 ...(............
88000020: 00 00 02 d0 00 00 08 1c 00 00 00 00 00 00 00 00 ................
88000030: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ................
88000040: 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 02 ................
88000050: 00 00 00 03 00 00 00 04 00 00 00 0f 00 00 00 02 ................
88000060: 00 00 00 03 00 00 00 16 00 00 00 1b 73 68 61 6b ............shak
88000070: 74 69 2c 73 70 69 6b 65 2d 62 61 72 65 2d 64 65 ti,spike-bare-de
88000080: 76 00 00 00 00 00 00 03 00 00 00 12 00 00 00 26 v..............&
88000090: 73 68 61 6b 74 69 2c 73 70 69 6b 65 2d 62 61 72 shakti,spike-bar
880000a0: 65 00 00 00 00 00 00 01 63 70 75 73 00 00 00 00 e.......cpus....
880000b0: 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 ................
880000c0: 00 00 00 03 00 00 00 04 00 00 00 0f 00 00 00 00 ................
880000d0: 00 00 00 03 00 00 00 04 00 00 00 2c 00 00 80 00 ...........,....
880000e0: 00 00 00 01 63 70 75 40 30 00 00 00 00 00 00 03 ....cpu@0.......
880000f0: 00 00 00 04 00 00 00 3f 63 70 75 00 00 00 00 03 .......?cpu.....
88000100: 00 00 00 04 00 00 00 4b 00 00 00 00 00 00 00 03 .......K........
88000110: 00 00 00 05 00 00 00 4f 6f 6b 61 79 00 00 00 00 .......Ookay....
88000120: 00 00 00 03 00 00 00 06 00 00 00 1b 72 69 73 63 ............risc
88000130: 76 00 00 00 00 00 00 03 00 00 00 09 00 00 00 56 v..............V
88000140: 72 76 36 34 69 6d 61 63 00 00 00 00 00 00 00 03 rv64imac........
88000150: 00 00 00 0b 00 00 00 60 72 69 73 63 76 2c 73 76 .......`riscv,sv
88000160: 33 39 00 00 00 00 00 03 00 00 00 04 00 00 00 69 39.............i
88000170: 02 fa f0 80 00 00 00 01 69 6e 74 65 72 72 75 70 ........interrup
88000180: 74 2d 63 6f 6e 74 72 6f 6c 6c 65 72 00 00 00 00 t-controller....
88000190: 00 00 00 03 00 00 00 04 00 00 00 79 00 00 00 01 ...........y....
880001a0: 00 00 00 03 00 00 00 00 00 00 00 8a 00 00 00 03 ................
880001b0: 00 00 00 0f 00 00 00 1b 72 69 73 63 76 2c 63 70 ........riscv,cp
880001c0: 75 2d 69 6e 74 63 00 00 00 00 00 03 00 00 00 04 u-intc..........
880001d0: 00 00 00 9f 00 00 00 01 00 00 00 02 00 00 00 02 ................
880001e0: 00 00 00 02 00 00 00 01 6d 65 6d 6f 72 79 40 38 ........memory@8
880001f0: 30 30 30 30 30 30 30 00 00 00 00 03 00 00 00 07 0000000.........
Спасибо.