2 Include file for SMM Base Helper SMM driver.
4 Copyright (c) 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _SMM_BASE_HELPER_H_
16 #define _SMM_BASE_HELPER_H_
19 #include <Library/DebugLib.h>
20 #include <Library/UefiBootServicesTableLib.h>
21 #include <Library/SmmServicesTableLib.h>
22 #include <Library/BaseLib.h>
23 #include <Library/BaseMemoryLib.h>
24 #include <Library/PeCoffLib.h>
25 #include <Library/DevicePathLib.h>
26 #include <Library/CacheMaintenanceLib.h>
27 #include <Guid/SmmBaseThunkCommunication.h>
28 #include <Protocol/SmmBaseHelperReady.h>
29 #include <Protocol/SmmCpu.h>
30 #include <Protocol/LoadedImage.h>
31 #include <Common/CpuSaveState.h>
34 /// Structure for tracking paired information of registered Framework SMI handler
35 /// and correpsonding dispatch handle for SMI handler thunk.
39 EFI_HANDLE DispatchHandle
;
40 EFI_HANDLE SmmImageHandle
;
41 EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress
;
46 /// PI SMM CPU Save State register index
48 EFI_SMM_SAVE_STATE_REGISTER Register
;
50 /// Offset in Framework SMST
53 } CPU_SAVE_STATE_CONVERSION
;
55 #define CPU_SAVE_STATE_GET_OFFSET(Field) (UINTN)(&(((EFI_SMM_CPU_SAVE_STATE *) 0)->Ia32SaveState.Field))