/* Writes and returns a new value to CR2. This function is only available on IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64. */
UINTN EFIAPI AsmWriteCr2(UINTN Value)
/* Writes and returns a new value to CR2. This function is only available on IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64. */
UINTN EFIAPI AsmWriteCr2(UINTN Value)
{
  _asm {
    mov     eax, Value
    mov     cr2, eax
  }
}