27extern EFI_GUID gEfiStandaloneMmNonSecureBufferGuid;
32extern EFI_GUID gEfiMmCpuDriverEpDescriptorGuid;
63 if ((HobList ==
NULL) || (HobGuid ==
NULL) || (HobData ==
NULL)) {
64 return EFI_INVALID_PARAMETER;
72 *HobData = GET_GUID_HOB_DATA (Hob);
73 if (*HobData ==
NULL) {
109 ASSERT (SystemTable !=
NULL);
115 &gEfiMmConfigurationProtocolGuid,
119 if (EFI_ERROR (Status)) {
124 Status = mMmst->MmiHandlerRegister (
129 if (EFI_ERROR (Status)) {
137 if (
CompareGuid (&gEfiHobListGuid, &(ConfigurationTable[Index].VendorGuid))) {
144 DEBUG ((DEBUG_ERROR,
"Hoblist not found - 0x%x\n", Index));
145 return EFI_OUT_OF_RESOURCES;
155 &gEfiMmCpuDriverEpDescriptorGuid,
156 (VOID **)&CpuDriverEntryPointDesc
158 if (EFI_ERROR (Status)) {
159 DEBUG ((DEBUG_ERROR,
"MmCpuDriverEpDesc HOB data extraction failed - 0x%x\n", Status));
166 "Sharing Cpu Driver EP *0x%lx = 0x%lx\n",
167 (
UINTN)CpuDriverEntryPointDesc->MmCpuDriverEpPtr,
176 &gEfiStandaloneMmNonSecureBufferGuid,
177 (VOID **)&NsCommBufMmramRange
179 if (EFI_ERROR (Status)) {
180 DEBUG ((DEBUG_ERROR,
"NsCommBufMmramRange HOB data extraction failed - 0x%x\n", Status));
192 &gEfiMmPeiMmramMemoryReserveGuid,
193 (VOID **)&MmramRangesHob
195 if (EFI_ERROR (Status)) {
196 DEBUG ((DEBUG_ERROR,
"MmramRangesHob data extraction failed - 0x%x\n", Status));
215 &gMpInformationHobGuid,
216 (VOID **)&MpInformationHobData
218 if (EFI_ERROR (Status)) {
219 DEBUG ((DEBUG_ERROR,
"MpInformationHob extraction failed - 0x%x\n", Status));
230 MpInformationHobData->NumberOfProcessors);
234 (VOID **)&mMpInformationHobData
236 if (EFI_ERROR (Status)) {
237 DEBUG ((DEBUG_ERROR,
"mMpInformationHobData mem alloc failed - 0x%x\n", Status));
241 CopyMem (mMpInformationHobData, MpInformationHobData, MpInfoSize);
246 "mMpInformationHobData: 0x%016lx - 0x%lx\n",
247 mMpInformationHobData->NumberOfProcessors,
248 mMpInformationHobData->NumberOfEnabledProcessors
250 for (Index = 0; Index < mMpInformationHobData->NumberOfProcessors; Index++) {
253 "mMpInformationHobData[0x%lx]: %d, %d, %d\n",
254 mMpInformationHobData->ProcessorInfoBuffer[Index].
ProcessorId,
256 mMpInformationHobData->ProcessorInfoBuffer[Index].
Location.
Core,
266 mMpInformationHobData->NumberOfEnabledProcessors;
270 (VOID **)&PerCpuGuidedEventContext
272 if (EFI_ERROR (Status)) {
273 DEBUG ((DEBUG_ERROR,
"PerCpuGuidedEventContext mem alloc failed - 0x%x\n", Status));
VOID *EFIAPI GetNextGuidHob(IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
EFI_STATUS EFIAPI PiMmCpuTpFwRootMmiHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
EFI_STATUS PiMmStandaloneMmCpuDriverEntry(IN UINTN EventId, IN UINTN CpuNumber, IN UINTN NsCommBufferAddr)
#define DEBUG(Expression)
EFI_STATUS GetGuidedHobData(IN VOID *HobList, IN CONST EFI_GUID *HobGuid, OUT VOID **HobData)
EFI_STATUS StandaloneMmCpuInitialize(IN EFI_HANDLE ImageHandle, IN EFI_MM_SYSTEM_TABLE *SystemTable)
EFI_INSTALL_PROTOCOL_INTERFACE MmInstallProtocolInterface
EFI_CONFIGURATION_TABLE * MmConfigurationTable
EFI_ALLOCATE_POOL MmAllocatePool
UINTN NumberOfTableEntries
EFI_PHYSICAL_ADDRESS CpuStart
EFI_PHYSICAL_ADDRESS PhysicalStart
EFI_MMRAM_DESCRIPTOR Descriptor[1]
EFI_CPU_PHYSICAL_LOCATION Location