X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FSmmBase.h;h=89abd65a7d4f426c50d39347e5aaa8e1cff2d602;hp=0f82dce7e0c40b8478e9696e09ce0ec72690d957;hb=f22f941ed273753a0426d1234869857f19c28664;hpb=f759064285b16bf55a0b823917038f4ded818c81 diff --git a/IntelFrameworkPkg/Include/Protocol/SmmBase.h b/IntelFrameworkPkg/Include/Protocol/SmmBase.h index 0f82dce7e0..89abd65a7d 100644 --- a/IntelFrameworkPkg/Include/Protocol/SmmBase.h +++ b/IntelFrameworkPkg/Include/Protocol/SmmBase.h @@ -19,14 +19,14 @@ 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. +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. @par Revision Reference: This Protocol is defined in Framework of EFI SMM Core Interface Spec @@ -37,8 +37,14 @@ #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 +/// Global ID for the EFI_SMM_BASE_PROTOCOL. /// #define EFI_SMM_BASE_PROTOCOL_GUID \ { \ @@ -46,7 +52,7 @@ } /// -/// Forward declaration for EFI_SMM_BASE_PROTOCOL +/// Forward declaration for EFI_SMM_BASE_PROTOCOL. /// typedef struct _EFI_SMM_BASE_PROTOCOL EFI_SMM_BASE_PROTOCOL; @@ -60,32 +66,16 @@ typedef struct _EFI_SMM_BASE_PROTOCOL EFI_SMM_BASE_PROTOCOL; #define EFI_HANDLER_SOURCE_PENDING 0x0003 ///@} -/// -/// The header data is mandatory for messages sent into the SMM agent. -/// -typedef struct { - /// - /// Allows for disambiguation of the message format. - /// - EFI_GUID HeaderGuid; - /// - /// Describes the size of the message, not including the header. - /// - UINTN MessageLength; - /// - /// Designates an array of bytes that is MessageLength in size. - /// - UINT8 Data[1]; -} EFI_SMM_COMMUNICATE_HEADER; - /** Entry Point to Callback service @param[in] SmmImageHandle A handle allocated by the SMM infrastructure code 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 and physically mapped, and must be a physical address. + 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. @param[in] SourceSize The size of the CommunicationBuffer. @return Status code @@ -106,13 +96,13 @@ EFI_STATUS 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 the image file + @param[in] This The protocol instance pointer. + @param[in] FilePath The location of the image to be installed as the handler. + @param[in] SourceBuffer An optional source buffer in case the image file is in memory. - @param[in] SourceSize Size of the source image file, if in memory. + @param[in] SourceSize The 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, + the handler. Unique among SMM handlers only; not unique across DXE/EFI. @param[in] LegacyIA32Binary An optional parameter specifying that the associated file is a real-mode IA-32 binary. @@ -120,14 +110,14 @@ EFI_STATUS @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 Platform is in runtime. - @retval EFI_INVALID_PARAMETER The handlers was not the correct image type + @retval EFI_UNSUPPORTED The platform is in runtime. + @retval EFI_INVALID_PARAMETER The handlers were 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, @@ -139,12 +129,12 @@ EFI_STATUS Removes a handler from execution within SMRAM. This is the equivalent of performing the UnloadImage in System Management Mode. - @param[in] This Protocol instance pointer. + @param[in] This The protocol instance pointer. @param[in] ImageHandle The handler to be removed. - @retval EFI_SUCCESS The operation was successful - @retval EFI_INVALID_PARAMETER The handler did not exist - @retval EFI_UNSUPPORTED Platform is in runtime. + @retval EFI_SUCCESS The operation was successful. + @retval EFI_INVALID_PARAMETER The handler did not exist. + @retval EFI_UNSUPPORTED The platform is in runtime. **/ typedef @@ -160,15 +150,15 @@ EFI_STATUS EFI service. The BASE protocol driver is responsible for doing any of the copies such that the data lives in boot-service-accessible RAM. - @param[in] This Protocol instance pointer. + @param[in] This The protocol instance pointer. @param[in] ImageHandle The handle of the registered driver. - @param[in,out] CommunicationBuffer Pointer to the buffer to convey into SMRAM. + @param[in,out] CommunicationBuffer The pointer to the buffer to convey into SMRAM. @param[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. - @retval EFI_SUCCESS The message was successfully posted - @retval EFI_INVALID_PARAMETER The buffer was NULL + @retval EFI_SUCCESS The message was successfully posted. + @retval EFI_INVALID_PARAMETER The buffer was NULL. **/ typedef @@ -194,9 +184,9 @@ EFI_STATUS 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 Platform is in runtime. + @retval EFI_SUCCESS The operation was successful. + @retval EFI_OUT_OF_RESOURCES Not enough space in the dispatch queue. + @retval EFI_UNSUPPORTED The platform is in runtime. @retval EFI_UNSUPPORTED The caller is not in SMM. **/ @@ -228,7 +218,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 Platform is in runtime. + @retval EFI_UNSUPPORTED The platform is in runtime. **/ typedef @@ -245,12 +235,12 @@ EFI_STATUS On return, the memory's type is EFI SMRAM Memory. The Buffer that is freed must have been allocated by SmmAllocatePool(). - @param[in] This Protocol instance pointer. - @param[in] Buffer Pointer to the buffer allocation. + @param[in] This The protocol instance pointer. + @param[in] Buffer The pointer to the buffer allocation. @retval EFI_SUCCESS The memory was returned to the system. - @retval EFI_INVALID_PARAMETER Buffer was invalid. - @retval EFI_UNSUPPORTED Platform is in runtime. + @retval EFI_INVALID_PARAMETER The buffer was invalid. + @retval EFI_UNSUPPORTED The platform is in runtime. **/ typedef @@ -263,12 +253,12 @@ EFI_STATUS /** This routine tells caller if execution context is SMM or not. - @param[in] This Protocol instance pointer. + @param[in] This The protocol instance pointer. @param[out] InSmm Whether the caller is inside SMM for IA-32 or servicing a PMI for the Itanium processor family. - @retval EFI_SUCCESS The operation was successful + @retval EFI_SUCCESS The operation was successful. @retval EFI_INVALID_PARAMETER InSmm was NULL. **/ @@ -285,8 +275,8 @@ EFI_STATUS 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. - @param[in] This Protocol instance pointer. - @param[in] Smst Pointer to the SMST. + @param[in] This The protocol instance pointer. + @param[in] Smst The pointer to the SMST. @retval EFI_SUCCESS The operation was successful @retval EFI_INVALID_PARAMETER Smst was invalid.