summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-04-22 15:13:47 +0800
committerJeff Fan <jeff.fan@intel.com>2016-06-20 09:06:55 +0800
commitc5621d9d57b5d645ac712c24e65570bedd3f9cc3 (patch)
tree2e76595c0959bdbf5c0aa7186c87c3e2b17868fd
parentb55aae99d1abe085b30becfe184a9a101bb8d402 (diff)
downloadedk2-c5621d9d57b5d645ac712c24e65570bedd3f9cc3.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> (cherry picked from commit 73e0de62826dffe8f9e32d6d0d18b54a8a5d3f38)
-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 3c1e5e79ca..4e90a05098 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, 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
@@ -236,13 +236,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;
@@ -263,6 +265,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;