summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c37
-rw-r--r--EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.h4
-rw-r--r--EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.inf6
-rw-r--r--EdkCompatibilityPkg/EdkCompatibilityPkg.dsc2
4 files changed, 45 insertions, 4 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
index e7f13d41d8..085ad0ca8e 100644
--- a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
+++ b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
@@ -8,7 +8,7 @@
SMM BASE Protocol can be published immediately after SMM Base2 Protocol is installed to
make SMM Base Protocol.InSmm() as early as possible.
- Copyright (c) 2009 Intel Corporation
+ Copyright (c) 2009 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -457,6 +457,27 @@ SmmBaseHelperReadyProtocolNotification (
}
/**
+ Notification function of EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
+
+ This is a notification function registered on EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.
+ It convers pointer to new virtual address.
+
+ @param Event Event whose notification function is being invoked
+ @param Context Pointer to the notification function's context
+**/
+VOID
+EFIAPI
+SmmBaseAddressChangeEvent (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+{
+ if (mSmmCommunication != NULL) {
+ EfiConvertPointer (0x0, (VOID **) &mSmmCommunication);
+ }
+}
+
+/**
Entry Point for SMM Base Protocol on SMM Base2 Protocol Thunk driver.
@param[in] ImageHandle Image handle of this driver.
@@ -471,7 +492,9 @@ SmmBaseThunkMain (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- VOID *Registration;
+ VOID *Registration;
+ EFI_EVENT VirtualAddressChangeEvent;
+ EFI_STATUS Status;
mImageHandle = ImageHandle;
@@ -513,6 +536,16 @@ SmmBaseThunkMain (
&Registration
);
+ Status = gBS->CreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
+ SmmBaseAddressChangeEvent,
+ NULL,
+ &gEfiEventVirtualAddressChangeGuid,
+ &VirtualAddressChangeEvent
+ );
+ ASSERT_EFI_ERROR (Status);
+
return EFI_SUCCESS;
}
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.h b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.h
index 6fc3f192c5..ffe65086f3 100644
--- a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.h
+++ b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.h
@@ -1,7 +1,7 @@
/** @file
Include file for SMM Base Protocol on SMM Base2 Protocol Thunk driver.
- Copyright (c) 2009, Intel Corporation
+ Copyright (c) 2009 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -21,7 +21,9 @@
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h>
+#include <Library/UefiRuntimeLib.h>
#include <Guid/SmmBaseThunkCommunication.h>
+#include <Guid/EventGroup.h>
#include <Protocol/SmmBase2.h>
#include <Protocol/SmmCommunication.h>
#include <Protocol/SmmBaseHelperReady.h>
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.inf b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.inf
index cea74e8186..87bf344093 100644
--- a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.inf
+++ b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.inf
@@ -1,7 +1,7 @@
## @file
# Component description file for SMM Base Protocol on SMM Base2 Protocol Thunk driver.
#
-# Copyright (c) 2009, Intel Corporation
+# Copyright (c) 2009 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -41,6 +41,10 @@
UefiBootServicesTableLib
DebugLib
UefiLib
+ UefiRuntimeLib
+
+[Guids]
+ gEfiEventVirtualAddressChangeGuid # GUID ALWAYS_CONSUMED
[Protocols]
gEfiSmmBase2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
diff --git a/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc b/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc
index 40e38fc0f0..de025807e7 100644
--- a/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc
+++ b/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc
@@ -57,6 +57,8 @@ define GCC_MACRO = -DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_S
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
PalLib|MdePkg/Library/BasePalLibNull/BasePalLibNull.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+ UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+ UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf