Synchronous exception when flashing ptable partition


#1

Hi,

I have build my ATF with OPTEE with this tutorial : ATF tutorial

When I want to continue the tutorial and flash the partition table an exception appear:

Press ESCAPE for boot options Ufs Sending NOP IN command Error, Status = Time out
.[Bds]Booting Boot from SD
[Bds]Booting Grub
Ufs Sending NOP IN command Error, Status = Time out
[Bds]Booting Android Boot
add-symbol-file /home/anonymous/workspace/optee/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp/DEBUG/AndroidBootApp.dll 0xB9B2F000
Loading driver at 0x000B9B2E000 EntryPoint=0x000B9B2F000 AndroidBootApp.efi
Failed to get BlockIo: Unsupported
Failed to load boot image from boot partition: Unsupported
Failed to boot from partition: Unsupported
Error: Image at 000B9B2E000 start failed: Unsupported
remove-symbol-file /home/anonymous/workspace/optee/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp/DEBUG/AndroidBootApp.dll 0xB9B2F000
Image Return Status = Unsupported
[Bds]Booting Android Fastboot
add-symbol-file /home/anonymous/workspace/optee/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp/DEBUG/AndroidFastbootApp.dll 0xB9B2C000
Loading driver at 0x000B9B2B000 EntryPoint=0x000B9B2C000 AndroidFastbootApp.efi
Warning: Couldn’t locate Android NVM device (status: Not Found)
Android Fastboot mode - version 0.7.
Press RETURN or SPACE key to quit.
Warning: Couldn’t locate Android NVM device (status: Not Found)
Fastboot platform: check for partition-type:ptable
Downloading 24576 bytes
#FastbootTransportUsbRequestReceive, 255, BufferSize:24576
24576 / 24576 bytes downloaded (100%)
Flashing partition ptable

Synchronous Exception at 0x0000000000000000

X0 0x0000000000000000 X1 0x0000000000000000 X2 0x0000000000000000 X3 0x0000000000006000
X4 0x00000000BE77F018 X5 0x0000000000000000 X6 0x0000000000000000 X7 0x0000000000000020
X8 0x00000000BF1FE898 X9 0x00000000FFF06000 X10 0x0000000000000004 X11 0x0000000000000000
X12 0x00000000703FE07A X13 0x0000000000000000 X14 0x0000000000000000 X15 0x0000000000000000
X16 0x00000000BFFFF9D0 X17 0x0000000000000000 X18 0x0000000000000000 X19 0x00000000BE84D898
X20 0x00000000BE847F98 X21 0x0000000000000000 X22 0x0000000000000000 X23 0x0000000000000000
X24 0x0000000000000000 X25 0x0000000000000000 X26 0x0000000000000000 X27 0x0000000000000000
X28 0x0000000000000000 FP 0x00000000BFFFF3C0 LR 0x00000000B9B5BBD4

V0 0xA6CD3BFFC2E71B7E ADB4BFBB39BCDF5D V1 0xD386F5F73FBC1A9F DBED7FF2B3FBFB75
V2 0xF97BBFB5EDFBFBBF 2AFD737DBB63F7FC V3 0xBAEBFD19FDFBE7BB 2BFEEF79FE7FEFFC
V4 0xAFDE5F33AA57B97F CEC1EFDD7FBDFD7F V5 0x61FF7FF8DB78DFE7 6F817FF3BFDDFFF7
V6 0x3FFFD3FFBDABFFFE B37F77F27DFFFF73 V7 0x7FBDEDFFED7BFF77 F7FFB77FFDEFEFDC
V8 0x0000000000000000 17FFF79FDF77EBE7 V9 0x0000000000000000 EFFD7FF77FF7E7FF
V10 0x0000000000000000 E3A6FBBFF7F3A77A V11 0x0000000000000000 BE6BFBCD7E5BD1CB
V12 0x0000000000000000 4BFDC5BFFBFB69FF V13 0x0000000000000000 FFFFF7EE7D7E75FF
V14 0x0000000000000000 FB7B9BA578CFF37F V15 0x0000000000000000 F4C9A7CEE717FD7D
V16 0xBD467775DB78AEFA FFB7D77F12DE7F77 V17 0xE7AFFFEF3D4FFE9C 50DFB1DADE55D3DB
V18 0x34FAE6E35FEF57DD F6FFFBFBCFFBE37F V19 0x63D8F0969C95FFE1 DFDF597634FF37CF
V20 0xFBB77F2FAE33EFFD BBBEFFFFFEFDEFEB V21 0xB36FDDE3BDEFF77E FFEEBC7F77EC7F77
V22 0xFD1E8FDF3FFFE6F0 8E77FFFFAFE5AE57 V23 0xFFF7C7F94FF7F7D7 B9DFFB2F8CFEDF5D
V24 0x84FFF5BB9F5FEDFF FFF9AF7FA7FBF67F V25 0xDFEF7EF4DDC751D7 7BDEF9DDDBF2FF9E
V26 0xF9F37F6DEAFCDBFB FBFFFA54BD35EEFE V27 0xE3D56D164D73FEE1 FFFF1D356F7DDFDB
V28 0x19FD89F737F1A3FE C2BB37FCFDDFBFFF V29 0x1FDB3DFF7EFEBFEF 8DEFABBDB5EFFFD9
V30 0xB71FFFFB8BFFBBAA 9BD2CED2635CECFB V31 0x7FBBB7DFEFB9EFFF DDFEF3E3BF7EBF5F

SP 0x00000000BFFFF3C0 ELR 0x0000000000000000 SPSR 0x60000205 FPSR 0x00000000
ESR 0x02000000 FAR 0x0000000000000000

ESR : EC 0x00 IL 0x1 ISS 0x00000000

Stack dump:
00000BFFFF2C0: DFDF597634FF37CF 63D8F0969C95FFE1 BBBEFFFFFEFDEFEB FBB77F2FAE33EFFD
00000BFFFF2E0: FFEEBC7F77EC7F77 B36FDDE3BDEFF77E 8E77FFFFAFE5AE57 FD1E8FDF3FFFE6F0
00000BFFFF300: B9DFFB2F8CFEDF5D FFF7C7F94FF7F7D7 FFF9AF7FA7FBF67F 84FFF5BB9F5FEDFF
00000BFFFF320: 7BDEF9DDDBF2FF9E DFEF7EF4DDC751D7 FBFFFA54BD35EEFE F9F37F6DEAFCDBFB
00000BFFFF340: FFFF1D356F7DDFDB E3D56D164D73FEE1 C2BB37FCFDDFBFFF 19FD89F737F1A3FE
00000BFFFF360: 8DEFABBDB5EFFFD9 1FDB3DFF7EFEBFEF 9BD2CED2635CECFB B71FFFFB8BFFBBAA
00000BFFFF380: DDFEF3E3BF7EBF5F 7FBBB7DFEFB9EFFF 0000000000000000 0000000060000205
00000BFFFF3A0: 0000000000000000 0000000002000000 0000000000000000 00000000B9B5E6CC
00000BFFFF3C0: 00000000BFFFF3F0 00000000B9B5BF5C 00000000BE77F018 0000000000006000
00000BFFFF3E0: 00000000B9B68E56 00000000BFFFF74C 00000000BFFFF4F0 00000000B9B2CCA8
00000BFFFF400: 8E77FFFFAFE5AE57 00000000BE77F018 0000000000006000 00000000BFFFF746
00000BFFFF420: FFF9AF7FA7FBF67F 84FFF5BB9F5FEDFF 7BDEF9DDDBF2FF9E DFEF7EF4DDC751D7
00000BFFFF440: FBFFFA54BD35EEFE F9F37F6DEAFCDBFB FFFF1D356F7DDFDB E3D56D164D73FEE1
00000BFFFF460: C2BB37FCFDDFBFFF 19FD89F737F1A3FE 8DEFABBDB5EFFFD9 1FDB3DFF7EFEBFEF
00000BFFFF480: 9BD2CED2635CECFB B71FFFFB8BFFBBAA DDFEF3E3BF7EBF5F 7FBBB7DFEFB9EFFF
00000BFFFF4A0: 00000000B9B2CB40 0000000020000205 0000000000000000 0000000000000000
ASSERT [ArmCpuDxe] /home/anonymous/workspace/optee/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(265): ((BOOLEAN)(0==1))

Flashing shell :

Port name: /dev/ttyUSB1
0: Image: ./hisi-sec_usb_xloader.img Downalod Address: 0x20000
1: Image: ./hisi-sec_uce_boot.img Downalod Address: 0x6a908000
2: Image: ./recovery.bin Downalod Address: 0x1ac00000
Serial port open successfully!
Start downloading ./hisi-sec_usb_xloader.img@0x20000…
file total size 99584
downlaod address 0x20000
Finish downloading
Start downloading ./hisi-sec_uce_boot.img@0x6a908000…
file total size 23680
downlaod address 0x6a908000
Finish downloading
Start downloading ./recovery.bin@0x1ac00000…
file total size 1179648
downlaod address 0x1ac00000
Finish downloading
< waiting for any device >
target reported max download size of 134217728 bytes
sending ‘ptable’ (24 KB)…
OKAY [ 0.033s]
writing ‘ptable’…

Someone had the same issue and how you solved it ? :slight_smile:

Thanks in advance
Solution : Before starting to flash ptable and other partitions we need to force the board to pass in fastboot mode (with switches) because fastboot doesn’t start automatically. Then it works