From 9e620719100f80892adfa8e2f810a485bce32fb9 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Thu, 31 Dec 2009 08:42:28 +0000 Subject: Add 4 Framework/PI SMM thunk drivers. Combined use of these drivers can support usage model of PI SMM infrastructure + Framework Chipset SMM code + Framework platform SMM code in ECP platforms. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9657 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Include/Guid/SmmBaseThunkCommunication.h | 85 ++++++++++++++++++++++ .../Include/Protocol/SmmBaseHelperReady.h | 44 +++++++++++ 2 files changed, 129 insertions(+) create mode 100644 EdkCompatibilityPkg/Compatibility/Include/Guid/SmmBaseThunkCommunication.h create mode 100644 EdkCompatibilityPkg/Compatibility/Include/Protocol/SmmBaseHelperReady.h (limited to 'EdkCompatibilityPkg/Compatibility/Include') diff --git a/EdkCompatibilityPkg/Compatibility/Include/Guid/SmmBaseThunkCommunication.h b/EdkCompatibilityPkg/Compatibility/Include/Guid/SmmBaseThunkCommunication.h new file mode 100644 index 0000000000..f8507e5946 --- /dev/null +++ b/EdkCompatibilityPkg/Compatibility/Include/Guid/SmmBaseThunkCommunication.h @@ -0,0 +1,85 @@ +/** @file + GUID and data structures for communication between SMM Base on SMM Base2 Thunk driver + and SmmBaseHelper driver. + + Copyright (c) 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_THUNK_COMMUNICATION_H_ +#define _SMM_BASE_THUNK_COMMUNICATION_H_ + +#include + +#define EFI_SMM_BASE_THUNK_COMMUNICATION_GUID \ + { 0x6568a3d6, 0x15f, 0x4b4a, { 0x9c, 0x89, 0x1d, 0x14, 0x63, 0x14, 0x13, 0xa } } + +typedef struct { + EFI_DEVICE_PATH_PROTOCOL *FilePath; + VOID *SourceBuffer; + UINTN SourceSize; + EFI_HANDLE *ImageHandle; + BOOLEAN LegacyIA32Binary; +} SMMBASE_REGISTER_ARG; + +typedef struct { + EFI_HANDLE ImageHandle; +} SMMBASE_UNREGISTER_ARG; + +typedef struct { + EFI_HANDLE SmmImageHandle; + EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress; + BOOLEAN MakeLast; + BOOLEAN FloatingPointSave; +} SMMBASE_REGISTER_CALLBACK_ARG; + +typedef struct { + EFI_MEMORY_TYPE PoolType; + UINTN Size; + VOID **Buffer; +} SMMBASE_ALLOCATE_POOL_ARG; + +typedef struct { + VOID *Buffer; +} SMMBASE_FREE_POOL_ARG; + +typedef union { + SMMBASE_REGISTER_ARG Register; + SMMBASE_UNREGISTER_ARG UnRegister; + SMMBASE_REGISTER_CALLBACK_ARG RegisterCallback; + SMMBASE_ALLOCATE_POOL_ARG AllocatePool; + SMMBASE_FREE_POOL_ARG FreePool; +} SMMBASE_FUNCTION_ARGS; + +typedef enum { + SMMBASE_REGISTER, + SMMBASE_UNREGISTER, + SMMBASE_REGISTER_CALLBACK, + SMMBASE_ALLOCATE_POOL, + SMMBASE_FREE_POOL, +} SMMBASE_FUNCTION; + +typedef struct { + SMMBASE_FUNCTION Function; + EFI_STATUS Status; + SMMBASE_FUNCTION_ARGS Args; +} SMMBASE_FUNCTION_DATA; + +#pragma pack(1) +typedef struct { + EFI_GUID HeaderGuid; + UINTN MessageLength; + SMMBASE_FUNCTION_DATA FunctionData; +} SMMBASETHUNK_COMMUNICATION_DATA; +#pragma pack() + +extern EFI_GUID gEfiSmmBaseThunkCommunicationGuid; + +#endif + diff --git a/EdkCompatibilityPkg/Compatibility/Include/Protocol/SmmBaseHelperReady.h b/EdkCompatibilityPkg/Compatibility/Include/Protocol/SmmBaseHelperReady.h new file mode 100644 index 0000000000..45d645bad7 --- /dev/null +++ b/EdkCompatibilityPkg/Compatibility/Include/Protocol/SmmBaseHelperReady.h @@ -0,0 +1,44 @@ +/** @file + EFI SMM Base Helper Ready Protocol. + + This UEFI protocol is produced by the SMM Base Helper SMM driver to provide + a Framework SMST to the SMM Base Thunk driver. This protocol is also an indicator + that the SMM Base Helper SMM driver is ready in SMRAM for communication with + the SMM Base Thunk driver. + + Copyright (c) 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 __EFI_SMM_BASE_HELPER_READY_H__ +#define __EFI_SMM_BASE_HELPER_READY_H__ + +#include +#include + +#define EFI_SMM_BASE_HELPER_READY_PROTOCOL_GUID \ + { \ + 0x910dca07, 0x1f94, 0x4ee7, { 0xaf, 0x2f, 0xff, 0x72, 0xf3, 0x15, 0x43, 0x53 } \ + } + +typedef struct { + /// + /// Pointer to the Framework SMST built from PI SMST by SMM Base Helper SMM driver. + /// + EFI_SMM_SYSTEM_TABLE *FrameworkSmst; + /// + /// Services function directly called by SMM Base Thunk when in SMM + /// + EFI_SMM_HANDLER_ENTRY_POINT2 ServiceEntry; +} EFI_SMM_BASE_HELPER_READY_PROTOCOL; + +extern EFI_GUID gEfiSmmBaseHelperReadyProtocolGuid; + +#endif -- cgit v1.2.3