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
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
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
&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