]>
Commit | Line | Data |
---|---|---|
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 | |
1efcc4ae | 9 | \r |
f734a10a | 10 | \r |
e1f414b6 | 11 | \r |
42eedea9 | 12 | /**\r |
13 | Writes the current Local Descriptor Table Register (GDTR) selector.\r | |
14 | \r | |
15 | Writes and the current LDTR descriptor specified by Ldtr. This function is\r | |
030cd1a2 | 16 | only available on IA-32 and x64.\r |
42eedea9 | 17 | \r |
18 | @param Ldtr 16-bit LDTR selector value.\r | |
19 | \r | |
20 | **/\r | |
e1f414b6 | 21 | VOID\r |
22 | EFIAPI\r | |
23 | AsmWriteLdtr (\r | |
24 | IN UINT16 Ldtr\r | |
25 | )\r | |
26 | {\r | |
27 | _asm {\r | |
28 | xor eax, eax\r | |
29 | mov ax, Ldtr\r | |
30 | lldt ax\r | |
31 | }\r | |
32 | }\r | |
33 | \r |