On Thu, Mar 07, 2013 at 04:59:43PM +0800, WANG Siyuan wrote:
Hi, I am trying to boot a hard disk image using coreboot and seabios on SimNow Simulator. The system stops at seabios stage.
PORT_CMD_START fails in function ahci_port_setup (seabios/src/ahci.c), Then I traced into function ahci_command (seabios/src/ahci.c), I found the value of register ORT_IRQ_STAT is always 0: intbits = ahci_port_readl(ctrl, pnr, PORT_IRQ_STAT); intbits returns 0 all the time, so system stops here until time out.
Any comments would be appreciated.
There is a 32 second timeout in that code (which may be a longer wall time if run under a simulator) - are you sure it didn't eventually time out. As to why it is taking so long - could be an error in the simulator or in the seabios driver. You could try disabling the ahci code in seabios via kconfig.
-Kevin
Thank you, 1) It is time out, the log is:
AHCI/0: probing AHCI/0: link up AHCI/0: send cmd ... WARNING - Timeout at ahci_command:158! AHCI/0: send cmd ... WARNING - Timeout at ahci_command:158!
in line 158(src/ahci.c) is warn_timeout();
2) If ahci is disabled, the simulator can not find hard disk image. The hard disk image is added as a sata device.
3) The attachment is the log of seabios stage.
Thank you again!
On Fri, Mar 8, 2013 at 7:34 AM, Kevin O'Connor kevin@koconnor.net wrote:
On Thu, Mar 07, 2013 at 04:59:43PM +0800, WANG Siyuan wrote:
Hi, I am trying to boot a hard disk image using coreboot and seabios on SimNow Simulator. The system stops at seabios stage.
PORT_CMD_START fails in function ahci_port_setup (seabios/src/ahci.c), Then I traced into function ahci_command (seabios/src/ahci.c), I found the value of register ORT_IRQ_STAT is always 0: intbits = ahci_port_readl(ctrl, pnr, PORT_IRQ_STAT); intbits returns 0 all the time, so system stops here until time out.
Any comments would be appreciated.
There is a 32 second timeout in that code (which may be a longer wall time if run under a simulator) - are you sure it didn't eventually time out. As to why it is taking so long - could be an error in the simulator or in the seabios driver. You could try disabling the ahci code in seabios via kconfig.
-Kevin
-- Yours sincerely, WANG Siyuan
According to this piece of code in src/ahci.c, seabios fails to set DMA or PIO on ahci. PORT_IRQ_STAT is 0.
end = calc_future_tsc(AHCI_REQUEST_TIMEOUT); do { for (;;) { intbits = ahci_port_readl(ctrl, pnr, PORT_IRQ_STAT); //dprintf(1, "intbits == 0x%x\n", intbits); if (intbits) { ahci_port_writel(ctrl, pnr, PORT_IRQ_STAT, intbits); if (intbits & 0x02) { status = GET_LOWFLAT(fis->psfis[2]); error = GET_LOWFLAT(fis->psfis[3]); break; } if (intbits & 0x01) { status = GET_LOWFLAT(fis->rfis[2]); error = GET_LOWFLAT(fis->rfis[3]); break; } } if (check_tsc(end)) { warn_timeout(); return -1; } yield(); } dprintf(8, "AHCI/%d: ... intbits 0x%x, status 0x%x ...\n", pnr, intbits, status); } while (status & ATA_CB_STAT_BSY);
On Fri, Mar 8, 2013 at 7:34 AM, Kevin O'Connor kevin@koconnor.net wrote:
On Thu, Mar 07, 2013 at 04:59:43PM +0800, WANG Siyuan wrote:
Hi, I am trying to boot a hard disk image using coreboot and seabios on SimNow Simulator. The system stops at seabios stage.
PORT_CMD_START fails in function ahci_port_setup (seabios/src/ahci.c), Then I traced into function ahci_command (seabios/src/ahci.c), I found the value of register ORT_IRQ_STAT is always 0: intbits = ahci_port_readl(ctrl, pnr, PORT_IRQ_STAT); intbits returns 0 all the time, so system stops here until time out.
Any comments would be appreciated.
There is a 32 second timeout in that code (which may be a longer wall time if run under a simulator) - are you sure it didn't eventually time out. As to why it is taking so long - could be an error in the simulator or in the seabios driver. You could try disabling the ahci code in seabios via kconfig.
-Kevin
-- Yours sincerely, WANG Siyuan