To Guru.
How to find OEMAddressTable for Emulator and ARM?
Best Regard.

Re: How to find address of OEMAddressTable? by K

K
Fri May 28 09:06:06 CDT 2004

in OAL you could use the following declartion

typedef struct {
DWORD dwVA;
DWORD dwPA;
DWORD dwSize;
} PTE, *PPTE;

extern PPTE g_pOEMAddressTable;

the g_pOEMAddressTable is a pointer point to an OEMAddresstable that kernel
currently use.

If in user-mode app or driver, I think you may write your own OEM OAL IOCTL
code to give the address of g_pOEMAddressTable to user-mode.

"msnews.microsoft.com" <preedee.p@eprofessional.co.th> ¼¶¼g©ó¶l¥ó·s»D
:u#3RdSLREHA.4020@TK2MSFTNGP11.phx.gbl...
> To Guru.
> How to find OEMAddressTable for Emulator and ARM?
> Best Regard.
>
>
>



Re: How to find address of OEMAddressTable? by msnews

msnews
Fri May 28 19:54:08 CDT 2004

thx a lot sir.
i developing in user mode , how can i write my own OEM_OAL_IOCTL? can u
example for me?
best regard.
"K. S. Huang" <ks_huang@dlink.com.tw.remove.this> wrote in message
news:uccmoyLREHA.2404@TK2MSFTNGP09.phx.gbl...
> in OAL you could use the following declartion
>
> typedef struct {
> DWORD dwVA;
> DWORD dwPA;
> DWORD dwSize;
> } PTE, *PPTE;
>
> extern PPTE g_pOEMAddressTable;
>
> the g_pOEMAddressTable is a pointer point to an OEMAddresstable that
kernel
> currently use.
>
> If in user-mode app or driver, I think you may write your own OEM OAL
IOCTL
> code to give the address of g_pOEMAddressTable to user-mode.
>
> "msnews.microsoft.com" <preedee.p@eprofessional.co.th> ¼¶¼g©ó¶l¥ó·s»D
> :u#3RdSLREHA.4020@TK2MSFTNGP11.phx.gbl...
> > To Guru.
> > How to find OEMAddressTable for Emulator and ARM?
> > Best Regard.
> >
> >
> >
>
>



Re: How to find address of OEMAddressTable? by Bruce

Bruce
Fri May 28 21:09:23 CDT 2004

Try looking at the kernel source code. OEMIoControl

--
Bruce Eitman (eMVP)
Senior Engineer




Re: How to find address of OEMAddressTable? by msnews

msnews
Fri May 28 23:26:14 CDT 2004

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
>
>
>



Re: How to find address of OEMAddressTable? by K

K
Sat May 29 07:02:14 CDT 2004

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
> >
> >
> >
>
>



Re: How to find address of OEMAddressTable? by Steve

Steve
Sat May 29 08:12:44 CDT 2004

This goes back to the question- What are you trying to do? Why in the world
do you think you need the PHYSICAL address of a function? (NOTE: Windows CE
uses demand paging so the physical address is NOT necessarily constant.)

--
Steve Maillet (eMVP)
EmbeddedFusion
smaillet_AT_EmbeddedFusion_DOT_com



Re: How to find address of OEMAddressTable? by Bruce

Bruce
Sat May 29 08:53:59 CDT 2004

Pointing out that you don't have the tool that the newsgroup is dedicated to
using should have been in your first post and probably every post. The
answers up to now have assumed that you had Platform Builder. What tool are
you using?

Now answer Steve Maillet's question.

--
Bruce Eitman (eMVP)
Senior Engineer




Re: How to find address of OEMAddressTable? by K

K
Sat May 29 09:13:45 CDT 2004

Sorry, in user-mode, I just find out taht
you may use the LockPages API to query its physical address...

"K. S. Huang" <ks_huang@dlink.com.tw.remove.this> ¼¶¼g©ó¶l¥ó·s»D
:#um4QSXREHA.3616@TK2MSFTNGP11.phx.gbl...
> 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
> > >
> > >
> > >
> >
> >
>
>



Re: How to find address of OEMAddressTable? by msnews

msnews
Sat May 29 22:40:03 CDT 2004

to guru

i using EVC and Standard SmartPhone SDK sir, for question about my doing
.can i tell me at email?
my email is nick@phiyada.com (if you wanna secret about your email may be
you can send email to me first and i will reply to you again)

best regard.


"Bruce Eitman (eMVP)" <beitmannospam@nospam.neo.rr.com> wrote in message
news:#M6HpRYREHA.1448@TK2MSFTNGP11.phx.gbl...
> Pointing out that you don't have the tool that the newsgroup is dedicated
to
> using should have been in your first post and probably every post. The
> answers up to now have assumed that you had Platform Builder. What tool
are
> you using?
>
> Now answer Steve Maillet's question.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
>
>
>



Re: How to find address of OEMAddressTable? by Steve

Steve
Sun May 30 11:23:25 CDT 2004

You still haven't answered the fundamental question of What you are trying
to accomplish in the big picture. It's rather complex to get a known fixed
physical address for executable code. But that is because you really
shouldn't need to. Even if you knew the address you couldn't do anything
with it. You can't execute it directly as the CPU and OS protection
mechanisms will prevent it. But even without that the code would have been
fixed up by the loader to execute from it's VIRTUAL address so the Physical
address is of little or no value.

--
Steve Maillet (eMVP)
EmbeddedFusion
smaillet_AT_EmbeddedFusion_DOT_com