diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2024-05-24 14:51:47 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-28 15:25:27 +0000 |
commit | 2c5d329e20f0a50af58c572af332825f8cb40ad5 (patch) | |
tree | fda1670ca6379d3d54354c47a5dec85fe1e8b1a4 /UefiCpuPkg | |
parent | 21a2c8ae2a3802198838a9b5e3ae5a7d2ba0e7d8 (diff) | |
download | edk2-2c5d329e20f0a50af58c572af332825f8cb40ad5.tar.gz |
UefiCpuPkg: Add MM Profile related definitions
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Co-authored-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Include/Guid/MmProfileData.h | 35 | ||||
-rw-r--r-- | UefiCpuPkg/UefiCpuPkg.dec | 3 |
2 files changed, 38 insertions, 0 deletions
diff --git a/UefiCpuPkg/Include/Guid/MmProfileData.h b/UefiCpuPkg/Include/Guid/MmProfileData.h new file mode 100644 index 0000000000..64c9f78ccd --- /dev/null +++ b/UefiCpuPkg/Include/Guid/MmProfileData.h @@ -0,0 +1,35 @@ +/** @file
+ This file contains related definitions to support MM Profile feature in standalone MM.
+
+ Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef MM_PROFILE_DATA_H_
+#define MM_PROFILE_DATA_H_
+
+///
+/// This GUID is assigned to the Name field of EFI_HOB_MEMORY_ALLOCATION.AllocDescriptor.
+/// It signifies that the corresponding EFI_HOB_MEMORY_ALLOCATION HOB points to the location of MM Profile data.
+/// MM Profile is a feature designed to log accesses to non-MM regions by standalone MM.
+/// It stores these access logs within the MM Profile data.
+///
+#define MM_PROFILE_DATA_HOB_GUID \
+ { \
+ 0x26ef081d, 0x19b0, 0x4c42, {0xa2, 0x57, 0xa7, 0xf5, 0x9f, 0x8b, 0xd0, 0x38} \
+ }
+
+///
+/// In standalone MM, the policy for accessing non-MM regions is simplified:
+/// Non-MM regions and their access policies are specified by EFI_HOB_RESOURCE_DESCRIPTOR HOBs.
+/// Accesses to regions marked with the MM_RESOURCE_ATTRIBUTE_LOGGING attribute
+/// are permitted in standalone MM, and these accesses are logged in the MM Profile data.
+/// This attribute is not utilized by the SMM Profile feature in traditional SMM.
+///
+#define MM_RESOURCE_ATTRIBUTE_LOGGING 0x10000000
+
+extern EFI_GUID gMmProfileDataHobGuid;
+
+#endif
diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index 5ee4efc3fa..140500d521 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -111,6 +111,9 @@ ## Include/Guid/MmUnblockRegion.h
gMmUnblockRegionHobGuid = { 0x7c316fb3, 0x849e, 0x4ee7, { 0x87, 0xfc, 0x16, 0x2d, 0x0b, 0x03, 0x42, 0xbf }}
+ ## Include/Guid/MmProfileData.h
+ gMmProfileDataHobGuid = { 0x26ef081d, 0x19b0, 0x4c42, { 0xa2, 0x57, 0xa7, 0xf5, 0x9f, 0x8b, 0xd0, 0x38 }}
+
[Protocols]
## Include/Protocol/SmmCpuService.h
gEfiSmmCpuServiceProtocolGuid = { 0x1d202cab, 0xc8ab, 0x4d5c, { 0x94, 0xf7, 0x3c, 0xfc, 0xc0, 0xd3, 0xd3, 0x35 }}
|