summaryrefslogtreecommitdiffstats
path: root/BaseTools/BuildEnv
diff options
context:
space:
mode:
authorTaylor Beebe <taylor.d.beebe@gmail.com>2023-11-20 12:07:02 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-11-27 18:55:18 +0000
commitacb29d4cbeb4f11c33576fcde438d0a37e053933 (patch)
tree575349d3b92ffd1cf3793f46c073e711582d85b0 /BaseTools/BuildEnv
parent0a9e2153129828d4df1653f449b1a846095aca3d (diff)
downloadedk2-acb29d4cbeb4f11c33576fcde438d0a37e053933.tar.gz
edk2-acb29d4cbeb4f11c33576fcde438d0a37e053933.tar.bz2
edk2-acb29d4cbeb4f11c33576fcde438d0a37e053933.zip
MdeModulePkg: Fix MAT Descriptor Count Calculation
|4K PAGE|DATA|CODE|DATA|CODE|DATA|4K PAGE| Say the above memory region is currently one memory map descriptor. The above image memory layout example contains two code sections oriented in a way that maximizes the number of descriptors which would be required to describe each section. NOTE: It's unlikely that a data section would ever be between two code sections, but it's still handled by the below formula for correctness. There are two code sections (let's say CodeSegmentMax == 2), three data sections, and two unrelated memory regions flanking the image. The number of required descriptors to describe this layout will be 2 * 2 + 3 == 7. This patch updates the calculations to account for the worst-case scenario. 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>
Diffstat (limited to 'BaseTools/BuildEnv')
0 files changed, 0 insertions, 0 deletions