]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | AsmReadPmc function\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | **/\r | |
8 | \r | |
9 | /**\r | |
10 | Reads the current value of a Performance Counter (PMC).\r | |
11 | \r | |
12 | Reads and returns the current value of performance counter specified by\r | |
13 | Index. This function is only available on IA-32 and x64.\r | |
14 | \r | |
15 | @param Index The 32-bit Performance Counter index to read.\r | |
16 | \r | |
17 | @return The value of the PMC specified by Index.\r | |
18 | \r | |
19 | **/\r | |
20 | UINT64\r | |
21 | EFIAPI\r | |
22 | AsmReadPmc (\r | |
23 | IN UINT32 Index\r | |
24 | )\r | |
25 | {\r | |
26 | _asm {\r | |
27 | mov ecx, Index\r | |
28 | rdpmc\r | |
29 | }\r | |
30 | }\r | |
31 | \r |