This driver is the counterpart of the SMM Base On SMM Base2 Thunk driver. It\r
provides helping services in SMM to the SMM Base On SMM Base2 Thunk driver.\r
\r
- Copyright (c) 2009, Intel Corporation\r
+ Copyright (c) 2009 - 2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-#include "SmmBaseHelper.h"\r
+#include <PiSmm.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/SmmServicesTableLib.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/PeCoffLib.h>\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/CacheMaintenanceLib.h>\r
+#include <Guid/SmmBaseThunkCommunication.h>\r
+#include <Protocol/SmmBaseHelperReady.h>\r
+#include <Protocol/SmmCpu.h>\r
+#include <Protocol/LoadedImage.h>\r
+#include <Protocol/SmmCpuSaveState.h>\r
+\r
+///\r
+/// Structure for tracking paired information of registered Framework SMI handler\r
+/// and correpsonding dispatch handle for SMI handler thunk.\r
+///\r
+typedef struct {\r
+ LIST_ENTRY Link;\r
+ EFI_HANDLE DispatchHandle;\r
+ EFI_HANDLE SmmImageHandle;\r
+ EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress;\r
+} CALLBACK_INFO;\r
+\r
+typedef struct {\r
+ ///\r
+ /// PI SMM CPU Save State register index\r
+ ///\r
+ EFI_SMM_SAVE_STATE_REGISTER Register;\r
+ ///\r
+ /// Offset in Framework SMST\r
+ ///\r
+ UINTN Offset;\r
+} CPU_SAVE_STATE_CONVERSION;\r
+\r
+#define CPU_SAVE_STATE_GET_OFFSET(Field) (UINTN)(&(((EFI_SMM_CPU_SAVE_STATE *) 0)->Ia32SaveState.Field))\r
+\r
\r
EFI_HANDLE mDispatchHandle;\r
EFI_SMM_CPU_PROTOCOL *mSmmCpu;\r