]>
Commit | Line | Data |
---|---|---|
65e79f93 JF |
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> | |
05e107f8 | 22 | #include <Library/HobLib.h> |
65e79f93 JF |
23 | #include <Library/PeimEntryPoint.h> |
24 | ||
f9d30595 | 25 | #pragma pack(1) |
a56f6f45 | 26 | |
f9d30595 JF |
27 | typedef union { |
28 | struct { | |
29 | UINT32 LimitLow : 16; | |
30 | UINT32 BaseLow : 16; | |
31 | UINT32 BaseMid : 8; | |
32 | UINT32 Type : 4; | |
33 | UINT32 System : 1; | |
34 | UINT32 Dpl : 2; | |
35 | UINT32 Present : 1; | |
36 | UINT32 LimitHigh : 4; | |
37 | UINT32 Software : 1; | |
38 | UINT32 Reserved : 1; | |
39 | UINT32 DefaultSize : 1; | |
40 | UINT32 Granularity : 1; | |
41 | UINT32 BaseHigh : 8; | |
42 | } Bits; | |
43 | UINT64 Uint64; | |
44 | } IA32_GDT; | |
a56f6f45 JF |
45 | |
46 | // | |
47 | // MP CPU exchange information for AP reset code | |
48 | // | |
49 | typedef struct { | |
50 | UINTN Lock; | |
51 | UINTN StackStart; | |
52 | UINTN StackSize; | |
53 | UINTN CFunction; | |
54 | IA32_DESCRIPTOR GdtrProfile; | |
55 | IA32_DESCRIPTOR IdtrProfile; | |
56 | UINTN BufferStart; | |
57 | UINTN PmodeOffset; | |
58 | UINTN NumApsExecuting; | |
59 | UINTN LmodeOffset; | |
60 | UINTN Cr3; | |
61 | } MP_CPU_EXCHANGE_INFO; | |
62 | ||
f9d30595 JF |
63 | #pragma pack() |
64 | /** | |
65 | Assembly code to load GDT table and update segment accordingly. | |
66 | ||
67 | @param Gdtr Pointer to GDT descriptor | |
68 | **/ | |
69 | VOID | |
70 | EFIAPI | |
71 | AsmInitializeGdt ( | |
72 | IN IA32_DESCRIPTOR *Gdtr | |
73 | ); | |
65e79f93 JF |
74 | |
75 | ||
76 | #endif |