4ec2fab279
MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib
...
Update DumpImageRecord() to be DumpImageRecords(), and improve
the debug output. The function will output at DEBUG_INFO instead,
and the function will be run in DXE and SMM
MAT logic when the MAT is installed at EndOfDxe on DEBUG builds.
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 >
2023-11-27 18:55:18 +00:00
3565ee6c29
MdeModulePkg: Add Logic to Create/Delete Image Properties Records
...
Add logic to create and delete image properties records. Where
applicable, redirect existing code to use the new library.
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 >
2023-11-27 18:55:18 +00:00
aa77dac3fb
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 >
2023-11-27 18:55:18 +00:00
cf78580a34
MdeModulePkg: Add NULL checks and Return Status to ImagePropertiesRecordLib
...
Update function headers to clarify the contract of each function and
improve readability. Add NULL checks to all functions that take a
pointer as an argument. Add return status to functions that
may need to return early due to invalid input.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Dandan Bi <dandan.bi@intel.com >
Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2023-11-27 18:55:18 +00:00
7284c44951
MdeModulePkg: Move Some DXE MAT Logic to ImagePropertiesRecordLib
...
Move some DXE MAT logic to ImagePropertiesRecordLib to consolidate
code and enable unit testability.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Dandan Bi <dandan.bi@intel.com >
Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2023-11-27 18:55:18 +00:00
8bc44608b8
MdeModulePkg: Add ImagePropertiesRecordLib
...
Create a library for manipulating image properties records. The
library is currently blank and will be filled in a future patch
to help with reviewer readability.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Dandan Bi <dandan.bi@intel.com >
Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2023-11-27 18:55:18 +00:00