public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms] Platform/Loongson: Set common page size to 16k
@ 2023-05-11  1:33 xianglai
  2023-05-11  1:43 ` [edk2-devel] " Chao Li
  2023-05-11  1:43 ` maobibo
  0 siblings, 2 replies; 3+ messages in thread
From: xianglai @ 2023-05-11  1:33 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Bibo Mao, Chao Li, Leif Lindholm, Liming Gao,
	Michael D Kinney

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 <ardb+tianocore@kernel.org>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: xianglai li <lixianglai@loongson.cn>
---
 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
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [edk2-platforms] Platform/Loongson: Set common page size to 16k
  2023-05-11  1:33 [edk2-platforms] Platform/Loongson: Set common page size to 16k xianglai
@ 2023-05-11  1:43 ` Chao Li
  2023-05-11  1:43 ` maobibo
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Li @ 2023-05-11  1:43 UTC (permalink / raw)
  To: devel, lixianglai
  Cc: Ard Biesheuvel, Bibo Mao, Leif Lindholm, Liming Gao,
	Michael D Kinney

[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]

Reviewed-by: Chao Li <lichao@loongson.cn>


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<ardb+tianocore@kernel.org>
> Cc: Bibo Mao<maobibo@loongson.cn>
> Cc: Chao Li<lichao@loongson.cn>
> Cc: Leif Lindholm<quic_llindhol@quicinc.com>
> Cc: Liming Gao<gaoliming@byosoft.com.cn>
> Cc: Michael D Kinney<michael.d.kinney@intel.com>
> Signed-off-by: xianglai li<lixianglai@loongson.cn>
> ---
>   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

[-- Attachment #2: Type: text/html, Size: 2983 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-platforms] Platform/Loongson: Set common page size to 16k
  2023-05-11  1:33 [edk2-platforms] Platform/Loongson: Set common page size to 16k xianglai
  2023-05-11  1:43 ` [edk2-devel] " Chao Li
@ 2023-05-11  1:43 ` maobibo
  1 sibling, 0 replies; 3+ messages in thread
From: maobibo @ 2023-05-11  1:43 UTC (permalink / raw)
  To: xianglai li, devel
  Cc: Ard Biesheuvel, Chao Li, Leif Lindholm, Liming Gao,
	Michael D Kinney



在 2023/5/11 09:33, xianglai li 写道:
> 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.
Xianglai,

Could you add more data supporting? such as size of dxe ffs image and 
dxe compaction ffs.

Regards
Bibo, Mao

> 
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Bibo Mao <maobibo@loongson.cn>
> Cc: Chao Li <lichao@loongson.cn>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: xianglai li <lixianglai@loongson.cn>
> ---
>  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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-11  1:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11  1:33 [edk2-platforms] Platform/Loongson: Set common page size to 16k xianglai
2023-05-11  1:43 ` [edk2-devel] " Chao Li
2023-05-11  1:43 ` maobibo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox