Date: Thu, 6 Jan 2011 01:25:02 +0800 (SGT) From: Darmawan Salihun <darmawan_salihun@yahoo.com> To: Alexander Motin <mav@FreeBSD.org> Cc: freebsd-hackers@freebsd.org Subject: Re: PCI IDE Controller Base Address Register setting Message-ID: <736116.58130.qm@web76816.mail.sg1.yahoo.com> In-Reply-To: <4D2486B9.2090705@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--- On Wed, 1/5/11, Alexander Motin <mav@FreeBSD.org> wrote: > From: Alexander Motin <mav@FreeBSD.org> > Subject: Re: PCI IDE Controller Base Address Register setting > To: "Darmawan Salihun" <darmawan_salihun@yahoo.com> > Cc: "John Baldwin" <jhb@freebsd.org>, freebsd-hackers@freebsd.org > Date: Wednesday, January 5, 2011, 9:56 AM > Darmawan Salihun wrote: > > I get the following log message upon booting with > "boot -Dv": > > ============================== > > ata0: <ATA channel 0> on atapci0 > > ata0: reset tp1 mask=03 ostat0=50 ostat1=50 > > ata0: stat0=0x80 err=0x00 lsb=0x00 msb=0x00 > > ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00 > > ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00 > > ata0: reset tp2 stat0=50 stat1=50 devices=0x3 > > ... > > ata0: Identifying devices: 00000003 > > ata0: New devices: 00000003 > > ... > > ata0-slave: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 > wire > > ata0-master: pio=PIO1 wdma=UNSUPPORTED > udma=UNSUPPORTED cable=40 wire > > ... > > ad0: FAILURE setting PIO1 on CS5536 chip > > ad0: 488MB <STI Flash 6.2.0 Rev 6.2.0> at > ata0-master BIOSPIO > > ... > > GEOM: newdisk ad0 > > ad0: Adaptec check1 failed > > ad0: LSI(v3) check1 failed > > ad0: FAILURE - READ status=51<READY,DSC,ERROR> > error=c4<ICRC,UNCORRECTABLE,ABORTED> LBA=0 > > ... > > ad1: setting PIO4 on CS5536 chip > > ad1: setting UDMA100 on CS5536 chip > > ad1: 38150MB <Seagate ST340014A 3.06> at > ata0-slave UDMA100 > > ... > > GEOM: newdisk ad1 > > ... > > ad1: FAILURE - READ_DMA > status=51<READY,DSC,ERROR> > error=84<ICRC,ABORTED> LBA=78132575 > > ad1: FAILURE - READ_DMA > status=51<READY,DSC,ERROR> > error=84<ICRC,ABORTED> LBA=78132591 > > ... > > ====================== > > I have several questions: > > 1. How FreeBSD sets the PIO mode on the target IDE > controller? > > what could've caused it to fail like the message > above? > > Looking to your messages I would suggest you are running > something like > FreeBSD 8.0. At that time controller-specific method first > set mode on > device and then programmed the chip. Most likely this error > returned by > device. Some very old devices not supporting more then PIO3 > may not > support mode setting command. > > Mode setting code was significantly rewritten between 8.0 > and 8.1. I > would recommend you to take newer version of FreeBSD for > experiments. > The device is a CF-card. Do I need to add some sort of CFA-specific initialization code to the BIOS? I'm using FreeBSD 8.0 as the test bed for the log message above. I have FreeBSD 8.1 DVD to do further tests. Will report later. > > 2. It seems to me that setting the UDMA100 in the > > AMD CS5536 IDE controller went just fine (in the log > above). > > But, FreeBSD fails when it tries to read something > from the drive. > > Does it mean the UDMA100 "mode" failed to be set > correctly > > in the IDE controller? > > It can be. For UDMA transfer rate is driven by transmitting > side (for > reading - by device), but there is always a chance to do > something > wrong. :) I don't have CS5536 board, so can't be completely > sure how > correct is the code. Does it require chipset-specific support code on the OS (say a device driver) or setting via PCI Bus Master registers is enough? > > > 3. As I'm currently trying to fix the bug in the BIOS > for the particular > > board used to boot FreeBSD, what would you suggest to > fix it? > > Try latest FreeBSD -- 8.2 is now in RC state. > Try to disconnect devices one by one. > Try to limit initial mode via loader tunables (note that > some of them > were added not so long ago and may be missing on 8.0). > A question about the loader tunable: is it enough to pass it through the "boot" command, similar to the "-Dv" in "boot -Dv"? Thanks, Darmawan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?736116.58130.qm>