Revision: 19126
http://sourceforge.net/p/edk2/code/19126
Author: vanjeff
Date: 2015-12-07 02:21:29 +0000 (Mon, 07 Dec 2015)
Log Message:
-----------
Move CommunicationBuffer from stack to global variable.
We had put communication buffer to Runtime memory,
so that SMI handler can know it is not used by OS.
(Sync patch r18949 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <[email protected]>
Reviewed-by: "Zeng, Star" <[email protected]>
Reviewed-by: "Kinney, Michael D" <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/18949
Modified Paths:
--------------
branches/UDK2015/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
Modified: branches/UDK2015/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
===================================================================
--- branches/UDK2015/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c 2015-12-07
02:04:22 UTC (rev 19125)
+++ branches/UDK2015/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c 2015-12-07
02:21:29 UTC (rev 19126)
@@ -246,6 +246,8 @@
EFI_PHYSICAL_ADDRESS mSmramCacheBase;
UINT64 mSmramCacheSize;
+EFI_SMM_COMMUNICATE_HEADER mCommunicateHeader;
+
//
// Table of Protocol notification and GUIDed Event notifications that the SMM
IPL requires
//
@@ -538,21 +540,20 @@
IN VOID *Context
)
{
- EFI_SMM_COMMUNICATE_HEADER CommunicateHeader;
UINTN Size;
//
// Use Guid to initialize EFI_SMM_COMMUNICATE_HEADER structure
//
- CopyGuid (&CommunicateHeader.HeaderGuid, (EFI_GUID *)Context);
- CommunicateHeader.MessageLength = 1;
- CommunicateHeader.Data[0] = 0;
+ CopyGuid (&mCommunicateHeader.HeaderGuid, (EFI_GUID *)Context);
+ mCommunicateHeader.MessageLength = 1;
+ mCommunicateHeader.Data[0] = 0;
//
// Generate the Software SMI and return the result
//
- Size = sizeof (CommunicateHeader);
- SmmCommunicationCommunicate (&mSmmCommunication, &CommunicateHeader, &Size);
+ Size = sizeof (mCommunicateHeader);
+ SmmCommunicationCommunicate (&mSmmCommunication, &mCommunicateHeader, &Size);
}
/**
@@ -569,7 +570,6 @@
IN VOID *Context
)
{
- EFI_SMM_COMMUNICATE_HEADER CommunicateHeader;
UINTN Size;
EFI_STATUS Status;
@@ -582,20 +582,20 @@
// Clear the buffer passed into the Software SMI. This buffer will return
// the status of the SMM Core Dispatcher.
//
- CopyGuid (&CommunicateHeader.HeaderGuid, (EFI_GUID *)Context);
- CommunicateHeader.MessageLength = 1;
- CommunicateHeader.Data[0] = 0;
+ CopyGuid (&mCommunicateHeader.HeaderGuid, (EFI_GUID *)Context);
+ mCommunicateHeader.MessageLength = 1;
+ mCommunicateHeader.Data[0] = 0;
//
// Generate the Software SMI and return the result
//
- Size = sizeof (CommunicateHeader);
- SmmCommunicationCommunicate (&mSmmCommunication, &CommunicateHeader,
&Size);
+ Size = sizeof (mCommunicateHeader);
+ SmmCommunicationCommunicate (&mSmmCommunication, &mCommunicateHeader,
&Size);
//
// Return if there is no request to restart the SMM Core Dispatcher
//
- if (CommunicateHeader.Data[0] != COMM_BUFFER_SMM_DISPATCH_RESTART) {
+ if (mCommunicateHeader.Data[0] != COMM_BUFFER_SMM_DISPATCH_RESTART) {
return;
}
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits