From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wy4WZ-0004XK-0o for qemu-devel@nongnu.org; Fri, 20 Jun 2014 15:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wy4WQ-000152-If for qemu-devel@nongnu.org; Fri, 20 Jun 2014 15:30:58 -0400 Message-ID: <53A48B28.8070808@ilande.co.uk> Date: Fri, 20 Jun 2014 20:27:36 +0100 From: Mark Cave-Ayland MIME-Version: 1.0 References: <1401885899-16524-1-git-send-email-agraf@suse.de> <1401885899-16524-76-git-send-email-agraf@suse.de> <53A44548.7020605@ilande.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 075/118] macio: handle non-block ATAPI DMA transfers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: BALATON Zoltan Cc: "qemu-ppc@nongnu.org" , Alexander Graf , qemu-devel On 20/06/14 20:17, BALATON Zoltan wrote: > On Fri, 20 Jun 2014, Mark Cave-Ayland wrote: >> Zoltan, please can you test the attached patch to see if this still >> allows MorphOS to boot? > > Unfortunately it seems MorphOS cannot boot with this patch. It hangs > while trying to read the TOC from the CD. Debug output with DEBUG_MACIO > and DEBUG_DBDMA enabled shows: And also with ATAPI debugging enabled? I suspect the problem is with the interaction between the DMA/ATAPI systems again. > DBDMA: writel 0x0000000000000d0c <= 0x00e51970 > DBDMA: channel 0x1a reg 0x3 > DBDMA: dbdma_cmdptr_load 0x00e51970 > > 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 0x7f0997120f28 > req_count 0x0324 > command 0x3000 > phy_addr 0x00e7b0bc > cmd_dep 0x00000000 > res_count 0x0000 > xfer_status 0x0000 > DBDMA: start_input > DBDMA: addr 0xe7b0bc key 0x0 > > non-block ATAPI DMA transfer size: 804 > io_buffer_size = 0 > remainder: 0 io->len: 0 size: 20 > end of DMA > done DMA > DBDMA: dbdma_end > DBDMA: conditional_wait > DBDMA: dbdma_cmdptr_save 0x00e51970 > DBDMA: xfer_status 0x00008400 res_count 0x0000 > DBDMA: conditional_interrupt > DBDMA: conditional_branch > DBDMA: dbdma_cmdptr_load 0x00e51980 > DBDMA: channel_run > dbdma_cmd 0x7f0997120f28 > req_count 0x0000 > command 0x7000 > phy_addr 0x00000000 > cmd_dep 0x00000000 > res_count 0x0000 > xfer_status 0x0000 > > and no further ide activity from here whereas without the patch when it > boots I see these logs: > > DBDMA: writel 0x0000000000000d0c <= 0x00e50090 > DBDMA: channel 0x1a reg 0x3 > DBDMA: dbdma_cmdptr_load 0x00e50090 > > 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 0x7f56695a7f28 > req_count 0x0324 > command 0x3000 > phy_addr 0x00e4f8fc > cmd_dep 0x00000000 > res_count 0x0000 > xfer_status 0x0000 > DBDMA: start_input > DBDMA: addr 0xe4f8fc key 0x0 > > non-block ATAPI DMA transfer size: 20 > end of non-block ATAPI DMA transfer > DBDMA: dbdma_end > DBDMA: conditional_wait > DBDMA: dbdma_cmdptr_save 0x00e50090 > DBDMA: xfer_status 0x00008400 res_count 0x0324 > DBDMA: conditional_interrupt > DBDMA: conditional_branch > DBDMA: dbdma_cmdptr_load 0x00e500a0 > DBDMA: channel_run > dbdma_cmd 0x7f56695a7f28 > req_count 0x0000 > command 0x7000 > phy_addr 0x00000000 > cmd_dep 0x00000000 > res_count 0x0000 > xfer_status 0x0000 > DBDMA: writel 0x0000000000000d00 <= 0x98000000 > DBDMA: channel 0x1a reg 0x0 > DBDMA: status 0x00000000 > DBDMA: writel 0x0000000000000d0c <= 0x00e50090 > DBDMA: channel 0x1a reg 0x3 > DBDMA: dbdma_cmdptr_load 0x00e50090 > > 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 0x7f56695a7f28 > req_count 0x0800 > command 0x3000 > phy_addr 0x00e8d7c0 > cmd_dep 0x00000000 > res_count 0x0000 > xfer_status 0x0000 > DBDMA: start_input > DBDMA: addr 0xe8d7c0 key 0x0 > > io_buffer_size = 0 > remainder: 0 io->len: 2048 size: 2048 > io->len = 0x800 > set remainder to: 0 > sector_num=64 size=2048, cmd_cmd=0 > io_buffer_size = 0x800 > remainder: 0 io->len: 0 size: 0 > end of transfer > end of DMA > done DMA > DBDMA: dbdma_end > DBDMA: conditional_wait > DBDMA: dbdma_cmdptr_save 0x00e50090 > DBDMA: xfer_status 0x00008400 res_count 0x0000 > DBDMA: conditional_interrupt > DBDMA: conditional_branch > DBDMA: dbdma_cmdptr_load 0x00e500a0 > DBDMA: channel_run > dbdma_cmd 0x7f56695a7f28 > req_count 0x0000 > command 0x7000 > phy_addr 0x00000000 > cmd_dep 0x00000000 > res_count 0x0000 > xfer_status 0x0000 > > and a lot of similar stuff after this. If this is not enough to > understand the problem and you need more details please tell me what to > look for. I'm afraid as you're the only person that can boot MorphOS this far then we need you to diagnose and suggest a suitable alternative by comparing the before and after output. Since MacOS is already a supported client then if no solution can be found then it is likely that this patch will be reverted :( In order for a patch to be accepted then it will need to both pass your MorphOS tests and also boot darwinppc-602.iso which should cover the two cases of either the ATAPI or the DMA transfer occurring first. HTH, Mark.