]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/CpuMpPei: Load GDT table on BSP
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuMpPei.h
1 /** @file
2 Definitions to install Multiple Processor PPI.
3
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _CPU_MP_PEI_H_
16 #define _CPU_MP_PEI_H_
17
18 #include <PiPei.h>
19
20
21 #include <Library/BaseLib.h>
22 #include <Library/PeimEntryPoint.h>
23
24 #pragma pack(1)
25 typedef union {
26 struct {
27 UINT32 LimitLow : 16;
28 UINT32 BaseLow : 16;
29 UINT32 BaseMid : 8;
30 UINT32 Type : 4;
31 UINT32 System : 1;
32 UINT32 Dpl : 2;
33 UINT32 Present : 1;
34 UINT32 LimitHigh : 4;
35 UINT32 Software : 1;
36 UINT32 Reserved : 1;
37 UINT32 DefaultSize : 1;
38 UINT32 Granularity : 1;
39 UINT32 BaseHigh : 8;
40 } Bits;
41 UINT64 Uint64;
42 } IA32_GDT;
43 #pragma pack()
44 /**
45 Assembly code to load GDT table and update segment accordingly.
46
47 @param Gdtr Pointer to GDT descriptor
48 **/
49 VOID
50 EFIAPI
51 AsmInitializeGdt (
52 IN IA32_DESCRIPTOR *Gdtr
53 );
54
55
56 #endif