summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorTaylor Beebe <taylor.d.beebe@gmail.com>2023-11-03 18:29:44 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-11-27 21:55:18 +0300
commit960c7b25c202690d970ba9b2c473def18957e11b (patch)
tree7f04f658896888a43b44f02bdca3224442d1c76e /BaseTools/Source/Python
parentcf78580a34d4794346ab08e0365e74a6f3fc29ca (diff)
downloadedk2-960c7b25c202690d970ba9b2c473def18957e11b.tar.xz
UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero
PiSmmCore fetches the EFI memory map and calls SplitTable() to split each loaded image section into its own descriptor with EFI_MEMORY_XP marking data sections and EFI_MEMORY_RO marking code sections. The SMM MAT logic is almost identical to the DXE MAT logic but goes a step further and also updates the memory map descriptors which describe image code and data sections to be of type EfiRuntimeServicesCode and EfiRuntimeServicesData respectively. The consolidated MAT logic (present in the new ImagePropertiesRecordLib) more closely follows the DXE MAT logic which identifies image code sections by the presence of the attribute EFI_MEMORY_RO in the descriptor and image data sections by the presence of the attribute EFI_MEMORY_XP. Because of the flow choice of the consolidated MAT logic, the SMM MAT logic should just use the attributes from the table returned by SplitTable(). Additionally, the function EnforceMemoryMapAttribute() in the SMM MAT logic will ensure that the CODE and DATA memory types have the desired attributes so bisecting this patch series at this commit will still function as before. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'BaseTools/Source/Python')
0 files changed, 0 insertions, 0 deletions