Skip to content
Commit eaaf3eda authored by xianglai li's avatar xianglai li Committed by Ard Biesheuvel
Browse files

Platform/Loongson: Set Dxe common page size to 16k



The loongarch qemu tcg code section is 16K aligned by default.
When UEFI keep 4K alignment, the code section and data section
of UEFI are loaded into the same page by qemu, and when the data
is written to the page containing the code section, it will cause
qemu to refresh TB, resulting in qemu running slowly.Therefore,
setting Dxe to 16K alignment can ensure that the code section is
loaded into a page separately, avoid qemu repeatedly refreshing TB,
and speed up the execution speed of qemu.

The following shows the impact of Dxe 4K alignment and 16K alignment
on image size:

DXE 4k alignment:
DXEFV.FV 7.2M
After compression:
FVMAIN_COMPACT.Fv 3.4M
QEMU_EFI.fd 3.7M

DXE 16k alignment:
DXEFV.FV 9.5M
After compression:
FVMAIN_COMPACT.Fv 3.4M
QEMU_EFI.fd 3.7M

Signed-off-by: default avatarxianglai li <lixianglai@loongson.cn>
Reviewed-by: default avatarChao Li <lichao@loongson.cn>
parent 406291d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment