Reviewed-by: Chao Li Thanks, Chao 在 2023/5/11 09:33, xianglai 写道: > Default page size is 16K for loongarch qemu tcg code section > separated with data section with 16K page alignment, > And data write operation in the same page with code section > will cause qemu TB flush. > > Cc: Ard Biesheuvel > Cc: Bibo Mao > Cc: Chao Li > Cc: Leif Lindholm > Cc: Liming Gao > Cc: Michael D Kinney > Signed-off-by: xianglai li > --- > Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc > index 6875e39cc6..13b27d84b8 100644 > --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc > +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc > @@ -61,8 +61,13 @@ > [BuildOptions.LOONGARCH64.EDKII.SEC] > *_*_*_CC_FLAGS = > > +# > +# default page size is 16K for loongarch qemu tcg > +# code section separated with data section with 16K page alignment, else data > +# write operation in the same page with code section will cause qemu TB flush > +# > [BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION] > - GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x4000 > > [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > GCC:*_*_LOONGARCH64_DLINK_FLAGS = -z common-page-size=0x10000