27#define DEFAULT_COMMON_PI_SMM_COMMUNIATION_REGION_PAGES 4
46 UINT32 DescriptorSize;
59 DescriptorSize +=
sizeof (UINT64) - (DescriptorSize %
sizeof (UINT64));
65 ASSERT (PiSmmCommunicationRegionTable !=
NULL);
68 PiSmmCommunicationRegionTable->Version = EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_VERSION;
69 PiSmmCommunicationRegionTable->NumberOfEntries = 1;
70 PiSmmCommunicationRegionTable->DescriptorSize = DescriptorSize;
76 if (GuidHob ==
NULL) {
78 Entry->NumberOfPages = DEFAULT_COMMON_PI_SMM_COMMUNIATION_REGION_PAGES;
80 MmCommBuffer = GET_GUID_HOB_DATA (GuidHob);
85 ASSERT (Entry->PhysicalStart != 0);
86 Entry->VirtualStart = 0;
89 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationRegionTable:(0x%x)\n", PiSmmCommunicationRegionTable));
90 DEBUG ((DEBUG_INFO,
" Version - 0x%x\n", PiSmmCommunicationRegionTable->Version));
91 DEBUG ((DEBUG_INFO,
" NumberOfEntries - 0x%x\n", PiSmmCommunicationRegionTable->NumberOfEntries));
92 DEBUG ((DEBUG_INFO,
" DescriptorSize - 0x%x\n", PiSmmCommunicationRegionTable->DescriptorSize));
93 DEBUG ((DEBUG_INFO,
"Entry:(0x%x)\n", Entry));
94 DEBUG ((DEBUG_INFO,
" Type - 0x%x\n", Entry->Type));
95 DEBUG ((DEBUG_INFO,
" PhysicalStart - 0x%lx\n", Entry->PhysicalStart));
96 DEBUG ((DEBUG_INFO,
" VirtualStart - 0x%lx\n", Entry->VirtualStart));
97 DEBUG ((DEBUG_INFO,
" NumberOfPages - 0x%lx\n", Entry->NumberOfPages));
98 DEBUG ((DEBUG_INFO,
" Attribute - 0x%lx\n", Entry->Attribute));
103 Status =
gBS->InstallConfigurationTable (&gEdkiiPiSmmCommunicationRegionTableGuid, PiSmmCommunicationRegionTable);
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateReservedPool(IN UINTN AllocationSize)
VOID *EFIAPI AllocateReservedPages(IN UINTN Pages)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
EFI_STATUS EFIAPI SmmCommunicationBufferEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PHYSICAL_ADDRESS PhysicalStart