Re: [SeaBIOS] [coreboot] i945: AHCI timeout with Crucial m4 SSD 2.5 in SeaBIOS on cold boot
On Fri, Sep 19, 2014 at 09:36:30AM +0200, Paul Menzel wrote: > 01.542: init ahci > 01.541: AHCI controller at 1f.2, iobase e400, irq 0 > 01.541: AHCI: cap 0xdf12ff03, ports_impl 0x1 > 01.541: /7f673000\ Start thread > 01.541: |7f673000| AHCI/0: probing > 01.542: |7f673000| AHCI/0: link up > […] > 32.700: |7f673000| WARNING - Timeout at ahci_port_setup:466! > 32.700: |7f673000| AHCI/0: device not ready (tf 0x80 cmd=6016 > stat=113 ctl=0 err=4050002) The err field indicates the controller thinks the device disconnected and then reconnected. Possibly the firmware on the ssd was resetting itself (or something similar). Can you see if a more recent firmware version is available for your SSD? Otherwise, it looks like this could be worked around in SeaBIOS, but it wouldn't be particularly nice. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [coreboot] i945: AHCI timeout with Crucial m4 SSD 2.5 in SeaBIOS on cold boot
Paul Menzel wrote: > I was told coreboot and SeaBIOS are too fast for the SSD and it > needs at least 500 ms for its initialization. > > Though looking at the code in `src/hw/ahci.c`, it should have 32 > seconds to initialize. The SSD can probably not deal with any SATA activity until it has initialized correctly. That's probably an SSD firmware bug. //Peter pgpj7Wz54FRnw.pgp Description: PGP signature ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [coreboot] i945: AHCI timeout with Crucial m4 SSD 2.5 in SeaBIOS on cold boot
Am Dienstag, den 16.09.2014, 22:21 -0400 schrieb Kevin O'Connor: > On Tue, Sep 16, 2014 at 09:45:17PM -0400, Kevin O'Connor wrote: > > On Tue, Sep 16, 2014 at 11:34:51PM +0200, Paul Menzel wrote: > > > Am Sonntag, den 14.09.2014, 10:10 +0200 schrieb Paul Menzel: > > > > testing the SSD Crucial m4 SSD 2.5 256 GB SATA 6 Gb/s on the Lenovo > > > > X60t, the payload SeaBIOS 1.7.5-40-g5109366 does not detect the drive. > > > > > > > > […] > > > > 32.705: |7f673000| WARNING - Timeout at ahci_port_setup:466! > > > > 32.705: |7f673000| AHCI/0: device not ready (tf 0x80) > > > > 33.205: |7f673000| WARNING - Timeout at ahci_port_reset:336! > > > > Out of curiosity, what does the patch below return in the failure and > > success case? > > Could you use the patch below instead. Kevin, thank you for the reply. I attached your patch, rebuild SeaBIOS (the log level is set to 5) and tested it on the Lenovo X60t. Showing that it is a timing issue, the first try, the SSD was detected correctly. […] 01.214: init ahci 01.214: AHCI controller at 1f.2, iobase e400, irq 0 01.214: AHCI: cap 0xdf12ff03, ports_impl 0x1 01.214: /7f673000\ Start thread 01.214: |7f673000| AHCI/0: probing 01.215: |7f673000| AHCI/0: link up 01.215: |7f673000| AHCI/0: device ready (tf 0x150 cmd=6016 stat=113 ctl=0 err=0) 01.215: |7f673000| AHCI/0: ... finished, status 0x51, ERROR 0x4 01.215: |7f673000| Searching bootorder for: /pci@i0cf8/*@1f,2/drive@0/disk@0 01.215: |7f673000| AHCI/0: registering: "AHCI/0: M4-CT256M4SSD2 ATA-9 Hard-Disk (238 GiBytes)" 01.216: |7f673000| Registering bootable: AHCI/0: M4-CT256M4SSD2 ATA-9 Hard-Disk (238 GiBytes) (type:2 prio:103 data:f1610) 01.215: \7f673000/ End thread […] So powering it off and on again, it was not detected. […] 01.542: init ahci 01.541: AHCI controller at 1f.2, iobase e400, irq 0 01.541: AHCI: cap 0xdf12ff03, ports_impl 0x1 01.541: /7f673000\ Start thread 01.541: |7f673000| AHCI/0: probing 01.542: |7f673000| AHCI/0: link up […] 32.700: |7f673000| WARNING - Timeout at ahci_port_setup:466! 32.700: |7f673000| AHCI/0: device not ready (tf 0x80 cmd=6016 stat=113 ctl=0 err=4050002) 33.201: |7f673000| WARNING - Timeout at ahci_port_reset:336! 33.201: \7f673000/ End thread […] Doing a warm reset with Ctrl + Alt + Del the SSD was detected again. […] 50.649: init ahci 50.649: AHCI controller at 1f.2, iobase e400, irq 0 50.649: AHCI: cap 0xdf12ff03, ports_impl 0x1 50.649: /7f673000\ Start thread 50.649: |7f673000| AHCI/0: probing 50.650: |7f673000| AHCI/0: link up 50.649: |7f673000| AHCI/0: device ready (tf 0x150 cmd=6016 stat=113 ctl=0 err=0) 50.650: |7f673000| AHCI/0: ... finished, status 0x51, ERROR 0x4 50.650: |7f673000| Searching bootorder for: /pci@i0cf8/*@1f,2/drive@0/disk@0 50.650: |7f673000| AHCI/0: registering: "AHCI/0: M4-CT256M4SSD2 ATA-9 Hard-Disk (238 GiBytes)" 50.650: |7f673000| Registering bootable: AHCI/0: M4-CT256M4SSD2 ATA-9 Hard-Disk (238 GiBytes) (type:2 prio:103 data:f1610) 50.650: \7f673000/ End thread […] Please find all the logs pasted at the end of the message. Thanks, Paul $ ./scripts/readserial.py /dev/ttyUSB0 115200 === Fri Sep 19 08:59:19 2014 (adjust=86.8us) 00.000: <00> 01.047: Changing serial settings was 0/0 now 3/0 01.048: SeaBIOS (version rel-1.7.5-41-g4c32a80-20140919_084257-lenovo-x60t) 01.048: Attempting to find coreboot table 01.048: Found coreboot table forwarder. 01.048: Now attempting to find coreboot memory map 01.048: SeaBIOS (version rel-1.7.5-41-g4c32a80-20140919_084257-lenovo-x60t) 01.048: Found coreboot cbmem console @ 7f7de000 01.048: Found mainboard Lenovo ThinkPad X60 / X60s 01.048: malloc preinit 01.048: Relocating init from 0x000e6af0 to 0x7f679140 (size 44544) 01.048: malloc init 01.048: Found CBFS header at 0xfa50 01.048: Add romfile: cmos_layout.bin (size=1828) 01.048: Add romfile: pci8086,27a2.rom (size=65536) 01.048: Add romfile: cmos.default (size=256) 01.048: Add romfile: cpu_microcode_blob.bin (size=94208) 01.048: Add romfile: etc/ps2-keyboard-spinup (size=8) 01.048: Add romfile: config (size=4221) 01.049: Add romfile: (size=29976) 01.049: Add romfile: fallback/romstage (size=50939) 01.048: Add romfile: fallback/ramstage (size=68308) 01.048: Add romfile: fallback/payload (size=55704) 01.048: Add romfile: (size=1723864) 01.049: init ivt 01.049: init bda 01.049: init bios32 01.048: init PMM 01.048: init PNPBIOS table 01.049: init keyboard 01.049: init mouse 01.049: init pic 01.049: math cp init 01.051: CPU Mhz=1663 01.050: init timer 01.050: PCI probe 01.050: PCI device 00:00.0 (vd=8086:27a0 c=0600) 01.051: PCI device 00:02.0 (vd=8086:27a2 c=0300) 01.05
Re: [SeaBIOS] [coreboot] i945: AHCI timeout with Crucial m4 SSD 2.5 in SeaBIOS on cold boot
On Tue, Sep 16, 2014 at 09:45:17PM -0400, Kevin O'Connor wrote: > On Tue, Sep 16, 2014 at 11:34:51PM +0200, Paul Menzel wrote: > > Am Sonntag, den 14.09.2014, 10:10 +0200 schrieb Paul Menzel: > > > testing the SSD Crucial m4 SSD 2.5 256 GB SATA 6 Gb/s on the Lenovo > > > X60t, the payload SeaBIOS 1.7.5-40-g5109366 does not detect the drive. > > > > > > […] > > > 32.705: |7f673000| WARNING - Timeout at ahci_port_setup:466! > > > 32.705: |7f673000| AHCI/0: device not ready (tf 0x80) > > > 33.205: |7f673000| WARNING - Timeout at ahci_port_reset:336! > > Out of curiosity, what does the patch below return in the failure and > success case? Could you use the patch below instead. -Kevin --- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -464,12 +464,14 @@ static int ahci_port_setup(struct ahci_port_s *port) break; if (timer_check(end)) { warn_timeout(); -dprintf(1, "AHCI/%d: device not ready (tf 0x%x)\n", port->pnr, tf); +dprintf(1, "AHCI/%d: device not ready (tf 0x%x cmd=%x stat=%x ctl=%x err=%x)\n", port->pnr, tf, ahci_port_readl(ctrl, pnr, PORT_CMD), ahci_port_readl(ctrl, pnr, PORT_SCR_STAT), ahci_port_readl(ctrl, pnr, PORT_SCR_CTL), ahci_port_readl(ctrl, pnr, PORT_SCR_ERR)); return -1; } yield(); } +dprintf(1, "AHCI/%d: device ready (tf 0x%x cmd=%x stat=%x ctl=%x err=%x)\n", port->pnr, tf, ahci_port_readl(ctrl, pnr, PORT_CMD), ahci_port_readl(ctrl, pnr, PORT_SCR_STAT), ahci_port_readl(ctrl, pnr, PORT_SCR_CTL), ahci_port_readl(ctrl, pnr, PORT_SCR_ERR)); + /* start device */ cmd |= PORT_CMD_START; ahci_port_writel(ctrl, pnr, PORT_CMD, cmd); ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [coreboot] i945: AHCI timeout with Crucial m4 SSD 2.5 in SeaBIOS on cold boot
On Tue, Sep 16, 2014 at 11:34:51PM +0200, Paul Menzel wrote: > Am Sonntag, den 14.09.2014, 10:10 +0200 schrieb Paul Menzel: > > testing the SSD Crucial m4 SSD 2.5 256 GB SATA 6 Gb/s on the Lenovo > > X60t, the payload SeaBIOS 1.7.5-40-g5109366 does not detect the drive. > > > > […] > > 32.705: |7f673000| WARNING - Timeout at ahci_port_setup:466! > > 32.705: |7f673000| AHCI/0: device not ready (tf 0x80) > > 33.205: |7f673000| WARNING - Timeout at ahci_port_reset:336! Out of curiosity, what does the patch below return in the failure and success case? -Kevin --- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -464,12 +464,14 @@ static int ahci_port_setup(struct ahci_port_s *port) break; if (timer_check(end)) { warn_timeout(); -dprintf(1, "AHCI/%d: device not ready (tf 0x%x)\n", port->pnr, tf); +dprintf(1, "AHCI/%d: device not ready (tf 0x%x cmd=%x stat=%x err=%x)\n", port->pnr, tf, ahci_port_readl(ctrl, pnr, PORT_CMD), ahci_port_readl(ctrl, pnr, PORT_SCR_STAT), ahci_port_readl(ctrl, pnr, PORT_SCR_ERR)); return -1; } yield(); } +dprintf(1, "AHCI/%d: device ready (tf 0x%x cmd=%x stat=%x err=%x)\n", port->pnr, tf, ahci_port_readl(ctrl, pnr, PORT_CMD), ahci_port_readl(ctrl, pnr, PORT_SCR_STAT), ahci_port_readl(ctrl, pnr, PORT_SCR_ERR)); + /* start device */ cmd |= PORT_CMD_START; ahci_port_writel(ctrl, pnr, PORT_CMD, cmd); ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [coreboot] i945: AHCI timeout with Crucial m4 SSD 2.5 in SeaBIOS on cold boot
Dear SeaBIOS folks, as per request by Kevin I am moving the discussion of thread on the coreboot list [1] to the SeaBIOS list. Am Sonntag, den 14.09.2014, 10:10 +0200 schrieb Paul Menzel: > testing the SSD Crucial m4 SSD 2.5 256 GB SATA 6 Gb/s on the Lenovo > X60t, the payload SeaBIOS 1.7.5-40-g5109366 does not detect the drive. > > […] > 32.705: |7f673000| WARNING - Timeout at ahci_port_setup:466! > 32.705: |7f673000| AHCI/0: device not ready (tf 0x80) > 33.205: |7f673000| WARNING - Timeout at ahci_port_reset:336! > […] > > Hitting Ctrl + Alt + Delete, the drive is detected. > > It is also reproducible on the Lenovo T60 with coreboot from four years > ago and SeaBIOS 1.7.0-91-g7a39e72. > > The drive is detected correctly on the ASRock E350M1 with coreboot and > SeaBIOS 1.7.5. > > Please find the whole serial log from SeaBIOS below. > > Does that look like a coreboot or SeaBIOS problem? From the replies on the coreboot mailing list, I was told coreboot and SeaBIOS are too fast for the SSD and it needs at least 500 ms for its initialization. Though looking at the code in `src/hw/ahci.c`, it should have 32 seconds to initialize. […] #define AHCI_REQUEST_TIMEOUT 32000 // 32 seconds max for IDE ops […] /* clear error status */ err = ahci_port_readl(ctrl, pnr, PORT_SCR_ERR); if (err) ahci_port_writel(ctrl, pnr, PORT_SCR_ERR, err); /* wait for device becoming ready */ end = timer_calc(AHCI_REQUEST_TIMEOUT); for (;;) { tf = ahci_port_readl(ctrl, pnr, PORT_TFDATA); if (!(tf & (ATA_CB_STAT_BSY | ATA_CB_STAT_DRQ))) break; if (timer_check(end)) { warn_timeout(); dprintf(1, "AHCI/%d: device not ready (tf 0x%x)\n", port->pnr, tf); return -1; } yield(); } […] So it could still be a chipset problem, because it works on the ASRock E350M1. But Sven Schnelle reported it also happens with his Chromebook. Thanks, Paul [1] http://www.coreboot.org/pipermail/coreboot/2014-September/thread.html#78607 > $ ./scripts/readserial.py /dev/ttyUSB0 115200 > > > === Sun Sep 14 09:54:52 2014 (adjust=86.8us) > 00.000: <00> > 01.376: Changing serial settings was 0/0 now 3/0 > 01.376: SeaBIOS (version rel-1.7.5-40-g5109366-20140715_011246-my-lenovo-x60t) > 01.376: Attempting to find coreboot table > 01.376: Found coreboot table forwarder. > 01.376: Now attempting to find coreboot memory map > 01.376: SeaBIOS (version rel-1.7.5-40-g5109366-20140715_011246-my-lenovo-x60t) > 01.376: Found coreboot cbmem console @ 7f7de000 > 01.376: Found mainboard Lenovo ThinkPad X60 / X60s > 01.376: malloc preinit > 01.376: Relocating init from 0x000e6c20 to 0x7f679220 (size 44320) > 01.376: malloc init > 01.376: Found CBFS header at 0xfa50 > 01.376: Add romfile: cmos_layout.bin (size=1828) > 01.376: Add romfile: pci8086,27a2.rom (size=65536) > 01.376: Add romfile: cmos.default (size=256) > 01.376: Add romfile: cpu_microcode_blob.bin (size=94208) > 01.377: Add romfile: etc/ps2-keyboard-spinup (size=8) > 01.377: Add romfile: config (size=4221) > 01.377: Add romfile: (size=29976) > 01.377: Add romfile: fallback/romstage (size=50939) > 01.377: Add romfile: fallback/ramstage (size=68308) > 01.377: Add romfile: fallback/payload (size=55644) > 01.377: Add romfile: (size=1723928) > 01.377: init ivt > 01.377: init bda > 01.377: init bios32 > 01.377: init PMM > 01.377: init PNPBIOS table > 01.377: init keyboard > 01.377: init mouse > 01.377: init pic > 01.377: math cp init > 01.378: CPU Mhz=1663 > 01.379: init timer > 01.379: PCI probe > 01.379: PCI device 00:00.0 (vd=8086:27a0 c=0600) > 01.379: PCI device 00:02.0 (vd=8086:27a2 c=0300) > 01.379: PCI device 00:02.1 (vd=8086:27a6 c=0380) > 01.379: PCI device 00:1b.0 (vd=8086:27d8 c=0403) > 01.379: PCI device 00:1c.0 (vd=8086:27d0 c=0604) > 01.379: PCI device 00:1c.1 (vd=8086:27d2 c=0604) > 01.379: PCI device 00:1c.2 (vd=8086:27d4 c=0604) > 01.379: PCI device 00:1c.3 (vd=8086:27d6 c=0604) > 01.379: PCI device 00:1d.0 (vd=8086:27c8 c=0c03) > 01.379: PCI device 00:1d.1 (vd=8086:27c9 c=0c03) > 01.379: PCI device 00:1d.2 (vd=8086:27ca c=0c03) > 01.379: PCI device 00:1d.3 (vd=8086:27cb c=0c03) > 01.379: PCI device 00:1d.7 (vd=8086:27cc c=0c03) > 01.379: PCI device 00:1e.0 (vd=8086:2448 c=0604) > 01.379: PCI device 00:1f.0 (vd=8086:27b9 c=0601) > 01.379: PCI device 00:1f.1 (vd=8086:27df c=0101) > 01.379: PCI device 00:1f.2 (vd=8086:27c5 c=0106) > 01.379: PCI device 00:1f.3 (vd=8086:27da c=0c05) > 01.379: PCI device 01:00.0 (vd=8086:109a c=0200) > 01.379: PCI device 02:00.0 (vd=8086:4227 c=0280) > 01.380: PCI device 05:00.0 (vd=1180:0476 c=0607) > 01.379: PCI device 05:00.1 (vd=1180:0552 c=0c00) > 01.380: PCI device 05:00.2 (vd=1180:0