X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FSmmBase.h;h=65d0979496ba4ae5c0297df72af79e7483851869;hp=aac73d5b87aa0c057a80d6df1d64081a97b8bab6;hb=ce9b1e3ae0bdcf8f926ea5132f0bd34e7d384973;hpb=87d6344732796c9570488593977377bb0e693de7 diff --git a/IntelFrameworkPkg/Include/Protocol/SmmBase.h b/IntelFrameworkPkg/Include/Protocol/SmmBase.h index aac73d5b87..65d0979496 100644 --- a/IntelFrameworkPkg/Include/Protocol/SmmBase.h +++ b/IntelFrameworkPkg/Include/Protocol/SmmBase.h @@ -1,11 +1,11 @@ /** @file 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. + 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 into runtime: + runtime mode. However, only the following member functions need to exist during runtime: - InSmm() - Communicate() This protocol is responsible for registering the handler services. The order in which the handlers are @@ -19,38 +19,52 @@ workarounds for the century rollover in CMOS should provide commensurate services throughout preboot and OS runtime. + Copyright (c) 2007 - 2009, 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 + which 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. + @par Revision Reference: This Protocol is defined in Framework of EFI SMM Core Interface Spec Version 0.9. -Copyright (c) 2007 - 2009, 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 -which 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. - **/ #ifndef _SMM_BASE_H_ #define _SMM_BASE_H_ +// +// Share some common definitions with PI SMM +// +#include +#include + +/// +/// Global ID for the EFI_SMM_BASE_PROTOCOL +/// #define EFI_SMM_BASE_PROTOCOL_GUID \ { \ 0x1390954D, 0xda95, 0x4227, {0x93, 0x28, 0x72, 0x82, 0xc2, 0x17, 0xda, 0xa8 } \ } -typedef struct _EFI_SMM_BASE_PROTOCOL EFI_SMM_BASE_PROTOCOL; +/// +/// Forward declaration for EFI_SMM_BASE_PROTOCOL +/// +typedef struct _EFI_SMM_BASE_PROTOCOL EFI_SMM_BASE_PROTOCOL; -// -// SMM Handler Definition -// +/// +/// EFI SMM Handler return codes +/// +///@{ #define EFI_HANDLER_SUCCESS 0x0000 #define EFI_HANDLER_CRITICAL_EXIT 0x0001 #define EFI_HANDLER_SOURCE_QUIESCED 0x0002 #define EFI_HANDLER_SOURCE_PENDING 0x0003 +///@} /** Entry Point to Callback service @@ -59,7 +73,7 @@ typedef struct _EFI_SMM_BASE_PROTOCOL EFI_SMM_BASE_PROTOCOL; to uniquely designate a specific DXE SMM driver. @param[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, physically mapped, and be a physical address. + The buffer must be contiguous and physically mapped, and must be a physical address. @param[in] SourceSize The size of the CommunicationBuffer. @return Status code @@ -77,31 +91,31 @@ EFI_STATUS // SMM Base Protocol Definition // /** - Register a given driver into SMRAM.This is the equivalent of performing + Register a given driver into SMRAM. This is the equivalent of performing the LoadImage/StartImage into System Management Mode. @param[in] This Protocol instance pointer. @param[in] FilePath Location of the image to be installed as the handler. - @param[in] SourceBuffer Optional source buffer in case of the image file - being in memory. + @param[in] SourceBuffer Optional source buffer in case the image file + is in memory. @param[in] SourceSize Size of the source image file, if in memory. @param[out] ImageHandle The handle that the base driver uses to decode the handler. Unique among SMM handlers only, not unique across DXE/EFI. - @param[in] LegacyIA32Binary An optional parameter that details that the associated + @param[in] LegacyIA32Binary An optional parameter specifying that the associated file is a real-mode IA-32 binary. @retval EFI_SUCCESS The operation was successful. @retval EFI_OUT_OF_RESOURCES There were no additional SMRAM resources to load the handler @retval EFI_UNSUPPORTED This platform does not support 16-bit handlers. - @retval EFI_UNSUPPORTED In runtime. + @retval EFI_UNSUPPORTED Platform is in runtime. @retval EFI_INVALID_PARAMETER The handlers was not the correct image type **/ typedef EFI_STATUS (EFIAPI *EFI_SMM_REGISTER_HANDLER)( - IN EFI_SMM_BASE_PROTOCOL *This, + IN EFI_SMM_BASE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN VOID *SourceBuffer OPTIONAL, IN UINTN SourceSize, @@ -118,7 +132,7 @@ EFI_STATUS @retval EFI_SUCCESS The operation was successful @retval EFI_INVALID_PARAMETER The handler did not exist - @retval EFI_UNSUPPORTED In runtime. + @retval EFI_UNSUPPORTED Platform is in runtime. **/ typedef @@ -130,7 +144,7 @@ EFI_STATUS /** The SMM Inter-module Communicate Service Communicate() function - provides a services to send/received messages from a registered + 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. @@ -163,14 +177,14 @@ EFI_STATUS @param[in] CallbackAddress Address of the callback service. @param[in] MakeLast If present, will stipulate that the handler is posted to be executed last in the dispatch table. - @param[in] FloatingPointSave This is an optional parameter which informs the + @param[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 of the handlers - require this, then the state will be saved for all of the handlers. + the floating point register state. If any handler + require this, the state will be saved for all handlers. @retval EFI_SUCCESS The operation was successful @retval EFI_OUT_OF_RESOURCES Not enough space in the dispatch queue - @retval EFI_UNSUPPORTED In runtime. + @retval EFI_UNSUPPORTED Platform is in runtime. @retval EFI_UNSUPPORTED The caller is not in SMM. **/ @@ -202,7 +216,7 @@ EFI_STATUS @retval EFI_SUCCESS The requested number of bytes was allocated. @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated. - @retval EFI_UNSUPPORTED In runtime. + @retval EFI_UNSUPPORTED Platform is in runtime. **/ typedef @@ -224,7 +238,7 @@ EFI_STATUS @retval EFI_SUCCESS The memory was returned to the system. @retval EFI_INVALID_PARAMETER Buffer was invalid. - @retval EFI_UNSUPPORTED In runtime. + @retval EFI_UNSUPPORTED Platform is in runtime. **/ typedef @@ -254,7 +268,7 @@ EFI_STATUS ); /** - The GetSmstLocation() function returns the locatin of the System Management + 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.