diff options
author | Star Zeng <star.zeng@intel.com> | 2016-04-22 15:13:47 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-06 16:19:45 +0800 |
commit | 174906b50d277afd55f4445e876cc23374d15cbf (patch) | |
tree | edac201fde4c0a4a8ef0fce5c3af2d8751f458f0 | |
parent | d02d716f1efeea642d72a66770d744779382b477 (diff) | |
download | edk2-platforms-174906b50d277afd55f4445e876cc23374d15cbf.tar.xz |
MdeModulePkg-MemoryProfile(1): Add SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET definition.
This patch enhance SMM memory profile SMM communication by using fixed
SMM communication buffer.
A new command SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET is added,
because we need to support get partial ProfileData to fixed SMM communication
buffer. If profile data is bigger than fixed SMM communication buffer,
the DXE agent need to call SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET
multiple times to get all data out.
This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS
requirement.
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
(cherry picked from commit 73e0de62826dffe8f9e32d6d0d18b54a8a5d3f38)
-rw-r--r-- | MdeModulePkg/Include/Guid/MemoryProfile.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/MdeModulePkg/Include/Guid/MemoryProfile.h b/MdeModulePkg/Include/Guid/MemoryProfile.h index a2f03256c3..9c70b9df39 100644 --- a/MdeModulePkg/Include/Guid/MemoryProfile.h +++ b/MdeModulePkg/Include/Guid/MemoryProfile.h @@ -1,7 +1,7 @@ /** @file
Memory profile data structure.
- Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
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
@@ -237,13 +237,15 @@ struct _EDKII_MEMORY_PROFILE_PROTOCOL { //
// SMRAM profile command
//
-#define SMRAM_PROFILE_COMMAND_GET_PROFILE_INFO 0x1
-#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA 0x2
+#define SMRAM_PROFILE_COMMAND_GET_PROFILE_INFO 0x1
+#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA 0x2
//
// Below 2 commands are now used by ECP only and only valid before SmmReadyToLock
//
-#define SMRAM_PROFILE_COMMAND_REGISTER_IMAGE 0x3
-#define SMRAM_PROFILE_COMMAND_UNREGISTER_IMAGE 0x4
+#define SMRAM_PROFILE_COMMAND_REGISTER_IMAGE 0x3
+#define SMRAM_PROFILE_COMMAND_UNREGISTER_IMAGE 0x4
+
+#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET 0x5
typedef struct {
UINT32 Command;
@@ -264,6 +266,21 @@ typedef struct { typedef struct {
SMRAM_PROFILE_PARAMETER_HEADER Header;
+ //
+ // On input, profile buffer size.
+ // On output, actual profile data size copied.
+ //
+ UINT64 ProfileSize;
+ PHYSICAL_ADDRESS ProfileBuffer;
+ //
+ // On input, profile buffer offset to copy.
+ // On output, next time profile buffer offset to copy.
+ //
+ UINT64 ProfileOffset;
+} SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA_BY_OFFSET;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
EFI_GUID FileName;
PHYSICAL_ADDRESS ImageBuffer;
UINT64 NumberOfPage;
|