Re: [PATCH -tip] x86: fix iommu=soft boot option

From: FUJITA Tomonori
Date: Fri Nov 27 2009 - 03:07:24 EST


On Thu, 26 Nov 2009 23:45:33 -0800
Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> >> when AMD64 mem > 4g, no AGP, BIOS set all gart iommu on all nodes size to 32M, and enable bit are set.
> >
> > I have such machine (with sane BIOS).
> >
> > But if BIOS is broken, early_gart_iommu_check() disables GART_EN bit
> > (bits 0)?
>
> not for 32M small size.
>
> that function only clear that bit when different nodes have different setting.
>
> >
> >> 1. iommu=soft, will go through POINT A and POINT B
> >
> > Not always. if aperture_valid() is true, it doesn't go POINT A. My
> > GART machine doesn't go.
>
> maybe your bios set GART iommu set to 64M?

Yeah, my machine has sane BIOS.


> >> 2. no "iommu=soft", will go through POINT A and POINT C
> >
> > As I said, it's not true about POINT A.
>
> maybe your bios set GART iommu set to 64M?
>
> >
> >
> >> and all will reach POINT X to make sure ENABLE bit is not set.
> >
> > POINT X doesn't look make sure ENABLE bit is not set. It just fixes up
> > (sets) the address and its size.
>
> write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, aper_order << 1);
>
> that bit is that bit 0 of AMD64_GARTAPERTURECTL reg.

Oops, thanks.

But as I wrote in the previous mail, can you tell me why we need this?
With 2.6.31 my machine uses swiotlb with GART_EN bit enabled.

My another question is that why can't early_gart_iommu_check()
_always_ disable GART_EN bit?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/