[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory prefetch



On Fri, 30 May 1997, John R Pierce wrote:

> > We are having problems with a very basic transfer from a FIFO'd PCI
> > interface to host memory.  We are running the following code under Win95:
> > 
> >   mov esi, <address of source - in this case the FIFO>
> >   mov edi, <address of destination>
> >   mov ecx, <number of DWORDS - always even !>
> >   rep movsd  ; this is the instruction that does the transfer
> > 
> > The results we get are that at a 4K page boundary the first word of the
> > new page never makes it into host memory.  
> 
> Just curious... Is that the first word of a SOURCE page or a DESTINATION page? 
> If in fact both addresses are mod 4K, you might go ahead and offset one by 1K
> to see which it is...   Also, is the destination buffer page locked?  I don't
> know why that would matter (it never has for me), but you never know...
> 

The source address is (Base + 0x18080) and the destination address is
0x(XXXX2000).  So it is only the destination address which is at the 4K
boundary.

> I'm assuming your source address is a region created by MapPhysToLinear or some
> such API, right?
>

You are correct.
 
> 
> > We see the transfer occur on
> > the logic analyzer and there is nothing to indicate that there was a
> > problem with the transfer.  The interesting thing is that the next read
> > uses the same address as that used for the lost data word and this word is
> > what shows up in the first word of the page.
>  
> > The assumption is that the host PCI controller has decided the memory is 
> > prefetchable.  I have checked this using pciview, cfgtest, and pcidump.
> > All return bit 3 of base address 0 as 0.
> 
> Could it be your device isn't handling some sort of host abort-retry condition
> correctly and mistakenly advancing the FIFO on a aborted xfer?
>

I don't see anything to indicate that an abort, retry or error occurs with
the transfer.
  
> -jrp
> (warning:  I'm a software engineer! :] )
> 
> 

I should offer the same warning about being a hardware engineer!  Who
every now and then masquerades as a software engineer.  What the heck
we're all just engineers to the rest of the world.

Thanks for the suggestions,
Stuart.
~