]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
Update the comments.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadMsr64.c
CommitLineData
e1f414b6 1/** @file\r
2 AsmReadMsr64 function\r
3\r
4 Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
5 All rights reserved. This program and the accompanying materials\r
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
15//\r
16// Include common header file for this module.\r
17//\r
f734a10a 18\r
e1f414b6 19\r
42eedea9 20/**\r
21 Returns a 64-bit Machine Specific Register(MSR).\r
22\r
23 Reads and returns the 64-bit MSR specified by Index. No parameter checking is\r
24 performed on Index, and some Index values may cause CPU exceptions. The\r
25 caller must either guarantee that Index is valid, or the caller must set up\r
26 exception handlers to catch the exceptions. This function is only available\r
27 on IA-32 and X64.\r
28\r
29 @param Index The 32-bit MSR index to read.\r
30\r
31 @return The value of the MSR identified by Index.\r
32\r
33**/\r
e1f414b6 34UINT64\r
35EFIAPI\r
36AsmReadMsr64 (\r
37 IN UINT32 Index\r
38 )\r
39{\r
40 _asm {\r
41 mov ecx, Index\r
42 rdmsr\r
43 }\r
44}\r
45\r