summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-04-22 15:13:47 +0800
committerJiewen Yao <jiewen.yao@intel.com>2016-04-29 12:49:11 +0800
commit73e0de62826dffe8f9e32d6d0d18b54a8a5d3f38 (patch)
tree8eab972eb4e39afabcd31be8495b8f4a9c5432ee /MdeModulePkg/Include
parent6e4e6ffda448b77a3b2f3549137aca5c1b62cb4a (diff)
downloadedk2-73e0de62826dffe8f9e32d6d0d18b54a8a5d3f38.tar.gz
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>
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r--MdeModulePkg/Include/Guid/MemoryProfile.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/MdeModulePkg/Include/Guid/MemoryProfile.h b/MdeModulePkg/Include/Guid/MemoryProfile.h
index a2f03256c..9c70b9df3 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;