Re: Vista 64 - pci.sys cannot allocate PCI bar above 4 gig area

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi, Pat,

One thing to check first, are you sure your chip's BAR is a 64-bit
BAR ? A 32-bit BAR register cannot see beyond 4Gb.

Also, I'm not sure I can recommend you do this in a production
environment, but it should be ok as a proof of concept and to make
sure that you don't have an underlying hardware issue. In fact, if you
connect a bus analyzer to your machine while you do this exercise, and
set it to trigger on a write to your BAR, a hardware-savvy engineer
should be able to diagnose the problem by looking at the analyzer's
trace.

You can try to do the arbitration yourself, using the I/O level PCI
Express configuration mechanisms. Chapter 22 of the PCIe Mindshare
book explains it: you write all ones to the BAR and read it back: that
will give you the size of the memory space by clearing the bits
corresponding to the available address space to zero. After that you
can write the physical address to the BAR, and it should stick - well,
of course you will need to allocate the physical address range
yourself before you do this, or the OS will reuse that space and write
all over your memory.

One thing to watch out is that some hardware don't like to operate
across a 4Gb boundary. I have had bad experiences with that kind of
thing. User beware!


Alberto.



On Oct 28, 6:54 pm, Pat <P...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Additional info from Pci.sys  ...

PciMemoryArbiter_PreprocessEntry for arbiter 0x85eb010
PCI: Allocation State after preprocessing
PCI: Arbiter Allocation State for PDO 0x85ed9e0 (bus 0, slot 3)
PCI: Current Alternative:
PCI:    Type - 3
PCI:    Minimum - 0xff0000000  Maximum - 0xfffffffff
PCI:    Length - 0x10000000  Alignment - 0x1
PCI:    Flags - 0x2
PCI: Current State:
PCI:    Start - 0x1  End - 0x0
PCI:    Min - 0x0  Max - 0xffffffffffffffff
PCI:    Flags - 0x0  RangeAttr - 0x0  RangeAvailAttr - 0x0
PCI:
PciMemoryArbiter_GetNextAllocationRange for arbiter 0x85eb010
PCI: Next Allocation range found
PCI: Arbiter Allocation State for PDO 0x85ed9e0 (bus 0, slot 3)
PCI: Current Alternative:
PCI:    Type - 3
PCI:    Minimum - 0xff0000000  Maximum - 0xfffffffff
PCI:    Length - 0x10000000  Alignment - 0x1
PCI:    Flags - 0x2
PCI: Current State:
PCI:    Start - 0x1  End - 0x0
PCI:    Min - 0xff0000000  Max - 0xfffffffff
PCI:    Flags - 0x0  RangeAttr - 0x0  RangeAvailAttr - 0x0
PCI:
PciMemoryArbiter_OverrideConflict for arbiter 0x85eb010
PCI: Arbiter Allocation State for PDO 0x85ed9e0 (bus 0, slot 3)
PCI: Current Alternative:
PCI:    Type - 3
PCI:    Minimum - 0xff0000000  Maximum - 0xfffffffff
PCI:    Length - 0x10000000  Alignment - 0x1
PCI:    Flags - 0x2
PCI: Current State:
PCI:    Start - 0x1  End - 0x0
PCI:    Min - 0xff0000000  Max - 0xfffffffff
PCI:    Flags - 0x0  RangeAttr - 0x4  RangeAvailAttr - 0x0
PCI:
PciMemoryArbiter_FindSuitableRange returning 0
PCI: Arbiter Allocation State for PDO 0x85ed9e0 (bus 0, slot 3)
PCI: Current Alternative:
PCI:    Type - 3
PCI:    Minimum - 0xff0000000  Maximum - 0xfffffffff
PCI:    Length - 0x10000000  Alignment - 0x1
PCI:    Flags - 0x2
PCI: Current State:
PCI:    Start - 0x1  End - 0x0
PCI:    Min - 0xff0000000  Max - 0xfffffffff
PCI:    Flags - 0x0  RangeAttr - 0x4  RangeAvailAttr - 0x0
PCI:
::
[repeat 5x]

{
   ...nextAllocation
   ....OverrideCOnflict
   ...FindSoutiableRange returning 0

}

    So it would seem that pci.sys is "trying" the address but always gets 0
back in FindSuitableRange.  Anybody know what
"PciMemoryArbiter_OverrideConflict" means ?

- Pat



"Pat" wrote:
Hi everyone,

    I need some help. I've a graphic device which allocates 3 bars. I am
trying to allocate the largest aperture to  above 4Gig.

     It should reside in 0xFF0000000.

     When Vista boots up, it seems that pci.sys allocates the other 2 bars
which are below 4Gig, but will refuse to allocate the bar which is above
4Gig. In the device manager, I see

the frame buffer aperture :
[0x0000000F F0000000 - 0x0000000F FFFFFFFF PCI standard PCI-to-Pci Bridge

but it has a yellow ! mark on it.  If you open the properties, it says "this
device
cannot find enough free resource that it can use".

Can someone give me some pointers as to what to look or try ?

Using Linux, it seems that I can write to the address (and see it fill up
the video
screen). So at least the hardware seems to be mapped to the correct address.

Using Windbg, I can't seem to read the FrameBuffer when it's mapped at
0x0000000F F0000000, but I can read it ok, when it's mapped below 4Gig. I am
not sure whether this is a clue, or whether WinDbg doesn't work well above
4Gig.

Any help would be greatly appeciated. Thanks in advance.- Hide quoted text -

- Show quoted text -

.



Relevant Pages