PCI IDE Controller Base Address Register setting
John Baldwin
jhb at freebsd.org
Mon Jan 3 15:28:16 UTC 2011
On Saturday, January 01, 2011 2:58:12 pm Darmawan Salihun wrote:
>
> --- On Thu, 12/30/10, Darmawan Salihun <darmawan_salihun at yahoo.com> wrote:
>
> > From: Darmawan Salihun <darmawan_salihun at yahoo.com>
> > Subject: Re: PCI IDE Controller Base Address Register setting
> > To: "John Baldwin" <jhb at freebsd.org>
> > Cc: freebsd-hackers at freebsd.org
> > Date: Thursday, December 30, 2010, 3:28 PM
> > --- On Tue, 12/28/10, John Baldwin
> > <jhb at freebsd.org>
> > wrote:
> >
> > > From: John Baldwin <jhb at freebsd.org>
> > > Subject: Re: PCI IDE Controller Base Address Register
> > setting
> > > To: "Darmawan Salihun" <darmawan_salihun at yahoo.com>
> > > Cc: freebsd-hackers at freebsd.org
> > > Date: Tuesday, December 28, 2010, 2:22 PM
> > > On Tuesday, December 28, 2010 2:10:59
> > > pm Darmawan Salihun wrote:
> > > > Hi,
> > > >
> > > > --- On Tue, 12/28/10, John Baldwin <jhb at freebsd.org>
> > > wrote:
> > > >
> > > > > From: John Baldwin <jhb at freebsd.org>
> > > > > Subject: Re: PCI IDE Controller Base
> > Address
> > > Register setting
> > > > > To: "Darmawan Salihun" <darmawan_salihun at yahoo.com>
> > > > > Cc: freebsd-hackers at freebsd.org
> > > > > Date: Tuesday, December 28, 2010, 1:52 PM
> > > > > On Tuesday, December 28, 2010 1:38:05
> > > > > pm Darmawan Salihun wrote:
> > > > > > Hi,
> > > > > >
> > > > > > --- On Tue, 12/28/10, John Baldwin
> > <jhb at freebsd.org>
> > > > > wrote:
> > > > > >
> > > > > > > From: John Baldwin <jhb at freebsd.org>
> > > > > > > Subject: Re: PCI IDE Controller
> > Base
> > > Address
> > > > > Register setting
> > > > > > > To: freebsd-hackers at freebsd.org
> > > > > > > Cc: "Darmawan Salihun" <darmawan_salihun at yahoo.com>
> > > > > > > Date: Tuesday, December 28, 2010,
> > 10:20
> > > AM
> > > > > > > On Monday, December 27, 2010
> > 6:07:35
> > > > > > > am Darmawan Salihun wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I'm trying to install FreeBSD
> > 8.0
> > > on AMD
> > > > > Geode LX800
> > > > > > > (CS5536 "southbridge").
> > > > > > > However, it cannot detect the IDE
> > > controller (in
> > > > > the
> > > > > > > CS5536) correctly. It
> > > > > > > says something similar to this:
> > > > > > > > "IDE controller not present"
> > > > > > >
> > > > > > > Hmm, I can't find a message like
> > that
> > > > > anywhere. Can
> > > > > > > you get the exact message
> > > > > > > you are seeing?
> > > > > > >
> > > > > >
> > > > > > It says:
> > > > > >
> > > > > > "No disks found! Please verify that
> > your
> > > disk
> > > > > controller is being properly
> > > > > > probed at boot time."
> > > > >
> > > > > Oh, so this is a message from the
> > > installer. Can you
> > > > > capture a verbose dmesg
> > > > > via a serial console perhaps?
> > > >
> > > > I'm not sure if I can do this because I've tried
> > a
> > > couple of times
> > > > but nothing comes out of the serial console.
> > Perhaps a
> > > wrong baud rate setting?
> > > > I set it to 96bps and 8-N-1 back then. Is that
> > > correct?
> > >
> > > Yes, that should be correct. You have to turn the
> > > console on however (it is
> > > not enabled by default). The simplest way to do
> > this
> > > is probably to hit the
> > > key option to break into the loader prompt when you
> > see the
> > > boot menu (I think
> > > it is option '6'). Then enter 'boot -D' at the 'OK'
> > > prompt. This should boot
> > > with both the video and serial consoles enabled with
> > the
> > > video console as the
> > > primary console. For a verbose boot, use 'boot -Dv'
> > >
> >
> > Thanks, I tested this option and it worked.
> > I could see the debugging messages.
> >
> > FreeBSD cannot detect the disk in all of the IDE
> > interfaces.
> > (The AMDCS5536 only implemented the primary channel)
> >
> > Anyway, I manage to change the mapping in BAR4 of the IDE
> > controller.
> > However, I'm confused as to how to "force" FreeBSD to
> > recognize the
> > IDE controller to work only in compatibility mode.
> > Because, I'm not sure if the physical IDE controller chip
> > supports
> > Native-PCI mode correctly at all.
> > If I set BAR4 to "disabled"(i.e. not decoding any I/O
> > addresses at all),
> > would FreeBSD use compatibility mode? or would it consider
> > the
> > IDE controller not present?
> >
> > Here's some notes about the IDE controller PCI
> > configuration registers:
> > 1. The Programming Interface register contains 80h (which
> > means _only_
> > compatibility mode supported). I have yet to be able to
> > write new values
> > into this register. That's the state of the register right
> > now.
> > I noticed in your previous reply that for FreeBSD to be
> > forced to use
> > compatibility mode, the programming interface register bits
> > in the PCI configuration register must be set accordingly
> > (I suppose the bits in the lower nibble).
> >
> > 2. BAR0-BAR3 cannot be changed and contains 00h.
> > I have yet to experiment with BAR5.The default value is
> > 00h
> >
>
> Silly me that I didn't know about the SFF-8038i standard
> (PCI IDE Bus mastering). So, I found out that it seems the
> allocation of I/O ports for the IDE controller is just fine.
> However, the primary IDE channel is shared between
> an IDE interface and a CF card. Moreover, Linux detects
> DMA bug, because all drives connected to the interface would be
> in PIO mode :-/
> If all drives on the primary channel are "forced" to PIO mode, then
> shouldn't the "IDE PCI bus master register" (offset 20h per SFF-8038i)
> along with the command register (offset 4h), are set to indicate the
> controller doesn't support bus mastering?
This part I cannot help with as much (I'm not familiar with ATA/IDE/SATA
specifics). I've cc'd mav@ who has done much of the recent work on our
ATA drivers who is probably better able to answer this question.
--
John Baldwin
More information about the freebsd-hackers
mailing list