This is a multi-part message in MIME format.

------=_NextPart_000_0024_01C61225.C1951260
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I run CE 5.0 on a CEPC equiped with a TI1410-based CardBus Bridge =
adapter. This adapter is mostly used to house a Cisco Aironet 350 PCMCIA =
card, but this is not the point.

As for any PC compliant with Microsoft's recommendation for PCI-to-PCI =
and CardBus bridges (see =
http://www.microsoft.com/whdc/archive/cardbus1.mspx and =
http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.mspx), =
the BIOS configures the CardBus Bridge (TI1410) with one 4KB memory =
window, one 64MB memory window and two 256B I/O windows.

I installed the "TI PC Card" feature in my OS Design and modified my =
Platform.reg to override default VendorID/DeviceID list coming from =
pcc_tipccard.reg:

IF BSP_PCCARD_TIPCCARD
#include "$(DRIVERS_DIR)\pccard\tipccard\pcc_tipccard.reg"
;+ATON: add support for TI1410 chip
[$(PCI_BUS_ROOT)\Template\PCC_TIPCCARD]
"VendorID"=3Dmulti_sz:"104C","104c","104c","104c","104c","1180"
"DeviceID"=3Dmulti_sz:"ac50","ac19","ac1c","ac55","ac56","0476"
;-ATON
ENDIF BSP_PCCARD_TIPCCARD

104C/ac50 stands for TI1410.

Then I built and ran a Debug image and stoped on a DEBUGCHK:

Loaded symbols for =
'C:\WINCE500\PBWORKSPACES\TEST\RELDIR\EBB615_X86_DEBUG\PCC_TIPCCARD.DLL'
4294776192 PID:afb73842 TID:ef977fae 0x8f977800: =
-CResourceMgr::AllocateResource(dwLen =3D 0x1000000, dwAlign =3D 0x1000) =
return Fails!!!
4294776192 PID:afb73842 TID:ef977fae 0x8f977800: =
CPcmciaWindows::CardMapWindowPhysical:PDCardSetWindow!!!
4294776192 PID:afb73842 TID:ef977fae 0x8f977800: PCCARD: DEBUGCHK failed =
in file =
E:\macallan\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp =
at line 1493=20

So I started to debug and saw the following problem.

a) CPCCardBusBridge::SetupWindowResources correctly harvests the I/O and =
memory windows characteristics and store them in a DDKWINDOWINFO =
structure.
b) Its job done, CPCCardBusBridge::SetupWindowResources creates a =
CCardBusResource instance, giving the DDKWINDOWINFO structure to the =
contructor:

m_pCardBusResource =3D new CCardBusResource( dwi );

c) The code in CCardBusResource::CCardBusResource completely ignores the =
fact that 2 windows of each kind exist in the DDKWINDOWINFO structure =
and creates a couple of CResourceMgr instances, using only the first =
window of each type of resource:

if( dwi.dwNumMemWindows !=3D 0 && m_pMemResource =3D=3D NULL )
{
m_pMemResource =3D new CResourceMgr( dwi.memWindows[0].dwBase,
dwi.memWindows[0].dwLen );
}
if( dwi.dwNumIoWindows !=3D 0 && m_pIoResource =3D=3D NULL )
{
m_pIoResource =3D new CResourceMgr( dwi.ioWindows[0].dwBase,
dwi.ioWindows[0].dwLen );
}

CResourceMgr::CResourceMgr( DWORD dwAddr, DWORD dwLen )
{
m_pResourceList =3D new RESOURCE_LIST;
if( m_pResourceList )
{
m_pResourceList->dwAddr =3D dwAddr;
m_pResourceList->dwLen =3D dwLen;
m_pResourceList->pNext =3D NULL;
m_pResourceList->dwFlags =3D 0;
}
}


Afterwards, usable resources on the CardBus Bridge have been truncated =
to:
- one 4KB memory window,
- one 256B I/O window.

d) After card detection, the CIS has to be read and =
CResourceMgr::AllocateResource is called to allocate 0x1000000 bytes for =
the attribute window (ain't it excessive to ask for 16MB to read a few =
dozens of data ?) and of course fails by lack of resource.


If if skip the detection of the first memory windows in =
CPCCardBusBridge::SetupWindowResources, final resources are:
- one 64MB memory window,
- one 256B I/O window,
CResourceMgr::AllocateResource succeds and I can use my Cisco card =
without any trouble.

Once tested, I will suggest a convenient change in =
CCardBusResource::CCardBusResource to make m_pMemResource and =
m_pIoResource true resource *lists*.

--=20
Remi de Gravelaine
gravelaine at aton dash sys dot fr
------=_NextPart_000_0024_01C61225.C1951260
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I run CE 5.0 on a CEPC equiped with a =
TI1410-based=20
CardBus Bridge adapter. This adapter is mostly used to house =
a&nbsp;Cisco=20
Aironet 350 PCMCIA card, but this is not the point.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As for any PC compliant with =
Microsoft's=20
recommendation for PCI-to-PCI and CardBus bridges (see </FONT><A=20
href=3D"http://www.microsoft.com/whdc/archive/cardbus1.mspx"><FONT =
face=3DArial=20
size=3D2>http://www.microsoft.com/whdc/archive/cardbus1.mspx</FONT></A><F=
ONT=20
face=3DArial size=3D2>&nbsp;and </FONT><A=20
href=3D"http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.ms=
px"><FONT=20
face=3DArial=20
size=3D2>http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.m=
spx</FONT></A><FONT=20
face=3DArial size=3D2>), the BIOS configures the CardBus Bridge (TI1410) =
with one=20
4KB memory window, one 64MB memory window and two 256B I/O =
windows.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I installed the "TI PC Card" feature in =
my OS=20
Design and modified my Platform.reg to override default =
VendorID/DeviceID list=20
coming from pcc_tipccard.reg:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>IF =
BSP_PCCARD_TIPCCARD<BR>#include=20
"$(DRIVERS_DIR)\pccard\tipccard\pcc_tipccard.reg"<BR>;+ATON: add support =
for=20
TI1410 chip<BR>[$(PCI_BUS_ROOT)\Template\PCC_TIPCCARD]<BR>&nbsp;&nbsp;=20
"VendorID"=3Dmulti_sz:"104C","104c","104c","104c","104c","1180"<BR>&nbsp;=
&nbsp;=20
"DeviceID"=3Dmulti_sz:"ac50","ac19","ac1c","ac55","ac56","0476"<BR>;-ATON=
<BR>ENDIF=20
BSP_PCCARD_TIPCCARD<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>104C/ac50<FONT face=3DArial> =
stands for=20
TI1410.</FONT></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2><FONT =
face=3DArial></FONT>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Then I built and ran a Debug image and =
stoped on a=20
DEBUGCHK:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Loaded symbols for=20
'C:\WINCE500\PBWORKSPACES\TEST\RELDIR\EBB615_X86_DEBUG\PCC_TIPCCARD.DLL'<=
BR>4294776192=20
PID:afb73842 TID:ef977fae 0x8f977800: =
-CResourceMgr::AllocateResource(dwLen =3D=20
0x1000000, dwAlign =3D 0x1000) return Fails!!!<BR>4294776192 =
PID:afb73842=20
TID:ef977fae 0x8f977800:=20
CPcmciaWindows::CardMapWindowPhysical:PDCardSetWindow!!!<BR>4294776192=20
PID:afb73842 TID:ef977fae 0x8f977800: PCCARD: DEBUGCHK failed in file=20
E:\macallan\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp =
at line=20
1493 <BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So&nbsp;I started to debug and saw the =
following=20
problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>a) =
CPCCardBusBridge::SetupWindowResources correctly=20
harvests the I/O and memory windows characteristics and store them in a=20
DDKWINDOWINFO structure.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>b) Its job&nbsp;done,=20
CPCCardBusBridge::SetupWindowResources creates a CCardBusResource =
instance,=20
giving the DDKWINDOWINFO structure to the contructor:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
m_pCardBusResource =3D new=20
CCardBusResource( dwi );</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>c) The code=20
in&nbsp;CCardBusResource::CCardBusResource completely ignores the fact =
that 2=20
windows of each kind exist in the DDKWINDOWINFO structure and creates a =
couple=20
of CResourceMgr instances, <U>using only the first window of each type =
of=20
resource</U>:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp;&nbsp; if(=20
dwi.dwNumMemWindows !=3D 0 &amp;&amp; m_pMemResource =3D=3D NULL=20
)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pMemResource =3D new CResourceMgr(=20
dwi.memWindows[0].dwBase,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
dwi.memWindows[0].dwLen );<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; =
if(=20
dwi.dwNumIoWindows !=3D 0 &amp;&amp; m_pIoResource =3D=3D NULL =
)<BR>&nbsp;&nbsp;&nbsp;=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_pIoResource =3D new=20
CResourceMgr(=20
dwi.ioWindows[0].dwBase,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
dwi.ioWindows[0].dwLen );<BR>&nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT=20
face=3D"Courier New">CResourceMgr::CResourceMgr( DWORD dwAddr, DWORD =
dwLen=20
)<BR>{<BR>&nbsp;&nbsp;&nbsp; m_pResourceList =3D new=20
RESOURCE_LIST;<BR>&nbsp;&nbsp;&nbsp; if( m_pResourceList =
)<BR>&nbsp;&nbsp;&nbsp;=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
m_pResourceList-&gt;dwAddr =3D=20
dwAddr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
m_pResourceList-&gt;dwLen=20
=3D dwLen;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
m_pResourceList-&gt;pNext=20
=3D NULL;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pResourceList-&gt;dwFlags =3D 0;<BR>&nbsp;&nbsp;&nbsp;=20
}<BR>}<BR></FONT><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Afterwards, usable resources on the =
CardBus Bridge=20
have been truncated to:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 4KB memory=20
window,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 256B I/O=20
window.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>d) After card detection, the CIS has to =
be read and=20
CResourceMgr::AllocateResource is called to allocate 0x1000000 bytes for =
the=20
attribute window (ain't it excessive to ask for 16MB to read a few =
dozens of=20
data ?) and of course fails by lack of resource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If if skip the detection of the first =
memory=20
windows in CPCCardBusBridge::SetupWindowResources, final resources=20
are:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 64MB memory=20
window,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 256B I/O=20
window,</FONT></DIV>
<DIV>CResourceMgr::AllocateResource succeds and I can use my Cisco card =
without=20
any trouble.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Once tested, I will suggest a convenient change=20
in&nbsp;CCardBusResource::CCardBusResource to make <FONT=20
face=3D"Courier New">m_pMemResource</FONT></FONT><FONT =
face=3DArial><FONT size=3D2>=20
and <FONT face=3D"Courier New">m_pIoResource</FONT></FONT></FONT><FONT=20
face=3DArial><FONT size=3D2> true resource =
*lists*.</DIV></FONT></FONT><FONT=20
face=3DArial size=3D2>
<DIV><BR>-- <BR>Remi de Gravelaine<BR>gravelaine at aton dash sys dot=20
fr</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0024_01C61225.C1951260--

Re: Another bug in TIPCCARD (CE 5.0) by David

David
Thu Jan 05 13:53:43 CST 2006

This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C611EE.AD9CF070
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Do you know who write the mapping windows before this driver loaded? Is =
it BIOS or PCIBUS?

The reason to use the First Mapping windows because those value should =
be set it up by PCIBUS. PCI calls ConfigSet (init.cpp) to setup mapping =
window up. It only setup first windows and disable second Windows.=20

Does your platform does the same way?

The initial size of Mapping windows is defined in Init.cpp =
DEFAULT_IO_SIZE and DEFAULT_MEM_SIZE. It can be altered by regisgistry =
value MemWindowSize and IoWindowSize.

David Liao
"Remi de Gravelaine" <gravelaine at aton dash sys dot fr> wrote in =
message news:Ow%231i1hEGHA.2036@TK2MSFTNGP14.phx.gbl...
I run CE 5.0 on a CEPC equiped with a TI1410-based CardBus Bridge =
adapter. This adapter is mostly used to house a Cisco Aironet 350 PCMCIA =
card, but this is not the point.

As for any PC compliant with Microsoft's recommendation for PCI-to-PCI =
and CardBus bridges (see =
http://www.microsoft.com/whdc/archive/cardbus1.mspx and =
http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.mspx), =
the BIOS configures the CardBus Bridge (TI1410) with one 4KB memory =
window, one 64MB memory window and two 256B I/O windows.

I installed the "TI PC Card" feature in my OS Design and modified my =
Platform.reg to override default VendorID/DeviceID list coming from =
pcc_tipccard.reg:

IF BSP_PCCARD_TIPCCARD
#include "$(DRIVERS_DIR)\pccard\tipccard\pcc_tipccard.reg"
;+ATON: add support for TI1410 chip
[$(PCI_BUS_ROOT)\Template\PCC_TIPCCARD]
"VendorID"=3Dmulti_sz:"104C","104c","104c","104c","104c","1180"
"DeviceID"=3Dmulti_sz:"ac50","ac19","ac1c","ac55","ac56","0476"
;-ATON
ENDIF BSP_PCCARD_TIPCCARD

104C/ac50 stands for TI1410.

Then I built and ran a Debug image and stoped on a DEBUGCHK:

Loaded symbols for =
'C:\WINCE500\PBWORKSPACES\TEST\RELDIR\EBB615_X86_DEBUG\PCC_TIPCCARD.DLL'
4294776192 PID:afb73842 TID:ef977fae 0x8f977800: =
-CResourceMgr::AllocateResource(dwLen =3D 0x1000000, dwAlign =3D 0x1000) =
return Fails!!!
4294776192 PID:afb73842 TID:ef977fae 0x8f977800: =
CPcmciaWindows::CardMapWindowPhysical:PDCardSetWindow!!!
4294776192 PID:afb73842 TID:ef977fae 0x8f977800: PCCARD: DEBUGCHK =
failed in file =
E:\macallan\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp =
at line 1493=20

So I started to debug and saw the following problem.

a) CPCCardBusBridge::SetupWindowResources correctly harvests the I/O =
and memory windows characteristics and store them in a DDKWINDOWINFO =
structure.
b) Its job done, CPCCardBusBridge::SetupWindowResources creates a =
CCardBusResource instance, giving the DDKWINDOWINFO structure to the =
contructor:

m_pCardBusResource =3D new CCardBusResource( dwi );

c) The code in CCardBusResource::CCardBusResource completely ignores =
the fact that 2 windows of each kind exist in the DDKWINDOWINFO =
structure and creates a couple of CResourceMgr instances, using only the =
first window of each type of resource:

if( dwi.dwNumMemWindows !=3D 0 && m_pMemResource =3D=3D NULL )
{
m_pMemResource =3D new CResourceMgr( dwi.memWindows[0].dwBase,
dwi.memWindows[0].dwLen );
}
if( dwi.dwNumIoWindows !=3D 0 && m_pIoResource =3D=3D NULL )
{
m_pIoResource =3D new CResourceMgr( dwi.ioWindows[0].dwBase,
dwi.ioWindows[0].dwLen );
}

CResourceMgr::CResourceMgr( DWORD dwAddr, DWORD dwLen )
{
m_pResourceList =3D new RESOURCE_LIST;
if( m_pResourceList )
{
m_pResourceList->dwAddr =3D dwAddr;
m_pResourceList->dwLen =3D dwLen;
m_pResourceList->pNext =3D NULL;
m_pResourceList->dwFlags =3D 0;
}
}


Afterwards, usable resources on the CardBus Bridge have been truncated =
to:
- one 4KB memory window,
- one 256B I/O window.

d) After card detection, the CIS has to be read and =
CResourceMgr::AllocateResource is called to allocate 0x1000000 bytes for =
the attribute window (ain't it excessive to ask for 16MB to read a few =
dozens of data ?) and of course fails by lack of resource.


If if skip the detection of the first memory windows in =
CPCCardBusBridge::SetupWindowResources, final resources are:
- one 64MB memory window,
- one 256B I/O window,
CResourceMgr::AllocateResource succeds and I can use my Cisco card =
without any trouble.

Once tested, I will suggest a convenient change in =
CCardBusResource::CCardBusResource to make m_pMemResource and =
m_pIoResource true resource *lists*.

--=20
Remi de Gravelaine
gravelaine at aton dash sys dot fr
------=_NextPart_000_000D_01C611EE.AD9CF070
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Do you know who write the mapping =
windows before=20
this driver loaded? Is it BIOS or PCIBUS?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The reason to use the First Mapping =
windows because=20
those value should be set it up by PCIBUS. PCI calls ConfigSet =
(init.cpp) to=20
setup mapping window up. It only setup first windows and disable second =
Windows.=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Does your platform does the same =
way?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The initial size of Mapping windows is =
defined in=20
Init.cpp DEFAULT_IO_SIZE and DEFAULT_MEM_SIZE. It can be altered by =
regisgistry=20
value MemWindowSize and IoWindowSize.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>David Liao</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Remi de Gravelaine" &lt;gravelaine at aton dash sys dot fr&gt; =
wrote in=20
message <A=20
=
href=3D"news:Ow%231i1hEGHA.2036@TK2MSFTNGP14.phx.gbl">news:Ow%231i1hEGHA.=
2036@TK2MSFTNGP14.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I run CE 5.0 on a CEPC equiped with a =

TI1410-based CardBus Bridge adapter. This adapter is mostly used to =
house=20
a&nbsp;Cisco Aironet 350 PCMCIA card, but this is not the =
point.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As for any PC compliant with =
Microsoft's=20
recommendation for PCI-to-PCI and CardBus bridges (see </FONT><A=20
href=3D"http://www.microsoft.com/whdc/archive/cardbus1.mspx"><FONT =
face=3DArial=20
=
size=3D2>http://www.microsoft.com/whdc/archive/cardbus1.mspx</FONT></A><F=
ONT=20
face=3DArial size=3D2>&nbsp;and </FONT><A=20
=
href=3D"http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.ms=
px"><FONT=20
face=3DArial=20
=
size=3D2>http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.m=
spx</FONT></A><FONT=20
face=3DArial size=3D2>), the BIOS configures the CardBus Bridge =
(TI1410) with one=20
4KB memory window, one 64MB memory window and two 256B I/O=20
windows.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I installed the "TI PC Card" feature =
in my OS=20
Design and modified my Platform.reg to override default =
VendorID/DeviceID list=20
coming from pcc_tipccard.reg:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>IF =
BSP_PCCARD_TIPCCARD<BR>#include=20
"$(DRIVERS_DIR)\pccard\tipccard\pcc_tipccard.reg"<BR>;+ATON: add =
support for=20
TI1410 chip<BR>[$(PCI_BUS_ROOT)\Template\PCC_TIPCCARD]<BR>&nbsp;&nbsp; =

=
"VendorID"=3Dmulti_sz:"104C","104c","104c","104c","104c","1180"<BR>&nbsp;=
&nbsp;=20
=
"DeviceID"=3Dmulti_sz:"ac50","ac19","ac1c","ac55","ac56","0476"<BR>;-ATON=
<BR>ENDIF=20
BSP_PCCARD_TIPCCARD<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>104C/ac50<FONT face=3DArial> =
stands for=20
TI1410.</FONT></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2><FONT=20
face=3DArial></FONT>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Then I built and ran a Debug image =
and stoped on=20
a DEBUGCHK:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Loaded symbols for=20
=
'C:\WINCE500\PBWORKSPACES\TEST\RELDIR\EBB615_X86_DEBUG\PCC_TIPCCARD.DLL'<=
BR>4294776192=20
PID:afb73842 TID:ef977fae 0x8f977800: =
-CResourceMgr::AllocateResource(dwLen =3D=20
0x1000000, dwAlign =3D 0x1000) return Fails!!!<BR>4294776192 =
PID:afb73842=20
TID:ef977fae 0x8f977800:=20
CPcmciaWindows::CardMapWindowPhysical:PDCardSetWindow!!!<BR>4294776192 =

PID:afb73842 TID:ef977fae 0x8f977800: PCCARD: DEBUGCHK failed in file=20
=
E:\macallan\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp =
at=20
line 1493 <BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So&nbsp;I started to debug and saw =
the following=20
problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>a) =
CPCCardBusBridge::SetupWindowResources=20
correctly harvests the I/O and memory windows characteristics and =
store them=20
in a DDKWINDOWINFO structure.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>b) Its job&nbsp;done,=20
CPCCardBusBridge::SetupWindowResources creates a CCardBusResource =
instance,=20
giving the DDKWINDOWINFO structure to the contructor:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
m_pCardBusResource =3D=20
new CCardBusResource( dwi );</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>c) The code=20
in&nbsp;CCardBusResource::CCardBusResource completely ignores the fact =
that 2=20
windows of each kind exist in the DDKWINDOWINFO structure and creates =
a couple=20
of CResourceMgr instances, <U>using only the first window of each type =
of=20
resource</U>:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp;&nbsp; if(=20
dwi.dwNumMemWindows !=3D 0 &amp;&amp; m_pMemResource =3D=3D NULL=20
)<BR>&nbsp;&nbsp;&nbsp; =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pMemResource =3D new CResourceMgr(=20
=
dwi.memWindows[0].dwBase,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
dwi.memWindows[0].dwLen );<BR>&nbsp;&nbsp;&nbsp; =
}<BR>&nbsp;&nbsp;&nbsp; if(=20
dwi.dwNumIoWindows !=3D 0 &amp;&amp; m_pIoResource =3D=3D NULL=20
)<BR>&nbsp;&nbsp;&nbsp; =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pIoResource =3D new CResourceMgr(=20
=
dwi.ioWindows[0].dwBase,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
dwi.ioWindows[0].dwLen );<BR>&nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT=20
face=3D"Courier New">CResourceMgr::CResourceMgr( DWORD dwAddr, DWORD =
dwLen=20
)<BR>{<BR>&nbsp;&nbsp;&nbsp; m_pResourceList =3D new=20
RESOURCE_LIST;<BR>&nbsp;&nbsp;&nbsp; if( m_pResourceList=20
)<BR>&nbsp;&nbsp;&nbsp; =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pResourceList-&gt;dwAddr =3D=20
dwAddr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pResourceList-&gt;dwLen =3D=20
dwLen;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
m_pResourceList-&gt;pNext=20
=3D NULL;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
m_pResourceList-&gt;dwFlags =3D 0;<BR>&nbsp;&nbsp;&nbsp;=20
}<BR>}<BR></FONT><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Afterwards, usable resources on the =
CardBus=20
Bridge have been truncated to:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 4KB memory=20
window,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 256B I/O=20
window.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>d) After card detection, the CIS has =
to be read=20
and CResourceMgr::AllocateResource is called to allocate 0x1000000 =
bytes for=20
the attribute window (ain't it excessive to ask for 16MB to read a few =
dozens=20
of data ?) and of course fails by lack of resource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If if skip the detection of the first =
memory=20
windows in CPCCardBusBridge::SetupWindowResources, final resources=20
are:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 64MB memory=20
window,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - one 256B I/O=20
window,</FONT></DIV>
<DIV>CResourceMgr::AllocateResource succeds and I can use my Cisco =
card=20
without any trouble.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Once tested, I will suggest a convenient change=20
in&nbsp;CCardBusResource::CCardBusResource to make <FONT=20
face=3D"Courier New">m_pMemResource</FONT></FONT><FONT =
face=3DArial><FONT size=3D2>=20
and <FONT face=3D"Courier New">m_pIoResource</FONT></FONT></FONT><FONT =

face=3DArial><FONT size=3D2> true resource =
*lists*.</DIV></FONT></FONT><FONT=20
face=3DArial size=3D2>
<DIV><BR>-- <BR>Remi de Gravelaine<BR>gravelaine at aton dash sys dot=20
fr</DIV></FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000D_01C611EE.AD9CF070--


Re: Another bug in TIPCCARD (CE 5.0) by gravelaine

gravelaine
Fri Jan 06 04:55:06 CST 2006

This is a multi-part message in MIME format.

------=_NextPart_000_0029_01C612B8.0C812330
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi, David.

Thanks for your reply.

> Do you know who write the mapping windows before this driver loaded? =
Is it BIOS or PCIBUS?

>> As for any PC compliant with Microsoft's recommendation for =
PCI-to-PCI and CardBus bridges (see =
http://www.microsoft.com/whdc/archive/cardbus1.mspx and =
http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.mspx), =
the BIOS configures the CardBus Bridge (TI1410) with one 4KB memory =
window, one 64MB memory window and two 256B I/O windows.

All PCI configuration is made by the BIOS, and only by the BIOS (i.e. =
NoConfig=3D1)
My CEPC is an embedded device (mainly used in busses and cars) but is =
also a very compatible PC. It is not intended to run *only* under CE and =
some customers use it with other popular OS like Linux or XP/XPE. XP/XPE =
won't be able to use the TI1410 if this CardBus Bridge is not configured =
as mentioned before (one 4KB memory window, then one 64MB memory =
window), so my platform's BIOS configures the memory windows as asked by =
Microsoft.

As far as I could understand, the code in TIPCCARD does not specially =
assume that PCIBUS did the PCI configuration. In =
CPCCardBusBridge::InitCardBusBridge, it checks for previously made =
initializations and respects them. In =
CPCCardBusBridge::SetupWindowResources, it searches for *two* I/O and =
*two* memory windows (by the way, what is the justification for the =
windows invalidation that follows detection?) and when =
CCardBusResource::CCardBusResource is called, it is given all the =
information in a DDKWINDOWINFO structure:

dwi.dwNumIoWindows =3D 2
dwi.ioWindows[0].dwBase =3D 0x1000=20
dwi.ioWindows[0].dwLength =3D 0x100
dwi.ioWindows[1].dwBase =3D 0x1400
dwi.ioWindows[1].dwLength =3D 0x100
dwi.dwNumMemWindows =3D 2
dwi.memWindows[0].dwBase =3D 0x80000000
dwi.memWindows[0].dwLength =3D 0x1000
dwi.memWindows[1].dwBase =3D 0x84000000
dwi.memWindows[1].dwLength =3D 0x4000000

The code in CCardBusResource::CCardBusResource ignores the fact that 2 =
memory windows exist and that 2 I/O windows exists, but the code in =
CResourceMgr::AllocateResource does not!!!

I will soon work on a clean fix and keep you in touch.
--=20
Remi de Gravelaine
gravelaine at aton dash sys dot fr
------=_NextPart_000_0029_01C612B8.0C812330
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, David.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your=20
reply.<BR></FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV></FONT><FONT face=3DArial size=3D2>&gt; Do you know who write the =
mapping=20
windows before this driver loaded? Is it BIOS or PCIBUS?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>&gt;&gt; As for any PC compliant with =
Microsoft's=20
recommendation for PCI-to-PCI and CardBus bridges (see </FONT><A=20
href=3D"http://www.microsoft.com/whdc/archive/cardbus1.mspx"><FONT =
face=3DArial=20
size=3D2>http://www.microsoft.com/whdc/archive/cardbus1.mspx</FONT></A><F=
ONT=20
face=3DArial size=3D2>&nbsp;and </FONT><A=20
href=3D"http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.ms=
px"><FONT=20
face=3DArial=20
size=3D2>http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.m=
spx</FONT></A><FONT=20
face=3DArial size=3D2>), the <STRONG>BIOS</STRONG> configures the =
CardBus Bridge=20
(TI1410) with one 4KB memory window, one 64MB memory window and two 256B =
I/O=20
windows.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>All PCI configuration is made by the =
BIOS, and only=20
by the BIOS (i.e. NoConfig=3D1)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>My CEPC is an embedded device (mainly =
used in=20
busses and cars) but is also a very compatible PC. It is not intended to =
run=20
*only* under CE and some customers use it with other popular OS =
like&nbsp;Linux=20
or XP/XPE. XP/XPE won't be able to use the TI1410 if this CardBus Bridge =
is not=20
configured as mentioned before (one 4KB memory window, then one 64MB =
memory=20
window), so my platform's BIOS configures the memory windows as asked by =

Microsoft.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As far as I could understand, the code =
in TIPCCARD=20
does not specially assume that PCIBUS did the PCI configuration. In=20
CPCCardBusBridge::InitCardBusBridge, it checks for previously made=20
initializations and respects them. In =
CPCCardBusBridge::SetupWindowResources, it=20
searches for *two* I/O and *two* memory windows (by the way, what is the =

justification for the windows invalidation that follows detection?) and =
when=20
CCardBusResource::CCardBusResource is called, it is given all the =
information in=20
a DDKWINDOWINFO structure:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>dwi.dwNumIoWindows =3D 2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[0].dwBase =3D =
0x1000&nbsp;
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[0].dwLength =3D=20
0x100</FONT></DIV></FONT></DIV></FONT><FONT face=3DArial =
size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[1].dwBase =3D 0x1400
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[1].dwLength =3D=20
0x100</FONT></DIV></FONT></DIV></FONT></DIV>dwi.dwNumMemWindows =3D =
2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[0].dwBase =3D 0x80000000
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[0].dwLength =3D=20
0x1000</FONT></DIV></FONT></DIV></FONT><FONT face=3DArial =
size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[1].dwBase&nbsp; =3D =
0x84000000
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[1].dwLength =3D=20
0x4000000</FONT></DIV></FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The code in =
CCardBusResource::CCardBusResource=20
ignores the fact that 2 memory windows exist and that 2 I/O windows =
exists, but=20
the code in CResourceMgr::AllocateResource does not!!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I will soon&nbsp;work on a clean fix =
and keep you=20
in touch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- <BR>Remi de Gravelaine<BR>gravelaine =
at aton=20
dash sys dot fr</DIV></DIV></DIV></FONT></BODY></HTML>

------=_NextPart_000_0029_01C612B8.0C812330--


Re: Another bug in TIPCCARD (CE 5.0) by david

david
Fri Jan 06 05:27:40 CST 2006

Hi folks,

I am struggling in find a PCI to PCCARD bridge card supported by Wince
5=2E0 to allow me to testing my PCMCIA device drivers. I've bought
several card (ti1410/1420, ene 1400, ricoh) and none of them works
properly under CE (all works well under XP).

After adding VID and DID to the TIPCCARD.reg, the ti cards are
recognized (seen in registry), but does nothing when a PCMCIA card
inserted to the socket(s), even power was not switched on.

Similar to TIs, power to pcmcia card was switched on and never off
after card inserted.

WinCE does not recognise the ENE ones at all.

Your advices will be high appreciated.

Regards

David


R=E9mi de Gravelaine wrote:
> Hi, David.
>
> Thanks for your reply.
>
> > Do you know who write the mapping windows before this driver loaded? Is=
it BIOS or PCIBUS?
>
> >> As for any PC compliant with Microsoft's recommendation for PCI-to-PCI=
and CardBus bridges (see http://www.microsoft.com/whdc/archive/cardbus1.ms=
px and http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.mspx)=
, the BIOS configures the CardBus Bridge (TI1410) with one 4KB memory windo=
w, one 64MB memory window and two 256B I/O windows.
>
> All PCI configuration is made by the BIOS, and only by the BIOS (i.e. NoC=
onfig=3D1)
> My CEPC is an embedded device (mainly used in busses and cars) but is als=
o a very compatible PC. It is not intended to run *only* under CE and some =
customers use it with other popular OS like Linux or XP/XPE. XP/XPE won't b=
e able to use the TI1410 if this CardBus Bridge is not configured as mentio=
ned before (one 4KB memory window, then one 64MB memory window), so my plat=
form's BIOS configures the memory windows as asked by Microsoft.
>
> As far as I could understand, the code in TIPCCARD does not specially ass=
ume that PCIBUS did the PCI configuration. In CPCCardBusBridge::InitCardBus=
Bridge, it checks for previously made initializations and respects them. In=
CPCCardBusBridge::SetupWindowResources, it searches for *two* I/O and *two=
* memory windows (by the way, what is the justification for the windows inv=
alidation that follows detection?) and when CCardBusResource::CCardBusResou=
rce is called, it is given all the information in a DDKWINDOWINFO structure:
>
> dwi.dwNumIoWindows =3D 2
> dwi.ioWindows[0].dwBase =3D 0x1000
> dwi.ioWindows[0].dwLength =3D 0x100
> dwi.ioWindows[1].dwBase =3D 0x1400
> dwi.ioWindows[1].dwLength =3D 0x100
> dwi.dwNumMemWindows =3D 2
> dwi.memWindows[0].dwBase =3D 0x80000000
> dwi.memWindows[0].dwLength =3D 0x1000
> dwi.memWindows[1].dwBase =3D 0x84000000
> dwi.memWindows[1].dwLength =3D 0x4000000
>
> The code in CCardBusResource::CCardBusResource ignores the fact that 2 me=
mory windows exist and that 2 I/O windows exists, but the code in CResource=
Mgr::AllocateResource does not!!!
>
> I will soon work on a clean fix and keep you in touch.
> --=20
> Remi de Gravelaine
> gravelaine at aton dash sys dot fr


Re: Another bug in TIPCCARD (CE 5.0) by Rémi

Rémi
Fri Jan 06 09:07:20 CST 2006

Hi David,

I suspect that your problems are coming from the above-described 'feature'.

We sell our own PC/104+ adapter based on the TI1410 chip
(http://www.aton-sys.fr/produits/fiche_29.php, sorry, its in French), which
should not be very different from what you are trying to use. It works
flawlessly under CE 4.2 (I wrote a driver for this) and, since yesterday,
under CE 5.0, at least with a Cisco Aironet 350 PCMCIA card. I of course did
not try PCCard cards.

You should investigate more seriously on what really happens when you insert
a card in your adapters, i.e. build and run a Debug kernel, enable Debug
zones for every module that begins with 'pc' and look at debug output when
you insert a card.

Remi



Re: Another bug in TIPCCARD (CE 5.0) by David

David
Fri Jan 06 12:47:52 CST 2006

This is a multi-part message in MIME format.

------=_NextPart_000_0017_01C612AE.A481D760
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I see what you are getting. The PC Card Bridge resource manager does not =
design for manage non-contiguous memory or IO windows. This is another =
reason we only use the one windows for initial mapping.
The NoConfig falg should only be set on CEPC, it should not set for Any =
embedded device that want to achieve the best result.

As you mention, we may consider to fix this for the feature release.

David Liao
"R=E9mi de Gravelaine" <gravelaine at aton-sys dot fr> wrote in =
message news:e52zM9qEGHA.1736@TK2MSFTNGP14.phx.gbl...
Hi, David.

Thanks for your reply.

> Do you know who write the mapping windows before this driver loaded? =
Is it BIOS or PCIBUS?

>> As for any PC compliant with Microsoft's recommendation for =
PCI-to-PCI and CardBus bridges (see =
http://www.microsoft.com/whdc/archive/cardbus1.mspx and =
http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.mspx), =
the BIOS configures the CardBus Bridge (TI1410) with one 4KB memory =
window, one 64MB memory window and two 256B I/O windows.

All PCI configuration is made by the BIOS, and only by the BIOS (i.e. =
NoConfig=3D1)
My CEPC is an embedded device (mainly used in busses and cars) but is =
also a very compatible PC. It is not intended to run *only* under CE and =
some customers use it with other popular OS like Linux or XP/XPE. XP/XPE =
won't be able to use the TI1410 if this CardBus Bridge is not configured =
as mentioned before (one 4KB memory window, then one 64MB memory =
window), so my platform's BIOS configures the memory windows as asked by =
Microsoft.

As far as I could understand, the code in TIPCCARD does not specially =
assume that PCIBUS did the PCI configuration. In =
CPCCardBusBridge::InitCardBusBridge, it checks for previously made =
initializations and respects them. In =
CPCCardBusBridge::SetupWindowResources, it searches for *two* I/O and =
*two* memory windows (by the way, what is the justification for the =
windows invalidation that follows detection?) and when =
CCardBusResource::CCardBusResource is called, it is given all the =
information in a DDKWINDOWINFO structure:

dwi.dwNumIoWindows =3D 2
dwi.ioWindows[0].dwBase =3D 0x1000 =20
dwi.ioWindows[0].dwLength =3D 0x100
dwi.ioWindows[1].dwBase =3D 0x1400=20
dwi.ioWindows[1].dwLength =3D 0x100
dwi.dwNumMemWindows =3D 2
dwi.memWindows[0].dwBase =3D 0x80000000=20
dwi.memWindows[0].dwLength =3D 0x1000
dwi.memWindows[1].dwBase =3D 0x84000000=20
dwi.memWindows[1].dwLength =3D 0x4000000

The code in CCardBusResource::CCardBusResource ignores the fact that 2 =
memory windows exist and that 2 I/O windows exists, but the code in =
CResourceMgr::AllocateResource does not!!!

I will soon work on a clean fix and keep you in touch.
--=20
Remi de Gravelaine
gravelaine at aton dash sys dot fr
------=_NextPart_000_0017_01C612AE.A481D760
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I see what you are getting. The PC Card =
Bridge=20
resource manager does not design for manage non-contiguous memory or IO =
windows.=20
This is another reason we only use the one windows for initial=20
mapping.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The NoConfig falg should only be set on =
CEPC, it=20
should not set for Any embedded device that want to achieve the best=20
result.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As you mention, we may consider to fix =
this for the=20
feature release.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>David Liao</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"R=E9mi de Gravelaine" &lt;gravelaine at aton-sys dot fr&gt; =
wrote in=20
message <A=20
=
href=3D"news:e52zM9qEGHA.1736@TK2MSFTNGP14.phx.gbl">news:e52zM9qEGHA.1736=
@TK2MSFTNGP14.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi, David.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your=20
reply.<BR></FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV></FONT><FONT face=3DArial size=3D2>&gt; Do you know who write the =
mapping=20
windows before this driver loaded? Is it BIOS or PCIBUS?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>&gt;&gt; As for any PC compliant with =
Microsoft's=20
recommendation for PCI-to-PCI and CardBus bridges (see </FONT><A=20
href=3D"http://www.microsoft.com/whdc/archive/cardbus1.mspx"><FONT =
face=3DArial=20
=
size=3D2>http://www.microsoft.com/whdc/archive/cardbus1.mspx</FONT></A><F=
ONT=20
face=3DArial size=3D2>&nbsp;and </FONT><A=20
=
href=3D"http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.ms=
px"><FONT=20
face=3DArial=20
=
size=3D2>http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.m=
spx</FONT></A><FONT=20
face=3DArial size=3D2>), the <STRONG>BIOS</STRONG> configures the =
CardBus Bridge=20
(TI1410) with one 4KB memory window, one 64MB memory window and two =
256B I/O=20
windows.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>All PCI configuration is made by the =
BIOS, and=20
only by the BIOS (i.e. NoConfig=3D1)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>My CEPC is an embedded device (mainly =
used in=20
busses and cars) but is also a very compatible PC. It is not intended =
to run=20
*only* under CE and some customers use it with other popular OS=20
like&nbsp;Linux or XP/XPE. XP/XPE won't be able to use the TI1410 if =
this=20
CardBus Bridge is not configured as mentioned before (one 4KB memory =
window,=20
then one 64MB memory window), so my platform's BIOS configures the =
memory=20
windows as asked by Microsoft.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As far as I could understand, the =
code in=20
TIPCCARD does not specially assume that PCIBUS did the PCI =
configuration. In=20
CPCCardBusBridge::InitCardBusBridge, it checks for previously made=20
initializations and respects them. In =
CPCCardBusBridge::SetupWindowResources,=20
it searches for *two* I/O and *two* memory windows (by the way, what =
is the=20
justification for the windows invalidation that follows detection?) =
and when=20
CCardBusResource::CCardBusResource is called, it is given all the =
information=20
in a DDKWINDOWINFO structure:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>dwi.dwNumIoWindows =3D 2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[0].dwBase =3D =
0x1000&nbsp;=20
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[0].dwLength =3D=20
0x100</FONT></DIV></FONT></DIV></FONT><FONT face=3DArial =
size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[1].dwBase =3D 0x1400=20
<DIV><FONT face=3DArial size=3D2>dwi.ioWindows[1].dwLength =3D=20
0x100</FONT></DIV></FONT></DIV></FONT></DIV>dwi.dwNumMemWindows =3D=20
2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[0].dwBase =3D =
0x80000000=20
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[0].dwLength =3D=20
0x1000</FONT></DIV></FONT></DIV></FONT><FONT face=3DArial =
size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[1].dwBase&nbsp; =3D =
0x84000000=20
<DIV><FONT face=3DArial size=3D2>dwi.memWindows[1].dwLength =3D=20
0x4000000</FONT></DIV></FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The code in =
CCardBusResource::CCardBusResource=20
ignores the fact that 2 memory windows exist and that 2 I/O windows =
exists,=20
but the code in CResourceMgr::AllocateResource does =
not!!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I will soon&nbsp;work on a clean fix =
and keep you=20
in touch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- <BR>Remi de =
Gravelaine<BR>gravelaine at aton=20
dash sys dot fr</DIV></DIV></DIV></BLOCKQUOTE></FONT></BODY></HTML>

------=_NextPart_000_0017_01C612AE.A481D760--


Re: Another bug in TIPCCARD (CE 5.0) by David

David
Fri Jan 06 12:50:26 CST 2006

Every case is different. Can you turn on debug zone on pcc_tipccard.dll to
find out why?

David Liao.

"david" <dajun.chen@gmail.com> wrote in message
news:1136546859.988352.293200@f14g2000cwb.googlegroups.com...
Hi folks,

I am struggling in find a PCI to PCCARD bridge card supported by Wince
5.0 to allow me to testing my PCMCIA device drivers. I've bought
several card (ti1410/1420, ene 1400, ricoh) and none of them works
properly under CE (all works well under XP).

After adding VID and DID to the TIPCCARD.reg, the ti cards are
recognized (seen in registry), but does nothing when a PCMCIA card
inserted to the socket(s), even power was not switched on.

Similar to TIs, power to pcmcia card was switched on and never off
after card inserted.

WinCE does not recognise the ENE ones at all.

Your advices will be high appreciated.

Regards

David


Rémi de Gravelaine wrote:
> Hi, David.
>
> Thanks for your reply.
>
> > Do you know who write the mapping windows before this driver loaded? Is
> > it BIOS or PCIBUS?
>
> >> As for any PC compliant with Microsoft's recommendation for PCI-to-PCI
> >> and CardBus bridges (see
> >> http://www.microsoft.com/whdc/archive/cardbus1.mspx and
> >> http://www.microsoft.com/whdc/system/bus/PCI/pcibridge-cardbus.mspx),
> >> the BIOS configures the CardBus Bridge (TI1410) with one 4KB memory
> >> window, one 64MB memory window and two 256B I/O windows.
>
> All PCI configuration is made by the BIOS, and only by the BIOS (i.e.
> NoConfig=1)
> My CEPC is an embedded device (mainly used in busses and cars) but is also
> a very compatible PC. It is not intended to run *only* under CE and some
> customers use it with other popular OS like Linux or XP/XPE. XP/XPE won't
> be able to use the TI1410 if this CardBus Bridge is not configured as
> mentioned before (one 4KB memory window, then one 64MB memory window), so
> my platform's BIOS configures the memory windows as asked by Microsoft.
>
> As far as I could understand, the code in TIPCCARD does not specially
> assume that PCIBUS did the PCI configuration. In
> CPCCardBusBridge::InitCardBusBridge, it checks for previously made
> initializations and respects them. In
> CPCCardBusBridge::SetupWindowResources, it searches for *two* I/O and
> *two* memory windows (by the way, what is the justification for the
> windows invalidation that follows detection?) and when
> CCardBusResource::CCardBusResource is called, it is given all the
> information in a DDKWINDOWINFO structure:
>
> dwi.dwNumIoWindows = 2
> dwi.ioWindows[0].dwBase = 0x1000
> dwi.ioWindows[0].dwLength = 0x100
> dwi.ioWindows[1].dwBase = 0x1400
> dwi.ioWindows[1].dwLength = 0x100
> dwi.dwNumMemWindow