]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/WriteCr2.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteCr2.c
CommitLineData
e1f414b6 1/** @file\r
2 AsmWriteCr2 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 2 (CR2).\r
11\r
12 Writes and returns a new value to CR2. 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 CR2.\r
42eedea9 16\r
17 @return The value written to CR2.\r
18\r
19**/\r
e1f414b6 20UINTN\r
21EFIAPI\r
22AsmWriteCr2 (\r
23 UINTN Value\r
24 )\r
25{\r
26 _asm {\r
27 mov eax, Value\r
28 mov cr2, eax\r
29 }\r
30}\r