]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/ReadLdtr.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadLdtr.c
1 /** @file
2 AsmReadLdtr 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 Reads the current Local Descriptor Table Register(LDTR) selector.
14
15 Reads and returns the current 16-bit LDTR descriptor value. This function is
16 only available on IA-32 and x64.
17
18 @return The current selector of LDT.
19
20 **/
21 UINT16
22 EFIAPI
23 AsmReadLdtr (
24 VOID
25 )
26 {
27 _asm {
28 sldt ax
29 }
30 }
31