From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.35539.1683769405726680154 for ; Wed, 10 May 2023 18:43:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: maobibo@loongson.cn) Received: from loongson.cn (unknown [10.20.42.170]) by gateway (Coremail) with SMTP id _____8Cxd+k8SFxk0pgHAA--.12779S3; Thu, 11 May 2023 09:43:24 +0800 (CST) Received: from [10.20.42.170] (unknown [10.20.42.170]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxHLc7SFxkEhBVAA--.20308S3; Thu, 11 May 2023 09:43:23 +0800 (CST) Message-ID: Date: Thu, 11 May 2023 09:43:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [edk2-platforms] Platform/Loongson: Set common page size to 16k To: xianglai li , devel@edk2.groups.io Cc: Ard Biesheuvel , Chao Li , Leif Lindholm , Liming Gao , Michael D Kinney References: <163e3c7aa13b5334c6ece2307d26246fb5043716.1683768785.git.lixianglai@loongson.cn> From: "maobibo" In-Reply-To: <163e3c7aa13b5334c6ece2307d26246fb5043716.1683768785.git.lixianglai@loongson.cn> X-CM-TRANSID: AQAAf8BxHLc7SFxkEhBVAA--.20308S3 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7ZrykuFykJF43urWfWFy8Krg_yoW8CF13pF 1293W7Kr18JrW7Zw1kAa4Du3yavFZ8Jr4DJFsrGw4fC3WDXw1kua4YvrWFyry5J34FyFyq vrWI9w4Uua1UZ3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bxAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4j6r4UJwAS 0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4CEbIxvr21l42 xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWU GwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI4 8JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4U MIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I 8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07URa0PUUUUU= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 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 > 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