]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/X64/ReadMsr64.nasm
df692552915c29bc99a4a7854ba1501b8b2c03ef
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / ReadMsr64.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; ReadMsr64.Asm
9 ;
10 ; Abstract:
11 ;
12 ; AsmReadMsr64 function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 DEFAULT REL
19 SECTION .text
20
21 ;------------------------------------------------------------------------------
22 ; UINT64
23 ; EFIAPI
24 ; AsmReadMsr64 (
25 ; IN UINT32 Index
26 ; );
27 ;------------------------------------------------------------------------------
28 global ASM_PFX(AsmReadMsr64)
29 ASM_PFX(AsmReadMsr64):
30 rdmsr ; edx & eax are zero extended
31 shl rdx, 0x20
32 or rax, rdx
33 ret
34