public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "wanghuiqiang" <wanghuiqiang@huawei.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"ray.ni@intel.com" <ray.ni@intel.com>,
	"xiewenyi (A)" <xiewenyi2@huawei.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	'Ard Biesheuvel' <ardb@kernel.org>,
	'Leif Lindholm' <leif@nuviainc.com>,
	"sami.mujawar@arm.com" <sami.mujawar@arm.com>
Cc: Songdongkuang <songdongkuang@huawei.com>
Subject: Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value
Date: Fri, 23 Jul 2021 08:15:33 +0000	[thread overview]
Message-ID: <3fd19156b38441c78d4a53bfce3d695a@huawei.com> (raw)
In-Reply-To: CO1PR11MB4930402E68F393DD1424BDF68CE19@CO1PR11MB4930.namprd11.prod.outlook.com

Dear all,

Any comments for this change?

Thanks!

-----Original Message-----
From: wanghuiqiang 
Sent: Monday, July 19, 2021 2:37 PM
To: 'devel@edk2.groups.io' <devel@edk2.groups.io>; 'ray.ni@intel.com' <ray.ni@intel.com>; xiewenyi (A) <xiewenyi2@huawei.com>; 'Wang, Jian J' <jian.j.wang@intel.com>; 'Wu, Hao A' <hao.a.wu@intel.com>; 'Ard Biesheuvel' <ardb@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'sami.mujawar@arm.com' <sami.mujawar@arm.com>
Cc: Songdongkuang <songdongkuang@huawei.com>
Subject: RE: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

+ Ard, Leif, Sami.
All OSes which use 64KB page size and the PCIe resource allocation rely on BIOS initialization will encounter VF BAR resource allocation issue.  

Thanks!

-----Original Message-----
From: wanghuiqiang 
Sent: Monday, July 19, 2021 2:02 PM
To: devel@edk2.groups.io; 'ray.ni@intel.com' <ray.ni@intel.com>; xiewenyi (A) <xiewenyi2@huawei.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
Cc: Songdongkuang <songdongkuang@huawei.com>
Subject: RE: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

Hi Ray,

52 bit address ranges are supported only when using the 64KB translation granule for ARM64 platform, this is another scenario using 64K page size. We need set PcdSrIovSystemPageSize to 0x10 in such case to make BIOS resource assignment still appropriate even PCI DSM#5 function set as 0 which means the operating system must preserve PCI resource assignments made by firmware at boot time.  
Please let me know if you have any other concern for this patch.

Thanks!

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Ni, Ray
Sent: Monday, July 19, 2021 10:35 AM
To: devel@edk2.groups.io; xiewenyi (A) <xiewenyi2@huawei.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
Cc: Songdongkuang <songdongkuang@huawei.com>; wanghuiqiang <wanghuiqiang@huawei.com>
Subject: Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

Wenyi,
Can you explain a bit more about "if 52 bit physical address need to be supported, page size should also be set to 64KB alignment"?

Can the platform DSC override this value instead of changing the default value in MdeModulePkg.dec which impacts all platforms?

Thanks,
Ray

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of wenyi,xie via groups.io
Sent: Thursday, July 15, 2021 8:25 PM
To: devel@edk2.groups.io; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
Cc: songdongkuang@huawei.com; wanghuiqiang@huawei.com; xiewenyi2@huawei.com
Subject: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

From: "wenyi.xie" <xiewenyi2@huawei.com>

The default value of PcdSrIovSystemPageSize is 0x1, it means the memory BAR is 4KB alignment. When page size of OS is set to 64KB, as the resource partitions are different between OS and BIOS, it will cause pcie failture. And if 52 bit physical address need to be supported, page size should also be set to 64KB alignment.
So modify the default vaule of PcdSrIovSystemPageSize to 0x10 can meet the requirement above. And even if the OS is 4KB alignment, new value of PCD is compatible for this situation.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
 MdeModulePkg/MdeModulePkg.dec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index ad84421cf3..426ea1b6cc 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -1853,7 +1853,7 @@
   #  BIT0 set indicates 4KB alignment<BR>
   #  BIT1 set indicates 8KB alignment<BR>
   # @Prompt SRIOV system page size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x10000047
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x10
+ 000047
 
   ## SMBIOS version.
   # @Prompt SMBIOS version.
--
2.20.1.windows.1












      parent reply	other threads:[~2021-07-23  8:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 12:24 [PATCH EDK2 v1 0/1] MdeModulePkg: Modify PCD default value wenyi,xie
2021-07-15 12:24 ` [PATCH EDK2 v1 1/1] " wenyi,xie
2021-07-16  1:27   ` [edk2-devel] " Wu, Hao A
2021-07-19  2:34   ` Ni, Ray
2021-07-19  6:02     ` wanghuiqiang
2021-07-19  6:36     ` wanghuiqiang
2021-07-23  8:15     ` wanghuiqiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fd19156b38441c78d4a53bfce3d695a@huawei.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox