-
Notifications
You must be signed in to change notification settings - Fork 98
WRPKRU
WRPKRU — Write Data to User Page Key Register
Opcode* | Instruction | Op/ En | 64/32bit Mode Support | CPUID Feature Flag | Description |
NP 0F 01 EF | WRPKRU | ZO | V/V | OSPKE | Writes EAX into PKRU. |
Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
ZO | NA | NA | NA | NA |
Writes the value of EAX into PKRU. ECX and EDX must be 0 when WRPKRU is executed; otherwise, a general- protection exception (#GP) occurs.
WRPKRU can be executed only if CR4.PKE = 1; otherwise, an invalid-opcode exception (#UD) occurs. Software can discover the value of CR4.PKE by examining CPUID.(EAX=07H,ECX=0H):ECX.OSPKE [bit 4].
On processors that support the Intel 64 Architecture, the high-order 32-bits of RCX, RDX and RAX are ignored.
IF (ECX = 0 AND EDX = 0)
THEN PKRU ← EAX;
ELSE #GP(0);
FI;
None.
WRPKRU:
void _wrpkru(uint32_t);
If ECX ≠ 0.
#GP(0) If EDX ≠ 0.
#UD If the LOCK prefix is used. If CR4.PKE = 0.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Source: Intel® Architecture Software Developer's Manual (May 2018)
Generated: 5-6-2018