The system stops responding during disk input/output on a MIPS-based platform (830521)



The information in this article applies to:

  • Microsoft Windows CE .NET 4.2

SYMPTOMS

While you are doing disk input/output (I/O), the system stops responding on a MIPS-based platform.

Note This problem occurs only when the advanced technology attachment packet interface (ATAPI) driver is set to Direct Memory Access (DMA) mode.

CAUSE

This problem occurs because the physical addresses for the DMA pages are not calculated correctly on MIPS-based platforms.

RESOLUTION

This problem has been resolved in public code. Line 495 of the following file has been changed:

<ROOT>\WINCE42\Public\Common\Oak\Drivers\Block\ATAPI\Atapipci.cpp

The original code:
m_pPRD[iPage].physAddr = (m_pPFNs[iPFN] >> UserKInfo[KINX_PFN_SHIFT]) + ((DWORD)pBuffer & dwPageMask);
The updated code:
m_pPRD[iPage].physAddr = (m_pPFNs[iPFN] << UserKInfo[KINX_PFN_SHIFT]) + ((DWORD)pBuffer & dwPageMask);

WORKAROUND

If you decide not to make changes, and if you use a MIPS-based platform, you must set the ATAPI driver to Program Input/Output (PIO) mode. Do not use DMA mode.

MORE INFORMATION

This problem does not affect x86 or ARM-based platforms because the value of the UserKInfo[KINX_PFN_SHIFT] parameter for x86 or ARM-based platforms is 0.

To set the ATAPI driver to PIO mode, add the following code in the Platform.reg file:
[$(PCI_BUS_ROOT)\Template\<Controller Name>\Device0]

   "Settings"=dword:A

[$(PCI_BUS_ROOT)\Template\<Controller Name>\Device2]

   "Settings"=dword:A
You can put the previous code after the following statement in the Platform.reg file:
#include "$(DRIVERS_DIR)\block\atapi\<Controller Name>.reg"

The LockPages function

The correct usage of the LockPages function is to left-shift the value that is returned in the m_pPFNs parameter. (The incorrect usage of the LockPages function is to right-shift the value that is returned in the m_pPFNs parameter.) The documentation for the LockPages function in Microsoft Windows CE .NET 4.2 has been updated to indicate the correct usage.

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Modification Type:MajorLast Reviewed:5/10/2004
Keywords:kbCodeSnippet kbceARMV4I kbceARMV4 kbCEx86 kbceMIPSIV kbceMIPSII kbprb KB830521 kbAudOEM kbAudDeveloper