diff options
author | Taylor Beebe <taylor.d.beebe@gmail.com> | 2023-11-03 08:29:44 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-27 18:55:18 +0000 |
commit | aa77dac3fb2c2861ee841809075b615359bf6352 (patch) | |
tree | 69759864409732787c5393d8d2f1c095c435a6f3 /MdeModulePkg/Library | |
parent | 960c7b25c202690d970ba9b2c473def18957e11b (diff) | |
download | edk2-aa77dac3fb2c2861ee841809075b615359bf6352.tar.gz edk2-aa77dac3fb2c2861ee841809075b615359bf6352.tar.bz2 edk2-aa77dac3fb2c2861ee841809075b615359bf6352.zip |
MdeModulePkg: Transition SMM MAT Logic to Use ImagePropertiesRecordLib
Now that the bugs are fixed in the MAT logic, we can remove the
duplicate logic from PiSmmCore/MemoryAttributesTable.c and use
ImagePropertiesRecordLib instead.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c b/MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c index c9378679e7..9b296aa457 100644 --- a/MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c +++ b/MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c @@ -784,6 +784,35 @@ SortImageRecord ( }
/**
+ Dump image record.
+
+ @param[in] ImageRecordList A list of IMAGE_PROPERTIES_RECORD entries
+**/
+VOID
+EFIAPI
+DumpImageRecord (
+ IN LIST_ENTRY *ImageRecordList
+ )
+{
+ IMAGE_PROPERTIES_RECORD *ImageRecord;
+ LIST_ENTRY *ImageRecordLink;
+ UINTN Index;
+
+ for (ImageRecordLink = ImageRecordList->ForwardLink, Index = 0;
+ ImageRecordLink != ImageRecordList;
+ ImageRecordLink = ImageRecordLink->ForwardLink, Index++)
+ {
+ ImageRecord = CR (
+ ImageRecordLink,
+ IMAGE_PROPERTIES_RECORD,
+ Link,
+ IMAGE_PROPERTIES_RECORD_SIGNATURE
+ );
+ DEBUG ((DEBUG_VERBOSE, "Image[%d]: 0x%016lx - 0x%016lx\n", Index, ImageRecord->ImageBase, ImageRecord->ImageSize));
+ }
+}
+
+/**
Find image record according to image base and size.
@param[in] ImageBase Base of PE image
|