IntelFrameworkPkg/Include/Protocol/SmmBase.h File Reference


Data Structures

struct  _EFI_SMM_BASE_PROTOCOL

Defines

#define EFI_SMM_BASE_PROTOCOL_GUID
#define EFI_HANDLER_SUCCESS   0x0000
#define EFI_HANDLER_CRITICAL_EXIT   0x0001
#define EFI_HANDLER_SOURCE_QUIESCED   0x0002
#define EFI_HANDLER_SOURCE_PENDING   0x0003

Typedefs

typedef struct
_EFI_SMM_BASE_PROTOCOL 
EFI_SMM_BASE_PROTOCOL
typedef EFI_STATUS(EFIAPI * EFI_SMM_CALLBACK_ENTRY_POINT )(IN EFI_HANDLE SmmImageHandle, IN OUT VOID *CommunicationBuffer, IN OUT UINTN *SourceSize)
typedef EFI_STATUS(EFIAPI * EFI_SMM_REGISTER_HANDLER )(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN VOID *SourceBuffer, IN UINTN SourceSize, OUT EFI_HANDLE *ImageHandle, IN BOOLEAN LegacyIA32Binary)
typedef EFI_STATUS(EFIAPI * EFI_SMM_UNREGISTER_HANDLER )(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_HANDLE ImageHandle)
typedef EFI_STATUS(EFIAPI * EFI_SMM_COMMUNICATE )(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_HANDLE ImageHandle, IN OUT VOID *CommunicationBuffer, IN OUT UINTN *SourceSize)
typedef EFI_STATUS(EFIAPI * EFI_SMM_CALLBACK_SERVICE )(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_HANDLE SmmImageHandle, IN EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress, IN BOOLEAN MakeLast, IN BOOLEAN FloatingPointSave)
typedef EFI_STATUS(EFIAPI * EFI_SMM_ALLOCATE_POOL )(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer)
typedef EFI_STATUS(EFIAPI * EFI_SMM_FREE_POOL )(IN EFI_SMM_BASE_PROTOCOL *This, IN VOID *Buffer)
typedef EFI_STATUS(EFIAPI * EFI_SMM_INSIDE_OUT )(IN EFI_SMM_BASE_PROTOCOL *This, OUT BOOLEAN *InSmm)
typedef EFI_STATUS(EFIAPI * EFI_SMM_GET_SMST_LOCATION )(IN EFI_SMM_BASE_PROTOCOL *This, IN OUT EFI_SMM_SYSTEM_TABLE **Smst)

Variables

EFI_GUID gEfiSmmBaseProtocolGuid

Detailed Description

This file declares SMM Base abstraction protocol. This protocol is used to install SMM handlers for support of subsequent SMI/PMI activations. This protocol is available on both IA-32 and Itanium-based systems.

The EFI_SMM_BASE_PROTOCOL is a set of services that is exported by a processor device. It is a required protocol for the platform processor. This protocol can be used in both boot services and runtime mode. However, only the following member functions need to exist during runtime:

Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Revision Reference:
This Protocol is defined in Framework of EFI SMM Core Interface Spec Version 0.9.

Define Documentation

#define EFI_HANDLER_CRITICAL_EXIT   0x0001

EFI SMM Handler return codes

#define EFI_HANDLER_SOURCE_PENDING   0x0003

EFI SMM Handler return codes

#define EFI_HANDLER_SOURCE_QUIESCED   0x0002

EFI SMM Handler return codes

#define EFI_HANDLER_SUCCESS   0x0000

EFI SMM Handler return codes

#define EFI_SMM_BASE_PROTOCOL_GUID

Value:

{ \
    0x1390954D, 0xda95, 0x4227, {0x93, 0x28, 0x72, 0x82, 0xc2, 0x17, 0xda, 0xa8 } \
  }
Global ID for the EFI_SMM_BASE_PROTOCOL.


Typedef Documentation

typedef EFI_STATUS(EFIAPI * EFI_SMM_ALLOCATE_POOL)(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer)

The SmmAllocatePool() function allocates a memory region of Size bytes from memory of type PoolType and returns the address of the allocated memory in the location referenced by Buffer. This function allocates pages from EFI SMRAM Memory as needed to grow the requested pool type. All allocations are eight-byte aligned.

Parameters:
[in] This Protocol instance pointer.
[in] PoolType The type of pool to allocate. The only supported type is EfiRuntimeServicesData; the interface will internally map this runtime request to SMRAM for IA-32 and leave as this type for the Itanium processor family. Other types can be ignored.
[in] Size The number of bytes to allocate from the pool.
[out] Buffer A pointer to a pointer to the allocated buffer if the call succeeds; undefined otherwise.
Return values:
EFI_SUCCESS The requested number of bytes was allocated.
EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
EFI_UNSUPPORTED The platform is in runtime.

Forward declaration for EFI_SMM_BASE_PROTOCOL.

typedef EFI_STATUS(EFIAPI * EFI_SMM_CALLBACK_ENTRY_POINT)(IN EFI_HANDLE SmmImageHandle, IN OUT VOID *CommunicationBuffer, IN OUT UINTN *SourceSize)

Entry Point to Callback service

Parameters:
[in] SmmImageHandle A handle allocated by the SMM infrastructure code to uniquely designate a specific DXE SMM driver.
[in] CommunicationBuffer A pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment. The buffer must be contiguous and physically mapped, and must be a physical address.
[in] SourceSize The size of the CommunicationBuffer.
Returns:
Status code

typedef EFI_STATUS(EFIAPI * EFI_SMM_CALLBACK_SERVICE)(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_HANDLE SmmImageHandle, IN EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress, IN BOOLEAN MakeLast, IN BOOLEAN FloatingPointSave)

Register a callback to execute within SMM. This allows receipt of messages created with EFI_SMM_BASE_PROTOCOL.Communicate().

Parameters:
[in] This Protocol instance pointer.
[in] SmmImageHandle Handle of the callback service.
[in] CallbackAddress Address of the callback service.
[in] MakeLast If present, will stipulate that the handler is posted to be executed last in the dispatch table.
[in] FloatingPointSave An optional parameter that informs the EFI_SMM_ACCESS_PROTOCOL Driver core if it needs to save the floating point register state. If any handler require this, the state will be saved for all handlers.
Return values:
EFI_SUCCESS The operation was successful.
EFI_OUT_OF_RESOURCES Not enough space in the dispatch queue.
EFI_UNSUPPORTED The platform is in runtime.
EFI_UNSUPPORTED The caller is not in SMM.

typedef EFI_STATUS(EFIAPI * EFI_SMM_COMMUNICATE)(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_HANDLE ImageHandle, IN OUT VOID *CommunicationBuffer, IN OUT UINTN *SourceSize)

The SMM Inter-module Communicate Service Communicate() function provides a service to send/receive messages from a registered EFI service. The BASE protocol driver is responsible for doing any of the copies such that the data lives in boot-service-accessible RAM.

Parameters:
[in] This The protocol instance pointer.
[in] ImageHandle The handle of the registered driver.
[in,out] CommunicationBuffer The pointer to the buffer to convey into SMRAM.
[in,out] SourceSize 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.
Return values:
EFI_SUCCESS The message was successfully posted.
EFI_INVALID_PARAMETER The buffer was NULL.

typedef EFI_STATUS(EFIAPI * EFI_SMM_FREE_POOL)(IN EFI_SMM_BASE_PROTOCOL *This, IN VOID *Buffer)

The SmmFreePool() function returns the memory specified by Buffer to the system. On return, the memory's type is EFI SMRAM Memory. The Buffer that is freed must have been allocated by SmmAllocatePool().

Parameters:
[in] This The protocol instance pointer.
[in] Buffer The pointer to the buffer allocation.
Return values:
EFI_SUCCESS The memory was returned to the system.
EFI_INVALID_PARAMETER The buffer was invalid.
EFI_UNSUPPORTED The platform is in runtime.

typedef EFI_STATUS(EFIAPI * EFI_SMM_GET_SMST_LOCATION)(IN EFI_SMM_BASE_PROTOCOL *This, IN OUT EFI_SMM_SYSTEM_TABLE **Smst)

The GetSmstLocation() function returns the location of the System Management Service Table. The use of the API is such that a driver can discover the location of the SMST in its entry point and then cache it in some driver global variable so that the SMST can be invoked in subsequent callbacks.

Parameters:
[in] This The protocol instance pointer.
[in] Smst The pointer to the SMST.
Return values:
EFI_SUCCESS The operation was successful
EFI_INVALID_PARAMETER Smst was invalid.
EFI_UNSUPPORTED Not in SMM.

typedef EFI_STATUS(EFIAPI * EFI_SMM_INSIDE_OUT)(IN EFI_SMM_BASE_PROTOCOL *This, OUT BOOLEAN *InSmm)

This routine tells caller if execution context is SMM or not.

Parameters:
[in] This The protocol instance pointer.
[out] InSmm Whether the caller is inside SMM for IA-32 or servicing a PMI for the Itanium processor family.
Return values:
EFI_SUCCESS The operation was successful.
EFI_INVALID_PARAMETER InSmm was NULL.

typedef EFI_STATUS(EFIAPI * EFI_SMM_REGISTER_HANDLER)(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN VOID *SourceBuffer, IN UINTN SourceSize, OUT EFI_HANDLE *ImageHandle, IN BOOLEAN LegacyIA32Binary)

Register a given driver into SMRAM. This is the equivalent of performing the LoadImage/StartImage into System Management Mode.

Parameters:
[in] This The protocol instance pointer.
[in] FilePath The location of the image to be installed as the handler.
[in] SourceBuffer An optional source buffer in case the image file is in memory.
[in] SourceSize The size of the source image file, if in memory.
[out] ImageHandle The handle that the base driver uses to decode the handler. Unique among SMM handlers only; not unique across DXE/EFI.
[in] LegacyIA32Binary An optional parameter specifying that the associated file is a real-mode IA-32 binary.
Return values:
EFI_SUCCESS The operation was successful.
EFI_OUT_OF_RESOURCES There were no additional SMRAM resources to load the handler
EFI_UNSUPPORTED This platform does not support 16-bit handlers.
EFI_UNSUPPORTED The platform is in runtime.
EFI_INVALID_PARAMETER The handlers were not the correct image type.

typedef EFI_STATUS(EFIAPI * EFI_SMM_UNREGISTER_HANDLER)(IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_HANDLE ImageHandle)

Removes a handler from execution within SMRAM. This is the equivalent of performing the UnloadImage in System Management Mode.

Parameters:
[in] This The protocol instance pointer.
[in] ImageHandle The handler to be removed.
Return values:
EFI_SUCCESS The operation was successful.
EFI_INVALID_PARAMETER The handler did not exist.
EFI_UNSUPPORTED The platform is in runtime.


Variable Documentation


Generated on Wed Sep 2 13:08:33 2015 for IntelFrameworkPkg[ALL] by  doxygen 1.5.7.1