Share via


dwNKCoProcEnableBits

This variable is specific to MIPS processors and allows an OEM to identify additional coprocessors that should be enabled and disabled when required.

extern DWORD dwNKCoProcEnableBits;

Parameters

None.

Return Values

None.

Remarks

The dwNKCoProcEnableBits variable is initialized to 0x20000000 which the kernel uses to enable and disable the Floating Point Unit (FPU) when accessed by a thread and again when the same thread switches away. If you need to enable a second coprocessor when the FPU is enabled and disabled, OR in the bits to dwNKCoProcEnableBits during OEMInit.

dwNKCoProcEnableBits |= MyCoProEnableBit;

The only value that you should enable at this time is bit [31:28], corresponding to the top 4 PSR bits, to enable co-processor 1-4 for enhanced multimedia instructions. This instruction uses the same FPU registers as the FPU instructions and therefore there is no additional context that needs to be saved. By default the FPU and multimedia instructions are disabled. When a thread executes one of these instructions, a coprocessor exception is generated. The exception is restricted to the FPU and media instructions. When the kernel traps this exception, it enables the FPU and media instructions, if required, and then restarts the faulting instruction. When the thread switches away, its context is saved only if a new thread tries to execute FPU or media instructions. This is a lazy-save and restore that cuts down on unnecessary context saves and restores.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Not applicable.

See Also

OEMInit

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.