ZuluIDE / ZuluIDE-firmware

ZuluIDE emulates a parallel ATA ATAPI CD-ROM drive, or parallel ATA Zip/Removable (read and write) media
https://zuluide.com
Other
38 stars 4 forks source link

Firmware crash when attempting boot from ATA/133 PCI expansion card #27

Closed aperezbios closed 1 year ago

aperezbios commented 1 year ago

Using the latest firmware and bitstream on a Blue & White PowerMac G3 with a Sonnet TempoATA133 add-in PCI card, which uses a version of the Promise PDC29269M, which contains OpenFirmware bootable fcode, I'm able to reliably reproduce a crash when attempting to boot from an emulated ISO of MacOS 9.2.1. The exact same ZuluIDE, config, and ISO work fine when attached to the on-board secondary IDE interface of the B&W PowerMac G3, and I'm able to successfully boot off the CD.

[10ms] FW Version: 2023.06.21-dev Jun 21 2023 17:33:33
[11ms] DIP switch settings: cablesel 0, drive_id 0 debug log 1
[11ms] Flash chip size: 2048 kB
[27ms] SD card detected, FAT64 volume size: 60874 MB
[27ms] SD MID: 0x03, OID: 0x53 0x44
[27ms] SD Name: SN64G
[28ms] SD Date: 6/2022
[28ms] SD Serial: 0x88A84E05
[79ms] Loaded bitstream from ice5lp1k_top_bitmap.bin to RAM, beginning FPGA load
[79ms] DBG Loading FPGA bitstream
[160ms] FPGA license code: 0x73 0x1D 0x72 0x19 0x52 0x1D 0x52 0x1D 0x52 0x1D 0x52 0x1D 0x52 0x1D 0x72 0x1D 
[161ms] DBG FPGA initialization succeeded
[163ms] Device type: CD-ROM
[169ms] Loading image Mac OS 9.2.1 Internal Edition.iso
[176ms] DBG Image file Mac OS 9.2.1 Internal Edition.iso is contiguous, sectors 70380288 to 71692207
[689ms] Device 0 configuration:
[689ms] -- Max PIO mode: 3 (phy max 3)
[690ms] -- Max UDMA mode: 0 (phy max 0)
[690ms] -- Max blocksize: 4096 (phy max 4096)
[690ms] DBG -- Operating as primary drive, secondary drive not detected
[693ms] Initialization complete!
[693ms] DBG IDE_EVENT_HWRST
[1194ms] DBG -- Operating as primary drive, secondary drive detected
[17414ms] DBG IDE_EVENT_SWRST
[18416ms] DBG IDE Command for DEV0: 0x08 IDE_CMD_DEVICE_RESET (device 0x00, dev_ctrl 0x00, feature 0xC0, sector_count 0x01, lba 0xEB 0x14 0x01)
[18418ms] DBG -- Command complete
[21024ms] DBG IDE Command for DEV0: 0xA1 IDE_CMD_IDENTIFY_PACKET_DEVICE (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x00, lba 0x02 0x00 0x00)
[21040ms] DBG -- Command complete
[21056ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x00 0x00)
[21072ms] DBG -- ATAPI command: ATAPI_CMD_TEST_UNIT_READY 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[21074ms] DBG -- Reporting UNIT_ATTENTION condition after reset/medium change (ASC:0x2900)
[21075ms] DBG -- Command complete
[21088ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x12 0x00)
[21090ms] DBG -- ATAPI command: ATAPI_CMD_REQUEST_SENSE 0x03 0x00 0x00 0x00 0x12 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[21091ms] DBG ---- ATAPI send 1x18 bytes: 0xF0 0x00 0x06 0x00 0x00 0x00 0x00 0x0B 0x00 0x00 0x00 0x00 0x29 0x00 0x00 0x00 0x00 0x00 
[21093ms] DBG -- ATAPI success
[21094ms] DBG -- Command complete
[21095ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x00 0x00)
[21111ms] DBG -- ATAPI command: ATAPI_CMD_TEST_UNIT_READY 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[21112ms] DBG -- ATAPI success
[21112ms] DBG -- Command complete
[35513ms] DBG IDE_EVENT_SWRST
[36746ms] DBG IDE Command for DEV0: 0xA1 IDE_CMD_IDENTIFY_PACKET_DEVICE (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x00, lba 0x02 0x00 0x00)
[36758ms] DBG -- Command complete
[37376ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x00 0x00)
[37378ms] DBG -- ATAPI command: ATAPI_CMD_TEST_UNIT_READY 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[37379ms] DBG -- Reporting UNIT_ATTENTION condition after reset/medium change (ASC:0x2900)
[37380ms] DBG -- Command complete
[37996ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x12 0x00)
[37998ms] DBG -- ATAPI command: ATAPI_CMD_REQUEST_SENSE 0x03 0x00 0x00 0x00 0x12 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[38000ms] DBG ---- ATAPI send 1x18 bytes: 0xF0 0x00 0x06 0x00 0x00 0x00 0x00 0x0B 0x00 0x00 0x00 0x00 0x29 0x00 0x00 0x00 0x00 0x00 
[38001ms] DBG -- ATAPI success
[38001ms] DBG -- Command complete
[38619ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x00 0x00)
[38621ms] DBG -- ATAPI command: ATAPI_CMD_TEST_UNIT_READY 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[38622ms] DBG -- ATAPI success
[38622ms] DBG -- Command complete
[39239ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x06 0x00)
[39241ms] DBG -- ATAPI command: ATAPI_CMD_INQUIRY 0x12 0x00 0x00 0x00 0x06 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[39242ms] DBG ---- ATAPI send 1x6 bytes: 0x05 0x80 0x00 0x21 0x1F 0x00 
[39243ms] DBG -- ATAPI success
[39243ms] DBG -- Command complete
[39861ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x24 0x00)
[39863ms] DBG -- ATAPI command: ATAPI_CMD_INQUIRY 0x12 0x00 0x00 0x00 0x24 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[39864ms] DBG ---- ATAPI send 1x36 bytes: 0x05 0x80 0x00 0x21 0x1F 0x00 0x00 0x00 0x5A 0x75 0x6C 0x75 0x49 0x44 0x45 0x00 0x43 0x44 0x2D 0x52 0x4F 0x4D 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x32 0x30 ... (total 36)
[39867ms] DBG -- ATAPI success
[39867ms] DBG -- Command complete
[40484ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x08 0x00)
[40486ms] DBG -- ATAPI command: ATAPI_CMD_READ_CAPACITY 0x25 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[40488ms] DBG ---- ATAPI send 1x8 bytes: 0x00 0x05 0x01 0x2B 0x00 0x00 0x08 0x00 
[40489ms] DBG -- ATAPI success
[40489ms] DBG -- Command complete
[40491ms] DBG IDE Command for DEV0: 0xEF IDE_CMD_SET_FEATURES (device 0x00, dev_ctrl 0x00, feature 0x02, sector_count 0x00, lba 0x00 0x00 0x00)
[40492ms] DBG -- Unknown SET_FEATURE: 0x02
[40493ms] DBG -- Command complete
[40493ms] DBG IDE Command for DEV0: 0xEF IDE_CMD_SET_FEATURES (device 0x00, dev_ctrl 0x00, feature 0xAA, sector_count 0x00, lba 0x00 0x00 0x00)
[40495ms] DBG -- Unknown SET_FEATURE: 0xAA
[40495ms] DBG -- Command complete
[40495ms] DBG IDE Command for DEV0: 0xEF IDE_CMD_SET_FEATURES (device 0x00, dev_ctrl 0x00, feature 0x03, sector_count 0x0B, lba 0x00 0x00 0x00)
[40497ms] DBG -- Set PIO transfer mode 3
[40497ms] DBG -- Command complete
[40714ms] DBG IDE Command for DEV0: 0xA0 IDE_CMD_PACKET (device 0x00, dev_ctrl 0x00, feature 0x00, sector_count 0x01, lba 0x00 0x05 0x00)
[40715ms] DBG -- ATAPI command: ATAPI_CMD_INQUIRY 0x12 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
[40716ms] DBG ---- ATAPI send 1x5 bytes: 0x05 0x80 0x00 0x21 0x1F 
assertion "(blocklen & 1) == 0" failed: file "lib/ZuluIDE_platform_RP2040/rp2040_ide_phy.cpp", line 177, function: void ide_phy_start_write(uint32_t, int)

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0   : 0000009B
R1   : 10041260
R2   : 2000AECC
R3   : 100355CD
R4   : 1003E649
R5   : 000000B1
R6   : 2000AF6C
R7   : 2000093E
R8   : 00000000
R9   : 00000000
R10  : 00000000
R11  : 00000000
R12  : 0000009A
SP   : 2000AED8
LR   : 100388A9
PC   : 100355CC
xPSR : 21000000
PSP  : 2000AEB8
MSP  : 2003FFC0
CPUID: 410CC601
Mode : Thread
Priv : Privileged
Stack: PSP

-- MbedOS Fault Handler --

[40724ms] --------------
[40724ms] CRASH!
[40725ms] Platform: ZuluIDE RP2040
[40725ms] FW Version: 2023.06.21-dev Jun 21 2023 17:33:33
[40725ms] error_status: 0x80FF013D
[40726ms] error_address: 0x100355CC
[40726ms] error_value: 0x2001D758
[40727ms] STACK 0x2000AED8:    0x10041253 0x1003E621 0x1003E621 0x2001CC98
[40727ms] STACK 0x2000AEE8:    0xFFFFFFFF 0x10029E0D 0x00000005 0xFFFFFFFF
[40728ms] STACK 0x2000AEF8:    0x00000100 0x200008B0 0x00000005 0x10021A9D
[40729ms] STACK 0x2000AF08:    0x00000004 0x20000940 0x200008B0 0x0000A080
[40730ms] STACK 0x2000AF18:    0x00020000 0x20000005 0x2001D6E4 0x00000005
[40730ms] STACK 0x2000AF28:    0x00000001 0x200008B0 0x2000AF6C 0x100220C7
[40731ms] STACK 0x2000AF38:    0x00000000 0x00000001 0x2000AF6C 0x00000005
[40732ms] STACK 0x2000AF48:    0x00000000 0x200008B0 0x2000AF6C 0x00000005
aperezbios commented 1 year ago

Here's a full debug log and zuluerr log, from a subsequent attempt at booting. zululog.txt zuluerr.txt