Microsoft KB Archive/830521

= The system stops responding during disk input/output on a MIPS-based platform =

Article ID: 830521

Article Last Modified on 5/10/2004

-

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:

\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\\Device0]

&quot;Settings&quot;=dword:A

[$(PCI_BUS_ROOT)\Template\\Device2]

&quot;Settings&quot;=dword:A You can put the previous code after the following statement in the Platform.reg file:
 * 1) include &quot;$(DRIVERS_DIR)\block\atapi\.reg&quot;

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.

Additional query words: hang Linux

Keywords: kbcodesnippet kbprb kbcearmv4i kbcearmv4 kbcex86 kbcemipsiv kbcemipsii KB830521

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.