]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/WriteLdtr.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteLdtr.c
CommitLineData
e1f414b6 1/** @file\r
2 AsmWriteLdtr function\r
3\r
bb817c56 4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
e1f414b6 6\r
7**/\r
8\r
42eedea9 9/**\r
10 Writes the current Local Descriptor Table Register (GDTR) selector.\r
11\r
12 Writes and the current LDTR descriptor specified by Ldtr. This function is\r
030cd1a2 13 only available on IA-32 and x64.\r
42eedea9 14\r
15 @param Ldtr 16-bit LDTR selector value.\r
16\r
17**/\r
e1f414b6 18VOID\r
19EFIAPI\r
20AsmWriteLdtr (\r
2f88bd3a 21 IN UINT16 Ldtr\r
e1f414b6 22 )\r
23{\r
24 _asm {\r
25 xor eax, eax\r
26 mov ax, Ldtr\r
27 lldt ax\r
28 }\r
29}\r