Re: How to find address of OEMAddressTable?

From: K. S. Huang (ks_huang_at_dlink.com.tw.remove.this)
Date: 05/29/04


Date: Sat, 29 May 2004 20:02:14 +0800

if you are writing a NDIS driver, you may use the
NdisMStartBufferPhysicalMapping to translate the NDIS Buffer Virtual Address
to Physical Address for DMA controller.

But for other drivers or User-Mode APPs, there is no equivlant funtion!!

But if you do need this feature, there might be a way to do that...
WinCE User-Mode virtual address space is 2GB split into 64 32M sections of
512 64K blocks of 16 4K pages.

 Virtual address format:
  3322222 222221111 1111 110000000000
  1098765 432109876 5432 109876543210
  zSSSSSS BBBBBBBBB PPPP oooooooooooo

And the kernel will keep a SectionTable that maintain all of the info. for
the VA and Phy.
So you could walk through the SectionTable to find out the mapping
relationship of a specific VA.
In user mode, you can access the SectionTable by accessing the Section table
pointer "UserKInfo[KINX_SECTIONS]".

for further infomation, you may refer the source code of ce-shell that under
$(_WINCEROOT)\PRIVATE\WINCEOS\COREOS\SHELL\shell.c

"msnews.microsoft.com" <preedee.p@eprofessional.co.th> ¼¶¼g©ó¶l¥ó·s»D
:#m9LVUTREHA.1644@TK2MSFTNGP09.phx.gbl...
> to guru
>
> if i wanna convert pointer of my function to physical address , is it
> possible? how can i do? but i don't have platform builder
> ex.
> LPVOID x = GetPhysicalAddress(MyFunction);
>
> best regard.
> if you have way may be you can send detail to me at nick@phiyada.com
>
> "Bruce Eitman (eMVP)" <beitmannospam@nospam.neo.rr.com> wrote in message
> news:uzhLpHSREHA.1448@TK2MSFTNGP11.phx.gbl...
> > Try looking at the kernel source code. OEMIoControl
> >
> > --
> > Bruce Eitman (eMVP)
> > Senior Engineer
> >
> >
> >
>
>