Inforce Computing Forums

inforce computing forums to discuss about inforce products

Incomplete recovery of SOM using APQ8096_qdl_re

Questions and discussions related to Inforce 6601™ development kit

by kbow » Tue Mar 26, 2019 6:58 am

Issue: Incomplete recovery of INFORCE-6601 SOM using APQ8096_qdl_recovery_package
INFORCE SOM: IFC6601-10-P3 and IFC6601-00-P3
INFORCE Developer Board/s: IOC6601-00-P1
Host System: Ubuntu 18.04.2 LTS w/ kernel "Linux 4.18.0-16-generic #17~18.04.1"
Recovery Package: IFC66XX_qdl_USB_recovery_package_880600_V1.0

Issue is similar to: Post 1294 "Unable to use APQ8096_qdl_recovery_package"

NOTE: The developer boards look like the image in section 3.1 for the board noted as
"SYS6601-?5-XX" as shown in "APQ8096_Recovery_of_Bricked_Boards_using_USB_003228_Rev_B.pdf".

All steps described in the noted pdf behaved as defined except the results as shown by
step "7" on page 4. The pdf process was repeated on a 2nd board with the same results.

Output from 'qdl' on host session ('sudo /<path>/qdl ...'):
============================================
HELLO version: 0x2 compatible: 0x1 max_len: 1024 mode: 0
READ64 image: 13 offset: 0x0 length: 0x40
... repeating 'READ64' offset logs removed for brevity ...
READ64 image: 13 offset: 0x6d1b0 length: 0xff4
END OF IMAGE image: 13 status: 0
DONE status: 1
qdl: failed to read: Connection timed out


Serial-Console Output during 'qdl' session:
================================
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.1.0-00301
S - IMAGE_VARIANT_STRING=M8996LAB
S - OEM_IMAGE_VERSION_STRING=crm-ubuntu68
S - Boot Interface: Unknown
S - Secure Boot: Off
S - Boot Config @ 0x00076044 = 0x000001c1
S - JTAG ID @ 0x000760f4 = 0x4003e0e1
S - OEM ID @ 0x000760f8 = 0x00000000
S - Serial Number @ 0x00074138 = 0x0b6da521
S - OEM Config Row 0 @ 0x00074188 = 0x0000000000000000
S - OEM Config Row 1 @ 0x00074190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x000741a0 = 0x0050000010000100
S - Feature Config Row 1 @ 0x000741a8 = 0x00fff00001ffffff
S - Core 0 Frequency, 19 MHz
B - 0 - PBL, Start
B - 10413 - bootable_media_detect_entry, Start
B - 582856 - bootable_media_detect_success, Start
B - 582860 - elf_loader_entry, Start
B - 82985708 - auth_hash_seg_entry, Start
B - 82985812 - auth_hash_seg_exit, Start
B - 83054674 - elf_segs_hash_verify_entry, Start
B - 83058223 - PBL, End
B - 0 - SBL1, Start
B - 83100330 - boot_flash_init, Start
D - 0 - boot_flash_init, Delta
B - 83103289 - sbl1_ddr_set_default_params, Start
D - 0 - sbl1_ddr_set_default_params, Delta
B - 83111280 - boot_config_data_table_init, Start
D - 0 - boot_config_data_table_init, Delta - (0 Bytes)
B - 83120308 - CDT Version:3,Platform ID:1,Major ID:1,Minor ID:0,Subtype:0
B - 83125859 - pm_device_programmer_init, Start
D - 1555 - pm_device_programmer_init, Delta
B - 83137052 - Pre_DDR_clock_init, Start
D - 640 - Pre_DDR_clock_init, Delta
B - 83145104 - ddr_initialize_device, Start
B - 83148764 - 8996 v3.x detected, Max frequency = 1.8 GHz
B - 83158433 - ddr_initialize_device, Delta
B - 83158433 - DDR ID, Rank 0, Rank 1, 0x6, 0x400, 0x400
B - 83162276 - Basic DDR tests done
B - 83204701 - Entering DeviceProgrammer DDR
B - 84326095 - usb: init start
B - 84326125 - usb: HIGH , 0x900e
B - 84328138 - usb: ENUM success

dmesg Output during 'qdl' session:
===========================
[ 8442.397203] usb 3-1.6: new high-speed USB device number 12 using xhci_hcd
[ 8442.501139] usb 3-1.6: New USB device found, idVendor=05c6, idProduct=9008, bcdDevice= 0.00
[ 8442.501141] usb 3-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8442.501142] usb 3-1.6: Product: QUSB__BULK
[ 8442.501143] usb 3-1.6: Manufacturer: Qualcomm CDMA Technologies MSM
[ 8442.503786] qcserial 3-1.6:1.0: Qualcomm USB modem converter detected
[ 8442.503905] usb 3-1.6: Qualcomm USB modem converter now attached to ttyUSB1
[ 8449.638655] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[ 8449.638703] qcserial 3-1.6:1.0: device disconnected

** No apparent indication of 'qdl' timeout failure from serial console or dmesg.

Serial-Console Output during 'normal' SOM boot with the DIP switches restored to normal per step 9.
* This output was logged after attempted qdl recovery (and looks the same as prior to qdl recovery):
=========================================================================
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.1.0-00291
S - IMAGE_VARIANT_STRING=M8996LAB
S - OEM_IMAGE_VERSION_STRING=inforce-To-be-filled-by-O-E-M
S - Boot Interface: UFS
S - Secure Boot: Off
S - Boot Config @ 0x00076044 = 0x000001c9
S - JTAG ID @ 0x000760f4 = 0x4003e0e1
S - OEM ID @ 0x000760f8 = 0x00000000
S - Serial Number @ 0x00074138 = 0x0b6da521
S - OEM Config Row 0 @ 0x00074188 = 0x0000000000000000
S - OEM Config Row 1 @ 0x00074190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x000741a0 = 0x0050000010000100
S - Feature Config Row 1 @ 0x000741a8 = 0x00fff00001ffffff
S - Core 0 Frequency, 1228 MHz
B - 0 - PBL, Start
B - 10414 - bootable_media_detect_entry, Start
B - 45949 - bootable_media_detect_success, Start
B - 45953 - elf_loader_entry, Start
B - 47003 - auth_hash_seg_entry, Start
B - 47105 - auth_hash_seg_exit, Start
B - 79077 - elf_segs_hash_verify_entry, Start
B - 81567 - PBL, End
B - 83600 - SBL1, Start
B - 181109 - usb: hs_phy_nondrive_start
B - 181444 - usb: hs_phy_nondrive_finish
B - 184403 - 0x5A5B != 0xD0
B - 188551 - 0x5A5B != 0xD0 checked second time!! :(
B - 191082 - boot_flash_init, Start
D - 30 - boot_flash_init, Delta
B - 199561 - sbl1_ddr_set_default_params, Start
D - 30 - sbl1_ddr_set_default_params, Delta
B - 207552 - boot_config_data_table_init, Start
D - 401654 - boot_config_data_table_init, Delta - (60 Bytes)
B - 613751 - CDT Version:3,Platform ID:24,Major ID:1,Minor ID:0,Subtype:0
B - 618418 - Image Load, Start
D - 22173 - PMIC Image Loaded, Delta - (37248 Bytes)
B - 640622 - pm_device_init, Start
B - 646386 - PON REASON:PM0:0xa0 PM1:0xa0
B - 682681 - PM_SET_VAL:Skip
D - 39894 - pm_device_init, Delta
B - 684603 - pm_driver_init, Start
D - 2897 - pm_driver_init, Delta
B - 691191 - pm_sbl_chg_init, Start
D - 0 - pm_sbl_chg_init, Delta
B - 697962 - vsense_init, Start
D - 0 - vsense_init, Delta
B - 706075 - Pre_DDR_clock_init, Start
D - 366 - Pre_DDR_clock_init, Delta
B - 711565 - ddr_initialize_device, Start
B - 715255 - 8996 v3.x detected, Max frequency = 1.8 GHz
B - 724802 - ddr_initialize_device, Delta
B - 724802 - DDR ID, Rank 0, Rank 1, 0x6, 0x400, 0x400
B - 728767 - Basic DDR tests done
B - 797361 - clock_init, Start
D - 244 - clock_init, Delta
B - 799344 - Image Load, Start
D - 5490 - QSEE Dev Config Image Loaded, Delta - (47856 Bytes)
B - 805657 - Image Load, Start
D - 5856 - APDP Image Loaded, Delta - (0 Bytes)
B - 814472 - usb: UFS Serial - d68ed563
B - 819138 - usb: fedl, vbus_low
B - 822798 - Image Load, Start
D - 46086 - QSEE Image Loaded, Delta - (1675012 Bytes)
B - 868914 - Image Load, Start
D - 183 - SEC Image Loaded, Delta - (4096 Bytes)
B - 876570 - sbl1_efs_handle_cookies, Start
D - 274 - sbl1_efs_handle_cookies, Delta
B - 884957 - Image Load, Start
D - 14152 - QHEE Image Loaded, Delta - (262472 Bytes)
B - 899109 - Image Load, Start
D - 13695 - RPM Image Loaded, Delta - (223964 Bytes)
B - 913048 - Image Load, Start
D - 3751 - STI Image Loaded, Delta - (0 Bytes)
B - 919971 - Image Load, Start

B - 924760 - Error code 126 at /home/inforce/Roadmap-Projects/6601/MM-0.9/chipcode/
msm8996-la-2-0_amss_standard_oem.git/boot_images/QcomPkg/XBLLo4

B - 927413 - Image Load, Start
D - 22814 - XBLRamDump Image Loaded, Delta - (343182 Bytes)
B - 1004517 - usb: init start

** In the log output above you should note the "Error code 126", which dis not expected. There is no transition to SBL after the 'init start' event as expected.
kbow
 
Posts: 4
Joined: Mon Mar 25, 2019 8:36 am

by kbow » Mon Apr 01, 2019 8:00 am

Additional Info: Use of strace on "qdl" shows timeout on the first qdl_read() within the "firehose.c" module, just after the completion of the "sahara.c" operations.

Resolution: Modify "qdl.c" to provide a delay "sleep(3); sync();" prior to performing the "firehose_read()" call. The sleep(3) was an arbitrary delay value. Alternate solution could be to improve the ioctl time-out robustness.

Sample Set/s:
-- ~9 attempts, 100% timeout failure, no modifications. Dell 5510 and System76-unitA
-- 2 attempts, 100% success, no modifications. System76-unitB
-- 3 attempts, 100% success, with above modifications. Dell5510.

Comments: qdl lives on the edge of robustness.
kbow
 
Posts: 4
Joined: Mon Mar 25, 2019 8:36 am

by ashwin » Thu Apr 11, 2019 1:59 am

Hi Kbow,

Are you able to recover the board successfully now?

Best Regards,
Ashwin
ashwin
 
Posts: 62
Joined: Wed Jul 01, 2015 10:07 pm

by kbow » Thu Apr 11, 2019 7:43 am

Yes. Issue considered closed.

Once I understood the issue, I no longer considered it to be an INFORCE issue. However any feedback to Qual to improve the qdl ioctl timeout usage/s, would be beneficial?
kbow
 
Posts: 4
Joined: Mon Mar 25, 2019 8:36 am


Return to INFORCE 6601™ DEVELOPMENT KIT

Contact Us.