[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] macio ide question/bug report
From: |
BALATON Zoltan |
Subject: |
[Qemu-ppc] macio ide question/bug report |
Date: |
Sun, 4 May 2014 02:05:22 +0200 (CEST) |
User-agent: |
Alpine 2.02 (LMD 1266 2009-07-14) |
Hello,
I think I've found a bug in the macio ide emulation that causes MorphOS to
fail when trying to mount its boot cd. But I'd need some help on how to
fix it because I could not completely understand the workings of dbdma and
how is it talking to the atapi emulation. Here are some debug logs from
QEMU to try to demonstrate the problem:
DBDMA: writel 0x0000000000000d0c <= 0x00e5a760
DBDMA: channel 0x1a reg 0x3
DBDMA: dbdma_cmdptr_load 0x00e5a760
ATAPI limit=0x8000 packet: 43 00 00 00 00 00 00 03 24 00 00 00
DBDMA: DBDMA_run_bh
DBDMA: writel 0x0000000000000d00 <= 0x80008000
DBDMA: channel 0x1a reg 0x0
DBDMA: status 0x00008400
DBDMA: readl 0x0000000000000d00 => 0x80008000
DBDMA: channel 0x1a reg 0x0
DBDMA: DBDMA_run_bh
DBDMA: channel_run
dbdma_cmd 0x7f7919f19c70
req_count 0x0324
command 0x3000
phy_addr 0x00e7f6a4
cmd_dep 0x00000000
res_count 0x0000
xfer_status 0x0000
DBDMA: start_input
DBDMA: addr 0xe7f6a4 key 0x0
pmac_ide_transfer(ATAPI) lba=ffffffff, buffer_index=0, len=324
io_buffer_size = 0
remainder: 0 io->len: 804 size: 20
precopying unaligned 292 bytes to 0xe7f8a4
io->len = 0x200
set remainder to: 0
sector_num=-4 size=20, cmd_cmd=0
atapi_cmd_error: sense=0x5 asc=0x21
done DMA
DBDMA: dbdma_end
DBDMA: conditional_wait
DBDMA: dbdma_cmdptr_save 0x00e5a760
DBDMA: xfer_status 0x00008400 res_count 0x0000
What is happening is that a Read TOC command is sent and I think it tries
to get the reply with a read command with lba set to -1 which according to
comments in atapi.c should return results without reading a sector but
this is erroneously converted to sector -4 in
macio.c:pmac_ide_atapi_transfer_cb and causes it to fail. My question to
those who undestand this better if this analysis is correct and how could
it be fixed?
Regards,
BALATON Zoltan
- [Qemu-ppc] macio ide question/bug report,
BALATON Zoltan <=
- Re: [Qemu-ppc] macio ide question/bug report, Mark Cave-Ayland, 2014/05/04
- Re: [Qemu-ppc] macio ide question/bug report, BALATON Zoltan, 2014/05/07
- Re: [Qemu-ppc] macio ide question/bug report, BALATON Zoltan, 2014/05/07
- Re: [Qemu-ppc] macio ide question/bug report, Mark Cave-Ayland, 2014/05/07
- Re: [Qemu-ppc] macio ide question/bug report, BALATON Zoltan, 2014/05/10
- Re: [Qemu-ppc] macio ide question/bug report, Mark Cave-Ayland, 2014/05/12
- Re: [Qemu-ppc] macio ide question/bug report, BALATON Zoltan, 2014/05/12