]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BaseLib/Ia32/ReadGdtr.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadGdtr.c
... / ...
CommitLineData
1/** @file\r
2 AsmReadGdtr function\r
3\r
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9\r
10#include "BaseLibInternals.h"\r
11\r
12\r
13/**\r
14 Reads the current Global Descriptor Table Register(GDTR) descriptor.\r
15\r
16 Reads and returns the current GDTR descriptor and returns it in Gdtr. This\r
17 function is only available on IA-32 and x64.\r
18\r
19 @param Gdtr The pointer to a GDTR descriptor.\r
20\r
21**/\r
22VOID\r
23EFIAPI\r
24InternalX86ReadGdtr (\r
25 OUT IA32_DESCRIPTOR *Gdtr\r
26 )\r
27{\r
28 _asm {\r
29 mov eax, Gdtr\r
30 sgdt fword ptr [eax]\r
31 }\r
32}\r
33\r