Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jan 2011 03:58:12 +0800 (SGT)
From:      Darmawan Salihun <darmawan_salihun@yahoo.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: PCI IDE Controller Base Address Register setting
Message-ID:  <745749.9930.qm@web76811.mail.sg1.yahoo.com>
In-Reply-To: <693941.72410.qm@web76815.mail.sg1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--- On Thu, 12/30/10, Darmawan Salihun <darmawan_salihun@yahoo.com> wrote:

> From: Darmawan Salihun <darmawan_salihun@yahoo.com>
> Subject: Re: PCI IDE Controller Base Address Register setting
> To: "John Baldwin" <jhb@freebsd.org>
> Cc: freebsd-hackers@freebsd.org
> Date: Thursday, December 30, 2010, 3:28 PM
> --- On Tue, 12/28/10, John Baldwin
> <jhb@freebsd.org>
> wrote:
>=20
> > From: John Baldwin <jhb@freebsd.org>
> > Subject: Re: PCI IDE Controller Base Address Register
> setting
> > To: "Darmawan Salihun" <darmawan_salihun@yahoo.com>
> > Cc: freebsd-hackers@freebsd.org
> > Date: Tuesday, December 28, 2010, 2:22 PM
> > On Tuesday, December 28, 2010 2:10:59
> > pm Darmawan Salihun wrote:
> > > Hi,=20
> > >=20
> > > --- On Tue, 12/28/10, John Baldwin <jhb@freebsd.org>
> > wrote:
> > >=20
> > > > From: John Baldwin <jhb@freebsd.org>
> > > > Subject: Re: PCI IDE Controller Base
> Address
> > Register setting
> > > > To: "Darmawan Salihun" <darmawan_salihun@yahoo.com>
> > > > Cc: freebsd-hackers@freebsd.org
> > > > Date: Tuesday, December 28, 2010, 1:52 PM
> > > > On Tuesday, December 28, 2010 1:38:05
> > > > pm Darmawan Salihun wrote:
> > > > > Hi,
> > > > >=20
> > > > > --- On Tue, 12/28/10, John Baldwin
> <jhb@freebsd.org>
> > > > wrote:
> > > > >=20
> > > > > > From: John Baldwin <jhb@freebsd.org>
> > > > > > Subject: Re: PCI IDE Controller
> Base
> > Address
> > > > Register setting
> > > > > > To: freebsd-hackers@freebsd.org
> > > > > > Cc: "Darmawan Salihun" <darmawan_salihun@yahoo.com>
> > > > > > Date: Tuesday, December 28, 2010,
> 10:20
> > AM
> > > > > > On Monday, December 27, 2010
> 6:07:35
> > > > > > am Darmawan Salihun wrote:
> > > > > > > Hi,=20
> > > > > > >=20
> > > > > > > I'm trying to install FreeBSD
> 8.0
> > on AMD
> > > > Geode LX800
> > > > > > (CS5536 "southbridge").=20
> > > > > > However, it cannot detect the IDE
> > controller (in
> > > > the
> > > > > > CS5536) correctly. It=20
> > > > > > says something similar to this:=20
> > > > > > > "IDE controller not present"
> > > > > >=20
> > > > > > Hmm, I can't find a message like
> that
> > > > anywhere.=A0 Can
> > > > > > you get the exact message=20
> > > > > > you are seeing?
> > > > > >=20
> > > > >=20
> > > > > It says:=20
> > > > >=20
> > > > > "No disks found! Please verify that
> your
> > disk
> > > > controller is being properly
> > > > > probed at boot time."
> > > >=20
> > > > Oh, so this is a message from the
> > installer.=A0 Can you
> > > > capture a verbose dmesg
> > > > via a serial console perhaps?=A0=20
> > >=20
> > > I'm not sure if I can do this because I've tried
> a
> > couple of times=20
> > > but nothing comes out of the serial console.
> Perhaps a
> > wrong baud rate setting?=20
> > > I set it to 96bps and 8-N-1 back then. Is that
> > correct?=20
> >=20
> > Yes, that should be correct.=A0 You have to turn the
> > console on however (it is
> > not enabled by default).=A0 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').=A0 Then enter 'boot -D' at the 'OK'
> > prompt.=A0 This should boot
> > with both the video and serial consoles enabled with
> the
> > video console as the
> > primary console.=A0 For a verbose boot, use 'boot -Dv'
> >=20
>=20
> Thanks, I tested this option and it worked.=20
> I could see the debugging messages.=20
>=20
> FreeBSD cannot detect the disk in all of the IDE
> interfaces.=A0=20
> (The AMDCS5536 only implemented the primary channel)
>=20
> Anyway, I manage to change the mapping in BAR4 of the IDE
> controller.=20
> However, I'm confused as to how to "force" FreeBSD to
> recognize the=20
> IDE controller to work only in compatibility mode.=20
> Because, I'm not sure if the physical IDE controller chip
> supports=20
> Native-PCI mode correctly at all.=20
> If I set BAR4 to "disabled"(i.e. not decoding any I/O
> addresses at all),=20
> would FreeBSD use compatibility mode? or would it consider
> the=20
> IDE controller not present?
>=20
> Here's some notes about the IDE controller PCI
> configuration registers:
> 1. The Programming Interface register contains 80h (which
> means _only_=20
> compatibility mode supported). I have yet to be able to
> write new values=20
> into this register. That's the state of the register right
> now.=20
> I noticed in your previous reply that for FreeBSD to be
> forced to use=20
> compatibility mode, the programming interface register bits
> in the PCI configuration register must be set accordingly=20
> (I suppose the bits in the lower nibble).
>=20
> 2. BAR0-BAR3 cannot be changed and contains 00h.=20
> I have yet to experiment with BAR5.The default value is
> 00h
>=20

Silly me that I didn't know about the SFF-8038i standard=20
(PCI IDE Bus mastering). So, I found out that it seems the=20
allocation of I/O ports for the IDE controller is just fine.=20
However, the primary IDE channel is shared between=20
an IDE interface  and a CF card. Moreover, Linux detects=20
DMA bug, because all drives connected to the interface would be=20
in PIO mode :-/
If all drives on the primary channel are "forced" to PIO mode, then=20
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=20
controller doesn't support bus mastering?=20

TIA,=20

Darmawan=0A=0A=0A      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?745749.9930.qm>