2 Definitions to install Multiple Processor PPI.
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
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.
15 #ifndef _CPU_MP_PEI_H_
16 #define _CPU_MP_PEI_H_
20 #include <Ppi/SecPlatformInformation.h>
22 #include <Library/BaseLib.h>
23 #include <Library/BaseMemoryLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/HobLib.h>
26 #include <Library/LocalApicLib.h>
27 #include <Library/PcdLib.h>
28 #include <Library/PeimEntryPoint.h>
29 #include <Library/PeiServicesLib.h>
30 #include <Library/SynchronizationLib.h>
31 #include <Library/TimerLib.h>
32 #include <Library/UefiCpuLib.h>
43 // AP reset code information
46 UINT8
*RendezvousFunnelAddress
;
47 UINTN PModeEntryOffset
;
48 UINTN LModeEntryOffset
;
49 UINTN RendezvousFunnelSize
;
50 } MP_ASSEMBLY_ADDRESS_MAP
;
52 typedef struct _PEI_CPU_MP_DATA PEI_CPU_MP_DATA
;
68 UINT32 DefaultSize
: 1;
69 UINT32 Granularity
: 1;
76 // MP CPU exchange information for AP reset code
83 IA32_DESCRIPTOR GdtrProfile
;
84 IA32_DESCRIPTOR IdtrProfile
;
87 UINTN NumApsExecuting
;
90 PEI_CPU_MP_DATA
*PeiCpuMpData
;
91 } MP_CPU_EXCHANGE_INFO
;
97 EFI_HEALTH_FLAGS Health
;
103 // PEI CPU MP Data save in memory
105 struct _PEI_CPU_MP_DATA
{
109 UINTN CpuApStackSize
;
110 MP_ASSEMBLY_ADDRESS_MAP AddressMap
;
113 UINTN BackupBufferSize
;
115 UINTN ApFunctionArgument
;
116 volatile UINT32 FinishedCount
;
118 PEI_CPU_DATA
*CpuData
;
119 volatile MP_CPU_EXCHANGE_INFO
*MpCpuExchangeInfo
;
123 Assembly code to get starting address and size of the rendezvous entry for APs.
124 Information for fixing a jump instruction in the code is also returned.
126 @param AddressMap Output buffer for address map information.
131 OUT MP_ASSEMBLY_ADDRESS_MAP
*AddressMap
135 Assembly code to load GDT table and update segment accordingly.
137 @param Gdtr Pointer to GDT descriptor
142 IN IA32_DESCRIPTOR
*Gdtr