25 SMM_COMMUNICATION_SIGNATURE
38 Status =
gSmst->SmmInstallConfigurationTable (
40 &gEfiPeiSmmCommunicationPpiGuid,
41 &mSmmCommunicationContext,
42 sizeof (mSmmCommunicationContext)
64 IN CONST VOID *Context OPTIONAL,
65 IN OUT VOID *CommBuffer OPTIONAL,
74 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler Enter\n"));
78 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler CommunicateHeader - %x\n", CommunicateHeader));
79 if (CommunicateHeader ==
NULL) {
80 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler is NULL, needn't to call dispatch function\n"));
84 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler CommunicateHeader invalid - 0x%x\n", CommunicateHeader));
89 CommSize = (
UINTN)CommunicateHeader->MessageLength;
91 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler CommunicateData invalid - 0x%x\n", &CommunicateHeader->Data[0]));
99 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler Data - %x\n", &CommunicateHeader->Data[0]));
101 &CommunicateHeader->HeaderGuid,
103 &CommunicateHeader->Data[0],
109 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler %r\n", Status));
110 DEBUG ((DEBUG_INFO,
"PiSmmCommunicationHandler Exit\n"));
136 Address = 0xffffffff;
138 Status =
gBS->AllocatePages (
146 Buffer = (VOID *)(
UINTN)Address;
177 Status =
gSmst->SmmLocateProtocol (
178 &gEfiSmmSwDispatch2ProtocolGuid,
180 (VOID **)&SmmSwDispatch2
184 SmmSwDispatchContext.SwSmiInputValue = (
UINTN)-1;
185 Status = SmmSwDispatch2->Register (
188 &SmmSwDispatchContext,
193 DEBUG ((DEBUG_INFO,
"SmmCommunication SwSmi: %x\n", (
UINTN)SmmSwDispatchContext.SwSmiInputValue));
196 ASSERT (BufferPtrAddress !=
NULL);
197 DEBUG ((DEBUG_INFO,
"SmmCommunication BufferPtrAddress: 0x%016lx, BufferPtr: 0x%016lx\n", (
EFI_PHYSICAL_ADDRESS)(
UINTN)BufferPtrAddress, *BufferPtrAddress));
202 mSmmCommunicationContext.SwSmiNumber = (UINT32)SmmSwDispatchContext.SwSmiInputValue;
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define OFFSET_OF(TYPE, Field)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define EFI_INTERRUPT_PENDING
VOID SetCommunicationContext(VOID)
VOID * AllocateAcpiNvsMemoryBelow4G(IN UINTN Size)
EFI_STATUS EFIAPI PiSmmCommunicationSmmEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI PiSmmCommunicationHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
EFI_SMM_SYSTEM_TABLE2 * gSmst
BOOLEAN EFIAPI SmmIsBufferOutsideSmmValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_SIZE_TO_PAGES(Size)
EFI_SMM_INTERRUPT_MANAGE SmiManage