[lkml]   [2007]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [Fwd: Re: [PATCH 0/5]PCI: x86 MMCONFIG]

    On 12/20/2007 1:16 PM, Matthew Wilcox wrote:
    > Oh, that's the same bug others (including me) have been complaining
    > about.
    >> It hangs in exactly the same place every time.
    >> I am surmising that the write to that BAR is causing a MCE.
    > Bad deduction. What's happening is that the write to the BAR is causing
    > it to overlap the decode for mmconfig space. So the mmconfig write to
    > set the BAR back never gets through.
    > I have a different idea to fix this problem. Instead of writing
    > 0xffffffff, we could look for an unused bit of space in the E820 map and
    > write, say, 0xdfffffff to the low 32-bits of a BAR. Then it wouldn't
    > overlap, and we could find its size using MMCONFIG.
    > Does anyone know how Windows handles these machines?

    I just realized one thing: the bar sizing code in pci_read_bases() (that
    writes 0xffffffff in the bars) does not seem to disable the
    PCI_COMMAND_MEM/PCI_COMMAND_IO bits in the cmd register before
    manipulating the BARs. And it seems nobody else ensures they are
    disabled at this point either (or am I missing something?).

    Touching the bars while they are enabled would be buggy behaviour from
    our part, and something trivial to fix. And it might well fix that
    particular problem (it's fair play from the machine to crash if we
    create a decoding conflict, simply disabling the cmd bits in
    pci_read_bases() should remove that conflict).

    FWIW, to partially answer your last question, Windows does disable
    mem-space and/or IO-space when sizing the bars of a device (I have some
    traces of configuration-space-access taken on a window machine for one
    of the PCI busses).


     \ /
      Last update: 2007-12-23 21:19    [W:0.022 / U:7.252 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site