From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mx.groups.io with SMTP id smtpd.web10.24597.1626674540557699375 for ; Sun, 18 Jul 2021 23:02:21 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.188, mailfrom: wanghuiqiang@huawei.com) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GSrkQ70plz7wRb for ; Mon, 19 Jul 2021 13:58:38 +0800 (CST) Received: from dggpemm000002.china.huawei.com (7.185.36.174) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 19 Jul 2021 14:02:16 +0800 Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm000002.china.huawei.com (7.185.36.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 19 Jul 2021 14:02:16 +0800 Received: from dggpemm500006.china.huawei.com ([7.185.36.236]) by dggpemm500006.china.huawei.com ([7.185.36.236]) with mapi id 15.01.2176.012; Mon, 19 Jul 2021 14:02:16 +0800 From: wanghuiqiang@huawei.com To: "devel@edk2.groups.io" , "ray.ni@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 Thread-Topic: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg: Modify PCD default value Thread-Index: AQHXeXUSHIP+fOWLZkqTQ34hkVliHKtJFDqAgACLQQA= Date: Mon, 19 Jul 2021 06:02:15 +0000 Message-ID: <3df0e36883614ebaabac5afb6b4d8863@huawei.com> References: <1626351895-21064-1-git-send-email-xiewenyi2@huawei.com> <1626351895-21064-2-git-send-email-xiewenyi2@huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.40.193.81] MIME-Version: 1.0 X-CFilter-Loop: Reflected Content-Language: zh-CN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray, 52 bit address ranges are supported only when using the 64KB translation g= ranule 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 firmwar= e 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 def= ault value Wenyi, Can you explain a bit more about "if 52 bit physical address need to be su= pported, page size should also be set to 64KB alignment"? Can the platform DSC override this value instead of changing the default v= alue in MdeModulePkg.dec which impacts all platforms? Thanks, Ray -----Original Message----- From: devel@edk2.groups.io On Behalf Of wenyi,xie v= ia groups.io Sent: Thursday, July 15, 2021 8:25 PM To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A = Cc: songdongkuang@huawei.com; wanghuiqiang@huawei.com; xiewenyi2@huawei.co= m 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 BA= R is 4KB alignment. When page size of OS is set to 64KB, as the resource pa= rtitions are different between OS and BIOS, it will cause pcie failture. An= d 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 i= s 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|0x1000= 0047 + + gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x10|UINT32|0x10 + 000047 =20 ## SMBIOS version. # @Prompt SMBIOS version. -- 2.20.1.windows.1