Re: WMMX registers mangled after a context switch
- From: "Barry Bond [MSFT]" <barrybo@xxxxxxxxxxxxx>
- Date: Mon, 26 Feb 2007 19:51:17 -0800
MMX registers are aliases for the x86 FPU registers, and should be automatically context-switched.
Are you trying to use SSE and not MMX?
Barry
"Ross Jordan [MSFT]" <ross.nospam.jordan@xxxxxxxxxxxxx> wrote in message news:45e3611f$1@xxxxxxxxxxxxxxxxxxxxx
If neither kernel nor BSP saves your registers on a context switch, there's not much you can do from usermode to save them. There's really no way for a user app to know when its going to be context switched. Any other threads on the system should be in a similar situation. If you can rebuild your BSP, see if setting the BSP_COPROCSUPPORT=1 flag helps out..
-Ross
"Ilya Konstantinov" <ilya.konstantinov@xxxxxxxxx> wrote in message news:1172483380.733253.185590@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxRoss, thanks for the answer.
Perhaps my post shouldn't have been directed to this newsgroup, since
we're not the OEM but rather an application developer. We're
developing for a (yet-unreleased) device running PXA270, which the OEM
preloads with a valid ROM kernel.
My point was that Windows Media Player on this device somehow manages
to save WMMX registers over context switches. Can WMP, a user-level
application, somehow hook into the kernel to do just that?
Saving the registers is something I've assumed to be the kernel's
responsibility. You've pointed me to a function which the OEM should
implement while linking his kernel. More over, this function is
intended for vendor-specific debug registers, not for something as
standardized as WMMX. Are you sure this is the right track?
On Feb 26, 8:50 am, "Ross Jordan [MSFT]"
<ross.nospam.jor...@xxxxxxxxxxxxx> wrote:
I'm not a BSP expert, but I believe you want to look at
pOEMSaveCoProcRegister / pOEMRestoreCoProcRegister called by scheduler
during context switch and the BSP flag: BSP_COPROCSUPPORT which may turn
this on/off depending on the BSP.
"Ilya Konstantinov" <ilya.konstanti...@xxxxxxxxx> wrote in message news:1172426064.211247.173320@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> We've been writing a graphically-intense application for Windows
> Mobile 5, and to speed it up we've been using the WMMX instruction
> set. It indeed gave us quite a performance boost, but soon enough we
> found out that with any concurrent WMMX-using process will step over
> our WMMX registers ... and the context switch back to our program
> won't restore them!
- Follow-Ups:
- Re: WMMX registers mangled after a context switch
- From: Barry Bond [MSFT]
- Re: WMMX registers mangled after a context switch
- References:
- WMMX registers mangled after a context switch
- From: Ilya Konstantinov
- Re: WMMX registers mangled after a context switch
- From: Ross Jordan [MSFT]
- Re: WMMX registers mangled after a context switch
- From: Ilya Konstantinov
- Re: WMMX registers mangled after a context switch
- From: Ross Jordan [MSFT]
- WMMX registers mangled after a context switch
- Prev by Date: Re: Control Play and Pause from Audio driver
- Next by Date: DeviceIOControl problem data exchange between ap and driver
- Previous by thread: Re: WMMX registers mangled after a context switch
- Next by thread: Re: WMMX registers mangled after a context switch
- Index(es):
Relevant Pages
|
Loading