Subject: Re: Support for Broadcom BCM5721, Intel ICH6R SATA?
To: Jeff Rizzo <riz@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: netbsd-users
Date: 10/23/2006 14:09:31
--dTy3Mrz/UPE2dbVg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 23, 2006 at 01:58:18PM +0200, Quentin Garnier wrote:
> On Sun, Oct 22, 2006 at 11:07:02AM -0700, Jeff Rizzo wrote:
[...]
> > works out of the box with 3.1, but there is a minor bug in -current
> > (which is being worked on, should be fixed in 4.0) which requires the
> > sata controller to be set in "Enhanced" mode in the BIOS for it to
> > work.  Thus far (~4 days), I'm happy with it.
>=20
> I've looked at the ICH>5 case, too.  It suffers the same potential
> issue.
>=20
> I'm thinking of either simply removing the code that tries to switch to
> enhanced mode (but keeping the code that switches to IDE mode for
> ICH>=3D7), or testing whether the relevant BARs are mappable.  The latter
> feels a bit hackish, but should work.

BTW, the issue is this:  we unconditionally try to switch to enhanced
mode on the SATA controllers, which means the SATA channels with use the
"native" BARs from the chip, instead of the legacy I/O area.  This is a
problem for the P4SCi because if the BIOS isn't configured to do
enhanced mode, it won't configure the native BARs of the chip, leaving
them un-mappable.

I'm honestly dubious of the point of doing this:  if one wants to use
all the IDE and SATA ports, the BIOS should be configured to do so (and
there should be an option in the BIOS to do so;  in the P4SCi case, it
defaults to "Auto" which means it will use enhanced mode if it musts).

(The ACHI vs. IDE problem is almost orthogonal;  the only part where it
is relevant is that AHCI can't be used unless the controller is in
enhanced mode, so the code I am mentioning doesn't apply if AHCI is
active.)

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--dTy3Mrz/UPE2dbVg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iQEVAwUBRTyw+9goQloHrPnoAQLiWggArqX4vUAQTu109h/JSQHSHgcDbjMpH33q
wjyOzqdhII1dbTJBgt7KvjfdPSbJAhlAxdNS5Bjfa4WxYOtJFqxdge+nqtD80uda
sZkcEUotahQq42HDBvsMgAIdUG1nXGj49sXUWDdi+L1oGeQ39hy73LuPbmwWivPJ
p6kOWnkbVm8WvKgHa3K1rSBNejCakQYhwACK94cnkWh/pNtzbvYtKKz4ACWhcGsT
0xCh46ANbyjU6nuWo+N5qAnXot6h3RtFZR8V6/EeuGLbt45Xd75L+TokBCvmBwp3
4C/9DGKtcQibSGlGCpffH/+m9vjO9Eenq7mwWxeisC184NlBbmhFXA==
=yN8f
-----END PGP SIGNATURE-----

--dTy3Mrz/UPE2dbVg--