]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | AsmReadCr0 function\r | |
3 | \r | |
e837e22a | 4 | Copyright (c) 2006 - 2014, 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 | Reads the current value of the Control Register 0 (CR0).\r | |
11 | \r | |
e837e22a | 12 | Reads and returns the current value of CR0. This function is only available\r |
030cd1a2 | 13 | on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on\r |
14 | x64.\r | |
42eedea9 | 15 | \r |
16 | @return The value of the Control Register 0 (CR0).\r | |
17 | \r | |
18 | **/\r | |
e1f414b6 | 19 | UINTN\r |
20 | EFIAPI\r | |
21 | AsmReadCr0 (\r | |
22 | VOID\r | |
23 | )\r | |
24 | {\r | |
25 | __asm {\r | |
26 | mov eax, cr0\r | |
27 | }\r | |
28 | }\r |