[OpenBIOS] [Report] Mac OS X Developer Preview

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu Aug 4 22:22:10 CEST 2016


On 04/08/16 20:22, Mark Cave-Ayland wrote:

> Thanks for comprehensive testing :)
> 
> Let's start with the DP 3, 4 and PB being unable to identify the root
> device. The first step here is to get the macio/dbdma logs from QEMU -
> please can you enable DEBUG_MACIO in hw/ide/macio.c and DEBUG_DBDMA in
> hw/misc/macio/mac_dbdma.c and post the logs for either DP 4 or PB
> somewhere where I can grab them?

Thanks for the logs - I think I can see what is going wrong with the
public beta, it's failing trying to read the TOC here:

------------ IDE transfer
buffer_size: 14   buffer_index: 0
lba: ffffffff    size: 14
-------------------------
DBDMA[1a]: writel 0x0000000000000d00 <= 0xd8009000
DBDMA[1a]: channel 0x1a reg 0x0
DBDMA[1a]:     status 0x00009400
DBDMA: -> DBDMA_run_bh
DBDMA[1a]: channel_run
dbdma_cmd 0x55aed8ac1430
    req_count 0x0800
    command 0x2000
    phy_addr 0x010ca000
    cmd_dep 0x00000000
    res_count 0x0000
    xfer_status 0x0000
DBDMA[1a]: start_input
DBDMA[1a]: addr 0x10ca000 key 0x0

pmac_ide_atapi_transfer_cb
DBDMA[1a]: dbdma_end
DBDMA[1a]: conditional_wait
DBDMA[1a]: dbdma_cmdptr_save 0x01072000
DBDMA[1a]: xfer_status 0x00008400 res_count 0x0800
DBDMA[1a]: conditional_interrupt
DBDMA[1a]: conditional_branch
DBDMA[1a]: dbdma_cmdptr_load 0x01072010
DBDMA[1a]: channel_run
dbdma_cmd 0x55aed8ac1430
    req_count 0x0000
    command 0x7000
    phy_addr 0x00000000
    cmd_dep 0x00000000
    res_count 0x0000
    xfer_status 0x0000
DBDMA: <- DBDMA_run_bh
DBDMA[1a]: writel 0x0000000000000d00 <= 0xa0002000
DBDMA[1a]: channel 0x1a reg 0x0
DBDMA[1a]:     status 0x00000000
DBDMA[1a]: readl 0x0000000000000d04 => 0x00000000
DBDMA[1a]: channel 0x1a reg 0x1
DBDMA[1a]: writel 0x0000000000000d00 <= 0xfc000000
DBDMA[1a]: channel 0x1a reg 0x0
DBDMA[1a]:     status 0x00000000
DBDMA[1a]: readl 0x0000000000000d04 => 0x00000000
DBDMA[1a]: channel 0x1a reg 0x1
DBDMA[1a]: writel 0x0000000000000d08 <= 0x00000000
DBDMA[1a]: channel 0x1a reg 0x2
DBDMA[1a]: writel 0x0000000000000d0c <= 0x01072000
DBDMA[1a]: channel 0x1a reg 0x3
DBDMA[1a]: dbdma_cmdptr_load 0x01072000

This corresponds to this code in QEMU's hw/ide/macio.c:

    if (s->lba == -1) {
        /* Non-block ATAPI transfer - just copy to RAM */
        s->io_buffer_size = MIN(s->io_buffer_size, io->len);
        dma_memory_write(&address_space_memory, io->addr, s->io_buffer,
                         s->io_buffer_size);
        ide_atapi_cmd_ok(s);
        m->dma_active = false;
        goto done;
    }

Here the QEMU block code should have already placed the generated TOC
into s->io_buffer and DMA the first 14 bytes into RAM but for some
reason that's not happening so the code is looping looking for a
signature that isn't present.

Zoltan: this is very similar to the related issue you had with your
MorphOS tests which this code should have resolved, unless I managed to
get something wrong in my last rewrite of the macio code?


ATB,

Mark.




More information about the OpenBIOS mailing list