mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-05 13:33:33 +01:00
35 lines
834 B
NASM
35 lines
834 B
NASM
|
;------------------------------------------------------------------------------
|
||
|
;
|
||
|
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||
|
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
||
|
;
|
||
|
; Module Name:
|
||
|
;
|
||
|
; ReadMsr64.Asm
|
||
|
;
|
||
|
; Abstract:
|
||
|
;
|
||
|
; AsmReadMsr64 function
|
||
|
;
|
||
|
; Notes:
|
||
|
;
|
||
|
;------------------------------------------------------------------------------
|
||
|
|
||
|
DEFAULT REL
|
||
|
SECTION .text
|
||
|
|
||
|
;------------------------------------------------------------------------------
|
||
|
; UINT64
|
||
|
; EFIAPI
|
||
|
; AsmReadMsr64 (
|
||
|
; IN UINT32 Index
|
||
|
; );
|
||
|
;------------------------------------------------------------------------------
|
||
|
global ASM_PFX(AsmReadMsr64)
|
||
|
ASM_PFX(AsmReadMsr64):
|
||
|
rdmsr ; edx & eax are zero extended
|
||
|
shl rdx, 0x20
|
||
|
or rax, rdx
|
||
|
ret
|
||
|
|