TianoCore EDK2 master
|
#include <PiPei.h>
#include <PiDxe.h>
#include <PiSmm.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/HobLib.h>
#include <Library/DebugLib.h>
#include <Protocol/SmmCommunication.h>
#include <Ppi/SmmCommunication.h>
#include <Ppi/SmmAccess.h>
#include <Ppi/SmmControl.h>
#include <Guid/AcpiS3Context.h>
#include "PiSmmCommunicationPrivate.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | Communicate (IN CONST EFI_PEI_SMM_COMMUNICATION_PPI *This, IN OUT VOID *CommBuffer, IN OUT UINTN *CommSize) |
EFI_SMM_COMMUNICATION_CONTEXT * | GetCommunicationContext (VOID) |
VOID | SetCommunicationContext (IN EFI_SMM_COMMUNICATION_CONTEXT *SmmCommunicationContext) |
VOID * | InternalSmstGetVendorTableByGuid (IN UINT64 Signature, IN EFI_SMM_SYSTEM_TABLE2 *Smst, IN EFI_GUID *VendorGuid) |
VOID | InitCommunicationContext (VOID) |
EFI_STATUS EFIAPI | PiSmmCommunicationPeiEntryPoint (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices) |
Variables | |
EFI_PEI_SMM_COMMUNICATION_PPI | mSmmCommunicationPpi = { Communicate } |
EFI_PEI_PPI_DESCRIPTOR | mPpiList |
PiSmmCommunication PEI Driver.
Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PiSmmCommunicationPei.c.
EFI_STATUS EFIAPI Communicate | ( | IN CONST EFI_PEI_SMM_COMMUNICATION_PPI * | This, |
IN OUT VOID * | CommBuffer, | ||
IN OUT UINTN * | CommSize | ||
) |
the whole picture is below:
+-------------------------------—+ | ACPI_VARIABLE_HOB | | SmramDescriptor | <- DRAM | CpuStart |— +-------------------------------—+ | | +-------------------------------—+<– | SMM_S3_RESUME_STATE | | Signature | <- SMRAM | Smst |— +-------------------------------—+ | | +-------------------------------—+<– | EFI_SMM_SYSTEM_TABLE2 | | NumberOfTableEntries | <- SMRAM | SmmConfigurationTable |— +-------------------------------—+ | | +-------------------------------—+<– | EFI_SMM_COMMUNICATION_CONTEXT | | SwSmiNumber | <- SMRAM | BufferPtrAddress |— +-------------------------------—+ | | +-------------------------------—+<– | Communication Buffer Pointer | <- AcpiNvs +-------------------------------—+— | +-------------------------------—+<– | EFI_SMM_COMMUNICATE_HEADER | | HeaderGuid | <- DRAM | MessageLength | +-------------------------------—+ Communicates with a registered handler.
This function provides a service to send and receive messages from a registered UEFI service.
[in] | This | The EFI_PEI_SMM_COMMUNICATION_PPI instance. |
[in,out] | CommBuffer | A pointer to the buffer to convey into SMRAM. |
[in,out] | CommSize | The size of the data buffer being passed in.On exit, the size of data being returned. Zero if the handler does not wish to reply with any data. |
EFI_SUCCESS | The message was successfully posted. |
EFI_INVALID_PARAMETER | The CommBuffer was NULL. |
EFI_NOT_STARTED | The service is NOT started. |
Communicates with a registered handler.
This function provides a service to send and receive messages from a registered UEFI service.
[in] | This | The EFI_PEI_SMM_COMMUNICATION_PPI instance. |
[in,out] | CommBuffer | A pointer to the buffer to convey into SMRAM. |
[in,out] | CommSize | The size of the data buffer being passed in.On exit, the size of data being returned. Zero if the handler does not wish to reply with any data. |
EFI_SUCCESS | The message was successfully posted. |
EFI_INVALID_PARAMETER | The CommBuffer was NULL. |
EFI_NOT_STARTED | The service is NOT started. |
Definition at line 275 of file PiSmmCommunicationPei.c.
EFI_SMM_COMMUNICATION_CONTEXT * GetCommunicationContext | ( | VOID | ) |
Get SMM communication context.
Definition at line 135 of file PiSmmCommunicationPei.c.
VOID InitCommunicationContext | ( | VOID | ) |
Init SMM communication context.
Definition at line 230 of file PiSmmCommunicationPei.c.
VOID * InternalSmstGetVendorTableByGuid | ( | IN UINT64 | Signature, |
IN EFI_SMM_SYSTEM_TABLE2 * | Smst, | ||
IN EFI_GUID * | VendorGuid | ||
) |
Get VendorTable by VendorGuid in Smst.
Signature | Signature of SMM_S3_RESUME_STATE |
Smst | SMM system table |
VendorGuid | vendor guid |
Definition at line 183 of file PiSmmCommunicationPei.c.
EFI_STATUS EFIAPI PiSmmCommunicationPeiEntryPoint | ( | IN EFI_PEI_FILE_HANDLE | FileHandle, |
IN CONST EFI_PEI_SERVICES ** | PeiServices | ||
) |
Entry Point for PI SMM communication PEIM.
FileHandle | Handle of the file being invoked. |
PeiServices | Pointer to PEI Services table. |
EFI_SUCCESS |
Definition at line 370 of file PiSmmCommunicationPei.c.
VOID SetCommunicationContext | ( | IN EFI_SMM_COMMUNICATION_CONTEXT * | SmmCommunicationContext | ) |
Set SMM communication context.
SmmCommunicationContext | SMM communication context. |
Definition at line 156 of file PiSmmCommunicationPei.c.
EFI_PEI_PPI_DESCRIPTOR mPpiList |
Definition at line 123 of file PiSmmCommunicationPei.c.
EFI_PEI_SMM_COMMUNICATION_PPI mSmmCommunicationPpi = { Communicate } |
Definition at line 121 of file PiSmmCommunicationPei.c.