From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 55B5ED80CAA for ; Thu, 21 Dec 2023 12:11:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=iaaZBU8G18li1AYJJiEkwLIg+5S0IYBHQSbOhvXZl98=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1703160685; v=1; b=gfUDkSXrUQDRUrkxkBDAlnnxpLJij2vjUQQ+XDm6aRT1Qhrb+FYj1vADJ9j0uuUTfUoMXdhL Tps/rM0NObiVtx1qJT923wjl8vSN+jD2qqIflU01p81Grn4w4Z3MpvvkYlM14gUxDeAjvGEOQzy aELbSLzcYre5Vq/ugJhvbzC0= X-Received: by 127.0.0.2 with SMTP id BPoYYY7687511xmdIjetBo9Q; Thu, 21 Dec 2023 04:11:25 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.50077.1703160683606357465 for ; Thu, 21 Dec 2023 04:11:24 -0800 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8Cx9OpoK4RloWwDAA--.13158S3; Thu, 21 Dec 2023 20:11:20 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxfb5nK4RlibwDAA--.12450S3; Thu, 21 Dec 2023 20:11:19 +0800 (CST) Message-ID: Date: Thu, 21 Dec 2023 20:11:19 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe To: Ard Biesheuvel , devel@edk2.groups.io Cc: ray.ni@intel.com, "Kumar, Rahul R" , Gerd Hoffmann , Leif Lindholm , Ard Biesheuvel , Sami Mujawar References: <20231212130932.2467028-1-lichao@loongson.cn> <17A017C201FEB90D.32321@groups.io> <9014a7b3-095c-42b1-a9ef-5a388818385d@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8Cxfb5nK4RlibwDAA--.12450S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAMCGWDoK4NDQAAst X-Coremail-Antispam: 1Uk129KBj9xXoWrKw45uF18uF15KryDJFWxXwc_yoWDuFb_K3 yvv3srJw40krn5JF17Jr17ZFW7JFZFqr48Aryktr1SyFyUZa1vqryvq3s3Kw4IqFZ8Kr1U GFn3Z34xXr9rWosvyTuYvTs0mTUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjDUYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUUbzkYFVCjjxCrM7AC 8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr v_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AK xVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14 v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8I j28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAv7VC0I7IYx2IY67AKxVWUGVWUXw Av7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx8G jcxK6IxK0xIIj40E5I8CrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2 jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0x ZFpf9x07jU189UUUUU= Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: VkFEWCNUwudNJBPrLT4vsGccx7686176AA= Content-Type: multipart/alternative; boundary="------------5F098EA8K8yIaSFpgCJE29DO" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=gfUDkSXr; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none --------------5F098EA8K8yIaSFpgCJE29DO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Ard, Thanks, Chao On 2023/12/21 15:31, Ard Biesheuvel wrote: > On Thu, 21 Dec 2023 at 04:48, Chao Li wrote: > ... >> Ard, >> >> PcdPciIoTranslationIsEnabled is only use for whether to trigger the Ffio= read or write, it seem that only x86 or x64 need them, not others. >> >> When I was submitted the patch V2, CpuIo2Dxe was private to LoongArch, j= ust like Arm and RISC-V. Gerd recommended finding a better place for ArmPci= CpuIo2Dxe so that other ARCH can easily use it. And then I found the UefiCp= uPkg/CpuIo2Dxe might be able to accommodate the MMIO methods, so I merged t= hem togeter in this change. >> > I think it makes sense to have a shared implementation under > UefiCpuPkg or even MdeModulePkg. But merging it with the x86 > implementation using function pointers that are dereferenced at > runtime seems unnecessary to me. So what do you suggest? Write some new functions to handle the MMIO=20 method under the CpuIo2Dxe? > > My preference would be to put this into MdeModulePkg, but Ray may have > a different view. Let's wait for Ray together. :) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112811): https://edk2.groups.io/g/devel/message/112811 Mute This Topic: https://groups.io/mt/103261693/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --------------5F098EA8K8yIaSFpgCJE29DO Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Ard,


=
Thanks,
Chao
On 2023/12/21 15:31, Ard Biesheuvel wrote:
On Thu, 21 Dec 2023 at 04:48, =
Chao Li <lichao@loongson.cn> wrote:

      
...
Ard,

PcdPciIoTranslationIsEnabled is only use for whether to trigger the Ffio re=
ad or write, it seem that only x86 or x64 need them, not others.

When I was submitted the patch V2, CpuIo2Dxe was private to LoongArch, just=
 like Arm and RISC-V. Gerd recommended finding a better place for ArmPciCpu=
Io2Dxe so that other ARCH can easily use it. And then I found the UefiCpuPk=
g/CpuIo2Dxe might be able to accommodate the MMIO methods, so I merged them=
 togeter in this change.

I think it makes sense to have a shared implementation under
UefiCpuPkg or even MdeModulePkg. But merging it with the x86
implementation using function pointers that are dereferenced at
runtime seems unnecessary to me.
So what do you suggest? Write some new functions to handle the MMIO method under the CpuIo2Dxe?

My preference would be to put this into MdeModulePkg, but Ray may have
a different view.
Let's wait for Ray together. :)

    
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#112811) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------5F098EA8K8yIaSFpgCJE29DO--