CloverBootloader/MdePkg/Library/BaseLib/Ia32/WriteIdtr.nasm

36 lines
832 B
NASM
Raw Normal View History

;------------------------------------------------------------------------------
;
; Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; WriteIdtr.Asm
;
; Abstract:
;
; AsmWriteIdtr function
;
; Notes:
;
;------------------------------------------------------------------------------
SECTION .text
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; InternalX86WriteIdtr (
; IN CONST IA32_DESCRIPTOR *Idtr
; );
;------------------------------------------------------------------------------
global ASM_PFX(InternalX86WriteIdtr)
ASM_PFX(InternalX86WriteIdtr):
mov eax, [esp + 4]
pushfd
cli
lidt [eax]
popfd
ret