dwNKCoProcEnableBits (Windows Embedded CE 6.0)

1/5/2010

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

Syntax

extern DWORD dwNKCoProcEnableBits;

Parameters

None.

Return Value

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, use OR on the dwNKCoProcEnableBits bits during OEMInit.

dwNKCoProcEnableBits |= MyCoProEnableBit;

The only value 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, so there is no additional context that must 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

Header Developer Implemented
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Optional OAL Variables
OEMInit