1 /** @file 2 GUID and data structures for communication between SMM Base on SMM Base2 Thunk driver 3 and SmmBaseHelper driver. 4 5 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 #ifndef _SMM_BASE_THUNK_COMMUNICATION_H_ 16 #define _SMM_BASE_THUNK_COMMUNICATION_H_ 17 18 #include <Protocol/SmmBase.h> 19 20 #define EFI_SMM_BASE_THUNK_COMMUNICATION_GUID \ 21 { 0x6568a3d6, 0x15f, 0x4b4a, { 0x9c, 0x89, 0x1d, 0x14, 0x63, 0x14, 0x13, 0xa } } 22 23 typedef struct { 24 EFI_DEVICE_PATH_PROTOCOL *FilePath; 25 VOID *SourceBuffer; 26 UINTN SourceSize; 27 EFI_HANDLE *ImageHandle; 28 BOOLEAN LegacyIA32Binary; 29 } SMMBASE_REGISTER_ARG; 30 31 typedef struct { 32 EFI_HANDLE ImageHandle; 33 } SMMBASE_UNREGISTER_ARG; 34 35 typedef struct { 36 EFI_HANDLE SmmImageHandle; 37 EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress; 38 BOOLEAN MakeLast; 39 BOOLEAN FloatingPointSave; 40 } SMMBASE_REGISTER_CALLBACK_ARG; 41 42 typedef struct { 43 EFI_MEMORY_TYPE PoolType; 44 UINTN Size; 45 VOID **Buffer; 46 } SMMBASE_ALLOCATE_POOL_ARG; 47 48 typedef struct { 49 VOID *Buffer; 50 } SMMBASE_FREE_POOL_ARG; 51 52 typedef struct { 53 EFI_HANDLE ImageHandle; 54 VOID *CommunicationBuffer; 55 UINTN *SourceSize; 56 } SMMBASE_COMMUNICATE_ARG; 57 58 typedef union { 59 SMMBASE_REGISTER_ARG Register; 60 SMMBASE_UNREGISTER_ARG UnRegister; 61 SMMBASE_REGISTER_CALLBACK_ARG RegisterCallback; 62 SMMBASE_ALLOCATE_POOL_ARG AllocatePool; 63 SMMBASE_FREE_POOL_ARG FreePool; 64 SMMBASE_COMMUNICATE_ARG Communicate; 65 } SMMBASE_FUNCTION_ARGS; 66 67 typedef enum { 68 SmmBaseFunctionRegister, 69 SmmBaseFunctionUnregister, 70 SmmBaseFunctionRegisterCallback, 71 SmmBaseFunctionAllocatePool, 72 SmmBaseFunctionFreePool, 73 SmmBaseFunctionCommunicate 74 } SMMBASE_FUNCTION; 75 76 typedef struct { 77 SMMBASE_FUNCTION Function; 78 EFI_STATUS Status; 79 SMMBASE_FUNCTION_ARGS Args; 80 EFI_HANDLE SmmBaseImageHandle; 81 } SMMBASE_FUNCTION_DATA; 82 83 #pragma pack(1) 84 typedef struct { 85 EFI_GUID HeaderGuid; 86 UINTN MessageLength; 87 SMMBASE_FUNCTION_DATA FunctionData; 88 } SMMBASETHUNK_COMMUNICATION_DATA; 89 #pragma pack() 90 91 extern EFI_GUID gEfiSmmBaseThunkCommunicationGuid; 92 93 #endif 94 95