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/MtrrLib.h>
28 #include <Library/PcdLib.h>
29 #include <Library/PeimEntryPoint.h>
30 #include <Library/PeiServicesLib.h>
31 #include <Library/SynchronizationLib.h>
32 #include <Library/TimerLib.h>
33 #include <Library/UefiCpuLib.h>
44 // AP reset code information
47 UINT8
*RendezvousFunnelAddress
;
48 UINTN PModeEntryOffset
;
49 UINTN LModeEntryOffset
;
50 UINTN RendezvousFunnelSize
;
51 } MP_ASSEMBLY_ADDRESS_MAP
;
53 typedef struct _PEI_CPU_MP_DATA PEI_CPU_MP_DATA
;
69 UINT32 DefaultSize
: 1;
70 UINT32 Granularity
: 1;
77 // MP CPU exchange information for AP reset code
84 IA32_DESCRIPTOR GdtrProfile
;
85 IA32_DESCRIPTOR IdtrProfile
;
88 UINTN NumApsExecuting
;
91 PEI_CPU_MP_DATA
*PeiCpuMpData
;
92 } MP_CPU_EXCHANGE_INFO
;
98 EFI_HEALTH_FLAGS Health
;
104 // PEI CPU MP Data save in memory
106 struct _PEI_CPU_MP_DATA
{
110 UINTN CpuApStackSize
;
111 MP_ASSEMBLY_ADDRESS_MAP AddressMap
;
114 UINTN BackupBufferSize
;
116 UINTN ApFunctionArgument
;
117 volatile UINT32 FinishedCount
;
119 MTRR_SETTINGS MtrrTable
;
120 PEI_CPU_DATA
*CpuData
;
121 volatile MP_CPU_EXCHANGE_INFO
*MpCpuExchangeInfo
;
125 Assembly code to get starting address and size of the rendezvous entry for APs.
126 Information for fixing a jump instruction in the code is also returned.
128 @param AddressMap Output buffer for address map information.
133 OUT MP_ASSEMBLY_ADDRESS_MAP
*AddressMap
137 Assembly code to load GDT table and update segment accordingly.
139 @param Gdtr Pointer to GDT descriptor
144 IN IA32_DESCRIPTOR
*Gdtr