Hi Microsoft Team,

I'm working at the moment with ISA PnP board. under CEPC_x86 platform.
In order to read some configuration data from the board i'm maping an IO
area to virtual memory

if (TransBusAddrToVirtual( PNPISABus, 0, sAddress, (ULONG)dwSize,
&ulAddressSpace, &(pBoardPtr)) == FALSE)
{
return GetLastError();
}

the result of operation seems to be succesful (ulAddressSpace = 0), but if
it try to read a data from the board
by usin a "pBoardPtr" i have completly wrong data & if i try to ummap the
memory with

MmUnmapIoSpace( pSysPtr, dwSize );

i'm getting an exception "0xC0000005".
This allways happens under CE 4.1 & CE 4.2, if I/O address is 0xE3800. As
long as I/O adress of the PnP Boad is 0xD8000
everything works fine.

Any comments? Could it be a bug in TransBusAddrToVirtual?

Maxim Weber
Sohard AG

Re: Bug in TransBusAddrToVirtual?! by Steve

Steve
Tue Jan 13 06:26:14 CST 2004

You don't show what ulAddressSpace is before calling TransBusAddrToVirtual()
Is the hardware register you want to read in I/O Space? (Probably is on an
ISA BUS) so you will want to set ulAddressSpace=1 before calling the
translate function. You only need MmUnmapIoSpace() if ulAddressSpace is set
to 0 after the call to TransBusAddrToVirtual(). (If you give it 0 as the
address space it will ALWAYS be 0 after the call. The ONLY time it MIGHT
change is if you specify the address is in I/O space for the bus as non x86
processors don't have a separate instruction set for a separate I/O bus.)

--
Steve Maillet (eMVP)
Entelechy Consulting
smaillet_AT_EntelechyConsulting_DOT_com



Re: Bug in TransBusAddrToVirtual?! by Maxim

Maxim
Wed Jan 14 03:57:43 CST 2004

Well... The variable "ulAddressSpace" has a value a "0x0" before a call of
TransBusAddrToVirtual().
Could you explain, why it works if address is 0xD8000 & does NOT work if the
adress 0xE3800?

"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> schrieb im
Newsbeitrag news:%23jENzBd2DHA.2500@TK2MSFTNGP10.phx.gbl...
> You don't show what ulAddressSpace is before calling
TransBusAddrToVirtual()
> Is the hardware register you want to read in I/O Space? (Probably is on an
> ISA BUS) so you will want to set ulAddressSpace=1 before calling the
> translate function. You only need MmUnmapIoSpace() if ulAddressSpace is
set
> to 0 after the call to TransBusAddrToVirtual(). (If you give it 0 as the
> address space it will ALWAYS be 0 after the call. The ONLY time it MIGHT
> change is if you specify the address is in I/O space for the bus as non
x86
> processors don't have a separate instruction set for a separate I/O bus.)
>
> --
> Steve Maillet (eMVP)
> Entelechy Consulting
> smaillet_AT_EntelechyConsulting_DOT_com
>
>



Re: Bug in TransBusAddrToVirtual?! by Steve

Steve
Wed Jan 14 08:01:20 CST 2004

It all depends on the actual hardware design and the implementation of the
CEDDK for the platform.

--
Steve Maillet (eMVP)
Entelechy Consulting
smaillet_AT_EntelechyConsulting_DOT_com