]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/WriteCr4.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteCr4.c
CommitLineData
e1f414b6 1/** @file\r
2 AsmWriteCr4 function\r
3\r
bb817c56 4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
e1f414b6 6\r
7**/\r
8\r
42eedea9 9/**\r
10 Writes a value to Control Register 4 (CR4).\r
11\r
12 Writes and returns a new value to CR4. This function is only available on\r
030cd1a2 13 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.\r
42eedea9 14\r
44b013bd 15 @param Value The value to write to CR4.\r
42eedea9 16\r
17 @return The value written to CR4.\r
18\r
19**/\r
e1f414b6 20UINTN\r
21EFIAPI\r
22AsmWriteCr4 (\r
23 UINTN Value\r
24 )\r
25{\r
26 _asm {\r
27 mov eax, Value\r
28 _emit 0x0f // mov cr4, eax\r
29 _emit 0x22\r
30 _emit 0xE0\r
31 }\r
32}\r