]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/WriteCr4.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteCr4.c
CommitLineData
e1f414b6 1/** @file\r
2 AsmWriteCr4 function\r
3\r
bb817c56
HT
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
e1f414b6 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
42eedea9 15/**\r
16 Writes a value to Control Register 4 (CR4).\r
17\r
18 Writes and returns a new value to CR4. This function is only available on\r
030cd1a2 19 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.\r
42eedea9 20\r
44b013bd 21 @param Value The value to write to CR4.\r
42eedea9 22\r
23 @return The value written to CR4.\r
24\r
25**/\r
e1f414b6 26UINTN\r
27EFIAPI\r
28AsmWriteCr4 (\r
29 UINTN Value\r
30 )\r
31{\r
32 _asm {\r
33 mov eax, Value\r
34 _emit 0x0f // mov cr4, eax\r
35 _emit 0x22\r
36 _emit 0xE0\r
37 }\r
38}\r
39\r