]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Per Framework SMM CIS spec, SMM Base Protocol.Communicate() is availabe in runtime...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 10 Feb 2010 08:30:51 +0000 (08:30 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 10 Feb 2010 08:30:51 +0000 (08:30 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9966 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.h
EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.inf
EdkCompatibilityPkg/EdkCompatibilityPkg.dsc

index e7f13d41d8eba8a08ff80d00ca038907a15b70f8..085ad0ca8ea7df3cc1fcff084fbf85aeb9bb6a70 100644 (file)
@@ -8,7 +8,7 @@
   SMM BASE Protocol can be published immediately after SMM Base2 Protocol is installed to\r
   make SMM Base Protocol.InSmm() as early as possible.\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
@@ -456,6 +456,27 @@ SmmBaseHelperReadyProtocolNotification (
   gBS->LocateProtocol (&gEfiSmmBaseHelperReadyProtocolGuid, NULL, (VOID **) &mSmmBaseHelperReady);\r
 }\r
 \r
+/**\r
+  Notification function of EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE\r
+\r
+  This is a notification function registered on EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.\r
+  It convers pointer to new virtual address.\r
+\r
+  @param  Event        Event whose notification function is being invoked\r
+  @param  Context      Pointer to the notification function's context\r
+**/\r
+VOID\r
+EFIAPI\r
+SmmBaseAddressChangeEvent (\r
+  IN EFI_EVENT        Event,\r
+  IN VOID             *Context\r
+  )\r
+{\r
+  if (mSmmCommunication != NULL) {\r
+    EfiConvertPointer (0x0, (VOID **) &mSmmCommunication);\r
+  }\r
+}\r
+\r
 /**\r
   Entry Point for SMM Base Protocol on SMM Base2 Protocol Thunk driver.\r
 \r
@@ -471,7 +492,9 @@ SmmBaseThunkMain (
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
-  VOID *Registration;\r
+  VOID       *Registration;\r
+  EFI_EVENT  VirtualAddressChangeEvent;\r
+  EFI_STATUS Status;\r
 \r
   mImageHandle = ImageHandle;\r
 \r
@@ -513,6 +536,16 @@ SmmBaseThunkMain (
     &Registration\r
     );\r
 \r
+  Status = gBS->CreateEventEx (\r
+                  EVT_NOTIFY_SIGNAL,\r
+                  TPL_NOTIFY,\r
+                  SmmBaseAddressChangeEvent,\r
+                  NULL,\r
+                  &gEfiEventVirtualAddressChangeGuid,\r
+                  &VirtualAddressChangeEvent\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index 6fc3f192c54b8f36f308c070b25982b23c50bcec..ffe65086f3faf3c4cc7760bff0fefdb73484ea39 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Include file for SMM Base Protocol on SMM Base2 Protocol 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
@@ -21,7 +21,9 @@
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/UefiLib.h>\r
+#include <Library/UefiRuntimeLib.h>\r
 #include <Guid/SmmBaseThunkCommunication.h>\r
+#include <Guid/EventGroup.h>\r
 #include <Protocol/SmmBase2.h>\r
 #include <Protocol/SmmCommunication.h>\r
 #include <Protocol/SmmBaseHelperReady.h>\r
index cea74e81867a9d75a955ee442c43ce7c47cb65f9..87bf34409340de796b47ee15c411bbed9ed319d6 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Component description file for SMM Base Protocol on SMM Base2 Protocol Thunk driver.\r
 #\r
-#  Copyright (c) 2009, Intel Corporation\r
+#  Copyright (c) 2009 - 2010, Intel Corporation\r
 #\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
   UefiBootServicesTableLib\r
   DebugLib\r
   UefiLib\r
+  UefiRuntimeLib\r
+\r
+[Guids]\r
+  gEfiEventVirtualAddressChangeGuid   # GUID ALWAYS_CONSUMED\r
 \r
 [Protocols]\r
   gEfiSmmBase2ProtocolGuid            # PROTOCOL SOMETIMES_CONSUMED\r
index 40e38fc0f0cf437be5447430620883de1b5b0147..de025807e7cb7e0be09f63f0cc6bb005775181a8 100644 (file)
@@ -57,6 +57,8 @@ define GCC_MACRO                 = -DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_S
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   PalLib|MdePkg/Library/BasePalLibNull/BasePalLibNull.inf\r
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
+  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf\r
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r