]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatibility/Include/Guid/SmmBaseThunkCommunication.h
188aff9bd209281f21f406a6dd08eaab47a8331f
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / Include / Guid / SmmBaseThunkCommunication.h
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 Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16 #ifndef _SMM_BASE_THUNK_COMMUNICATION_H_
17 #define _SMM_BASE_THUNK_COMMUNICATION_H_
18
19 #include <Protocol/SmmBase.h>
20
21 #define EFI_SMM_BASE_THUNK_COMMUNICATION_GUID \
22 { 0x6568a3d6, 0x15f, 0x4b4a, { 0x9c, 0x89, 0x1d, 0x14, 0x63, 0x14, 0x13, 0xa } }
23
24 typedef struct {
25 EFI_DEVICE_PATH_PROTOCOL *FilePath;
26 VOID *SourceBuffer;
27 UINTN SourceSize;
28 EFI_HANDLE *ImageHandle;
29 BOOLEAN LegacyIA32Binary;
30 } SMMBASE_REGISTER_ARG;
31
32 typedef struct {
33 EFI_HANDLE ImageHandle;
34 } SMMBASE_UNREGISTER_ARG;
35
36 typedef struct {
37 EFI_HANDLE SmmImageHandle;
38 EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress;
39 BOOLEAN MakeLast;
40 BOOLEAN FloatingPointSave;
41 } SMMBASE_REGISTER_CALLBACK_ARG;
42
43 typedef struct {
44 EFI_MEMORY_TYPE PoolType;
45 UINTN Size;
46 VOID **Buffer;
47 } SMMBASE_ALLOCATE_POOL_ARG;
48
49 typedef struct {
50 VOID *Buffer;
51 } SMMBASE_FREE_POOL_ARG;
52
53 typedef struct {
54 EFI_HANDLE ImageHandle;
55 VOID *CommunicationBuffer;
56 UINTN *SourceSize;
57 } SMMBASE_COMMUNICATE_ARG;
58
59 typedef union {
60 SMMBASE_REGISTER_ARG Register;
61 SMMBASE_UNREGISTER_ARG UnRegister;
62 SMMBASE_REGISTER_CALLBACK_ARG RegisterCallback;
63 SMMBASE_ALLOCATE_POOL_ARG AllocatePool;
64 SMMBASE_FREE_POOL_ARG FreePool;
65 SMMBASE_COMMUNICATE_ARG Communicate;
66 } SMMBASE_FUNCTION_ARGS;
67
68 typedef enum {
69 SmmBaseFunctionRegister,
70 SmmBaseFunctionUnregister,
71 SmmBaseFunctionRegisterCallback,
72 SmmBaseFunctionAllocatePool,
73 SmmBaseFunctionFreePool,
74 SmmBaseFunctionCommunicate
75 } SMMBASE_FUNCTION;
76
77 typedef struct {
78 SMMBASE_FUNCTION Function;
79 EFI_STATUS Status;
80 SMMBASE_FUNCTION_ARGS Args;
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