]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/WriteLdtr.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteLdtr.c
1 /** @file
2 AsmWriteLdtr function
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9
10
11
12 /**
13 Writes the current Local Descriptor Table Register (GDTR) selector.
14
15 Writes and the current LDTR descriptor specified by Ldtr. This function is
16 only available on IA-32 and x64.
17
18 @param Ldtr 16-bit LDTR selector value.
19
20 **/
21 VOID
22 EFIAPI
23 AsmWriteLdtr (
24 IN UINT16 Ldtr
25 )
26 {
27 _asm {
28 xor eax, eax
29 mov ax, Ldtr
30 lldt ax
31 }
32 }
33