]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | AsmReadGdtr 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 | |
47fc17d8 | 9 | #include "BaseLibInternals.h"\r |
f734a10a | 10 | \r |
42eedea9 | 11 | /**\r |
12 | Reads the current Global Descriptor Table Register(GDTR) descriptor.\r | |
13 | \r | |
14 | Reads and returns the current GDTR descriptor and returns it in Gdtr. This\r | |
030cd1a2 | 15 | function is only available on IA-32 and x64.\r |
42eedea9 | 16 | \r |
2fc59a00 | 17 | @param Gdtr The pointer to a GDTR descriptor.\r |
42eedea9 | 18 | \r |
19 | **/\r | |
e1f414b6 | 20 | VOID\r |
21 | EFIAPI\r | |
22 | InternalX86ReadGdtr (\r | |
23 | OUT IA32_DESCRIPTOR *Gdtr\r | |
24 | )\r | |
25 | {\r | |
26 | _asm {\r | |
27 | mov eax, Gdtr\r | |
28 | sgdt fword ptr [eax]\r | |
29 | }\r | |
30 | }\r |