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 <Register/LocalApic.h>
24 #include <Library/BaseLib.h>
25 #include <Library/BaseMemoryLib.h>
26 #include <Library/DebugLib.h>
27 #include <Library/HobLib.h>
28 #include <Library/LocalApicLib.h>
29 #include <Library/MtrrLib.h>
30 #include <Library/PcdLib.h>
31 #include <Library/PeimEntryPoint.h>
32 #include <Library/PeiServicesLib.h>
33 #include <Library/SynchronizationLib.h>
34 #include <Library/TimerLib.h>
35 #include <Library/UefiCpuLib.h>
37 #include "Microcode.h"
49 // AP reset code information
52 UINT8
*RendezvousFunnelAddress
;
53 UINTN PModeEntryOffset
;
54 UINTN LModeEntryOffset
;
55 UINTN RendezvousFunnelSize
;
56 } MP_ASSEMBLY_ADDRESS_MAP
;
58 typedef struct _PEI_CPU_MP_DATA PEI_CPU_MP_DATA
;
74 UINT32 DefaultSize
: 1;
75 UINT32 Granularity
: 1;
82 // MP CPU exchange information for AP reset code
89 IA32_DESCRIPTOR GdtrProfile
;
90 IA32_DESCRIPTOR IdtrProfile
;
93 UINTN NumApsExecuting
;
96 PEI_CPU_MP_DATA
*PeiCpuMpData
;
97 } MP_CPU_EXCHANGE_INFO
;
103 EFI_HEALTH_FLAGS Health
;
109 // PEI CPU MP Data save in memory
111 struct _PEI_CPU_MP_DATA
{
115 UINTN CpuApStackSize
;
116 MP_ASSEMBLY_ADDRESS_MAP AddressMap
;
119 UINTN BackupBufferSize
;
121 UINTN ApFunctionArgument
;
122 volatile UINT32 FinishedCount
;
124 MTRR_SETTINGS MtrrTable
;
125 PEI_CPU_DATA
*CpuData
;
126 volatile MP_CPU_EXCHANGE_INFO
*MpCpuExchangeInfo
;
130 Assembly code to get starting address and size of the rendezvous entry for APs.
131 Information for fixing a jump instruction in the code is also returned.
133 @param AddressMap Output buffer for address map information.
138 OUT MP_ASSEMBLY_ADDRESS_MAP
*AddressMap
142 Assembly code to load GDT table and update segment accordingly.
144 @param Gdtr Pointer to GDT descriptor
149 IN IA32_DESCRIPTOR
*Gdtr