Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

2021-07-23 Thread wanghuiqiang via groups.io
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' ; 'ray...@intel.com' 
; xiewenyi (A) ; 'Wang, Jian J' 
; 'Wu, Hao A' ; 'Ard Biesheuvel' 
; 'Leif Lindholm' ; 'sami.muja...@arm.com' 

Cc: Songdongkuang 
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...@intel.com' ; xiewenyi (A) 
; Wang, Jian J ; Wu, Hao A 

Cc: Songdongkuang 
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) ; Wang, Jian J 
; Wu, Hao A 
Cc: Songdongkuang ; wanghuiqiang 

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  On Behalf Of wenyi,xie via 
groups.io
Sent: Thursday, July 15, 2021 8:25 PM
To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A 

Cc: songdongku...@huawei.com; wanghuiqi...@huawei.com; xiewen...@huawei.com
Subject: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

From: "wenyi.xie" 

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 
Cc: Hao A Wu 
Signed-off-by: Wenyi Xie 
---
 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
   #  BIT1 set indicates 8KB alignment
   # @Prompt SRIOV system page size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x1047
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x10
+ 47
 
   ## SMBIOS version.
   # @Prompt SMBIOS version.
--
2.20.1.windows.1













-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78120): https://edk2.groups.io/g/devel/message/78120
Mute This Topic: https://groups.io/mt/84223844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

2021-07-19 Thread wanghuiqiang via groups.io
+ 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...@intel.com' ; xiewenyi (A) 
; Wang, Jian J ; Wu, Hao A 

Cc: Songdongkuang 
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) ; Wang, Jian J 
; Wu, Hao A 
Cc: Songdongkuang ; wanghuiqiang 

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  On Behalf Of wenyi,xie via 
groups.io
Sent: Thursday, July 15, 2021 8:25 PM
To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A 

Cc: songdongku...@huawei.com; wanghuiqi...@huawei.com; xiewen...@huawei.com
Subject: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

From: "wenyi.xie" 

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 
Cc: Hao A Wu 
Signed-off-by: Wenyi Xie 
---
 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
   #  BIT1 set indicates 8KB alignment
   # @Prompt SRIOV system page size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x1047
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x10
+ 47
 
   ## SMBIOS version.
   # @Prompt SMBIOS version.
--
2.20.1.windows.1













-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77895): https://edk2.groups.io/g/devel/message/77895
Mute This Topic: https://groups.io/mt/84223844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

2021-07-19 Thread wanghuiqiang via groups.io
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) ; Wang, Jian J 
; Wu, Hao A 
Cc: Songdongkuang ; wanghuiqiang 

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  On Behalf Of wenyi,xie via 
groups.io
Sent: Thursday, July 15, 2021 8:25 PM
To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A 

Cc: songdongku...@huawei.com; wanghuiqi...@huawei.com; xiewen...@huawei.com
Subject: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

From: "wenyi.xie" 

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 
Cc: Hao A Wu 
Signed-off-by: Wenyi Xie 
---
 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
   #  BIT1 set indicates 8KB alignment
   # @Prompt SRIOV system page size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x1047
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x10
+ 47
 
   ## SMBIOS version.
   # @Prompt SMBIOS version.
--
2.20.1.windows.1













-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77894): https://edk2.groups.io/g/devel/message/77894
Mute This Topic: https://groups.io/mt/84223844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

2021-07-18 Thread Ni, Ray
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  On Behalf Of wenyi,xie via 
groups.io
Sent: Thursday, July 15, 2021 8:25 PM
To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A 

Cc: songdongku...@huawei.com; wanghuiqi...@huawei.com; xiewen...@huawei.com
Subject: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

From: "wenyi.xie" 

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 
Cc: Hao A Wu 
Signed-off-by: Wenyi Xie 
---
 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
   #  BIT1 set indicates 8KB alignment
   # @Prompt SRIOV system page size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x1047
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x10
+ 47
 
   ## SMBIOS version.
   # @Prompt SMBIOS version.
--
2.20.1.windows.1








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77863): https://edk2.groups.io/g/devel/message/77863
Mute This Topic: https://groups.io/mt/84223844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

2021-07-15 Thread Wu, Hao A
(Add Ray)
Hello Ray, do you have comments on changing the default value of 
PcdSrIovSystemPageSize from 0x1 to 0x10?

I am not quite sure if there will be compatibility issue for this change.

Best Regards,
Hao Wu

> -Original Message-
> From: 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 ; Wu, Hao A
> 
> Cc: songdongku...@huawei.com; wanghuiqi...@huawei.com;
> xiewen...@huawei.com
> Subject: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD
> default value
> 
> From: "wenyi.xie" 
> 
> 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 
> Cc: Hao A Wu 
> Signed-off-by: Wenyi Xie 
> ---
>  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
>#  BIT1 set indicates 8KB alignment
># @Prompt SRIOV system page size.
> -
> gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|
> 0x1047
> +
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32
> |0x10
> + 47
> 
>## SMBIOS version.
># @Prompt SMBIOS version.
> --
> 2.20.1.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77821): https://edk2.groups.io/g/devel/message/77821
Mute This Topic: https://groups.io/mt/84223844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value

2021-07-15 Thread wenyi,xie via groups.io
From: "wenyi.xie" 

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 
Cc: Hao A Wu 
Signed-off-by: Wenyi Xie 
---
 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
   #  BIT1 set indicates 8KB alignment
   # @Prompt SRIOV system page size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x1047
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x1047
 
   ## SMBIOS version.
   # @Prompt SMBIOS version.
-- 
2.20.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77810): https://edk2.groups.io/g/devel/message/77810
Mute This Topic: https://groups.io/mt/84223844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-