[edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB

Yuanhao Xie posted 1 patch 6 months, 2 weeks ago
Failed in applying to current master (apply log)
Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
Posted by Yuanhao Xie 6 months, 2 weeks ago
With the fact that CSM is not supported,
the request is to remove the cache setting for memory under 1MB.
This can be treated as the missing part of legacy CSM deprecation.

This patch only set the 00000 to 9FFFF and C0000 to FFFFF as Write Back.
A0000-BFFFF range is still uncacheable for VGA.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
---
 Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
index 05728275a5..38a8db6b3f 100644
--- a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
+++ b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
@@ -245,7 +245,7 @@ SetCacheMtrrAfterEndOfPei (
                          &MtrrSetting,
                          0xC0000,
                          0x40000,
-                         CacheWriteProtected
+                         CacheWriteBack
                          );
   ASSERT_EFI_ERROR ( Status);
 
-- 
2.36.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109787): https://edk2.groups.io/g/devel/message/109787
Mute This Topic: https://groups.io/mt/102037244/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
Posted by Laszlo Ersek 6 months, 1 week ago
Yuanhao,

On 10/19/23 05:20, Yuanhao Xie wrote:
> With the fact that CSM is not supported,
> the request is to remove the cache setting for memory under 1MB.
> This can be treated as the missing part of legacy CSM deprecation.
> 
> This patch only set the 00000 to 9FFFF and C0000 to FFFFF as Write Back.
> A0000-BFFFF range is still uncacheable for VGA.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
> ---
>  Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
> index 05728275a5..38a8db6b3f 100644
> --- a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
> +++ b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
> @@ -245,7 +245,7 @@ SetCacheMtrrAfterEndOfPei (
>                           &MtrrSetting,
>                           0xC0000,
>                           0x40000,
> -                         CacheWriteProtected
> +                         CacheWriteBack
>                           );
>    ASSERT_EFI_ERROR ( Status);
>  

I find that this patch has been pushed as commit 474b81190261.

Previously, I commented that the subject line of the patch was
incorrect, because it didn't name MinPlatformPkg:

  https://edk2.groups.io/g/devel/message/109747

What was your reason for ignoring my comment?

Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110020): https://edk2.groups.io/g/devel/message/110020
Mute This Topic: https://groups.io/mt/102037244/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
Posted by Yuanhao Xie 6 months, 1 week ago
Hi Laszlo,

I searched for my name to find the patch, and did not find a numbered tag associated with the patch title, and overlook the comment. I'm sorry for the ignoring and inconvenience this have caused. Could you please help with reverting the patch? I will submit Version 2. 

Yuanhao
-----Original Message-----
From: Laszlo Ersek <lersek@redhat.com> 
Sent: Wednesday, October 25, 2023 4:00 PM
To: devel@edk2.groups.io; Xie, Yuanhao <yuanhao.xie@intel.com>
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB

Yuanhao,

On 10/19/23 05:20, Yuanhao Xie wrote:
> With the fact that CSM is not supported, the request is to remove the 
> cache setting for memory under 1MB.
> This can be treated as the missing part of legacy CSM deprecation.
> 
> This patch only set the 00000 to 9FFFF and C0000 to FFFFF as Write Back.
> A0000-BFFFF range is still uncacheable for VGA.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
> ---
>  
> Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.
> c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLi
> b.c 
> b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLi
> b.c
> index 05728275a5..38a8db6b3f 100644
> --- 
> a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLi
> b.c
> +++ b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMt
> +++ rrLib.c
> @@ -245,7 +245,7 @@ SetCacheMtrrAfterEndOfPei (
>                           &MtrrSetting,
>                           0xC0000,
>                           0x40000,
> -                         CacheWriteProtected
> +                         CacheWriteBack
>                           );
>    ASSERT_EFI_ERROR ( Status);
>  

I find that this patch has been pushed as commit 474b81190261.

Previously, I commented that the subject line of the patch was incorrect, because it didn't name MinPlatformPkg:

  https://edk2.groups.io/g/devel/message/109747

What was your reason for ignoring my comment?

Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110024): https://edk2.groups.io/g/devel/message/110024
Mute This Topic: https://groups.io/mt/102037244/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
Posted by Laszlo Ersek 6 months, 1 week ago
On 10/25/23 10:37, Xie, Yuanhao wrote:
> Hi Laszlo,
> 
> I searched for my name to find the patch, and did not find a numbered tag associated with the patch title, and overlook the comment. I'm sorry for the ignoring and inconvenience this have caused. Could you please help with reverting the patch? I will submit Version 2. 

I don't see much benefit in a revert at this point; the point would have
been to avoid a patch subject in the git commit history that's too
generic. But the history is already there at this point (we can't
rewrite it -- we can't rebase a public branch), and the code is alright
per review, so a revert won't help much here.

Laszlo

> 
> Yuanhao
> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com> 
> Sent: Wednesday, October 25, 2023 4:00 PM
> To: devel@edk2.groups.io; Xie, Yuanhao <yuanhao.xie@intel.com>
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
> Subject: Re: [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
> 
> Yuanhao,
> 
> On 10/19/23 05:20, Yuanhao Xie wrote:
>> With the fact that CSM is not supported, the request is to remove the 
>> cache setting for memory under 1MB.
>> This can be treated as the missing part of legacy CSM deprecation.
>>
>> This patch only set the 00000 to 9FFFF and C0000 to FFFFF as Write Back.
>> A0000-BFFFF range is still uncacheable for VGA.
>>
>> Cc: Chasel Chiu <chasel.chiu@intel.com>
>> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
>> Cc: Isaac Oram <isaac.w.oram@intel.com>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Cc: Eric Dong <eric.dong@intel.com>
>> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
>> ---
>>  
>> Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.
>> c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git 
>> a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLi
>> b.c 
>> b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLi
>> b.c
>> index 05728275a5..38a8db6b3f 100644
>> --- 
>> a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLi
>> b.c
>> +++ b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMt
>> +++ rrLib.c
>> @@ -245,7 +245,7 @@ SetCacheMtrrAfterEndOfPei (
>>                           &MtrrSetting,
>>                           0xC0000,
>>                           0x40000,
>> -                         CacheWriteProtected
>> +                         CacheWriteBack
>>                           );
>>    ASSERT_EFI_ERROR ( Status);
>>  
> 
> I find that this patch has been pushed as commit 474b81190261.
> 
> Previously, I commented that the subject line of the patch was incorrect, because it didn't name MinPlatformPkg:
> 
>   https://edk2.groups.io/g/devel/message/109747
> 
> What was your reason for ignoring my comment?
> 
> Laszlo
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110027): https://edk2.groups.io/g/devel/message/110027
Mute This Topic: https://groups.io/mt/102037244/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
Posted by Dong, Eric 6 months, 1 week ago
Reviewed-by: Eric Dong <eric.dong@intel.com>

-----Original Message-----
From: Xie, Yuanhao <yuanhao.xie@intel.com> 
Sent: Thursday, October 19, 2023 11:20 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>; Xie, Yuanhao <yuanhao.xie@intel.com>
Subject: [PATCH] Remove memory cache setting for memory under 1MB

With the fact that CSM is not supported, the request is to remove the cache setting for memory under 1MB.
This can be treated as the missing part of legacy CSM deprecation.

This patch only set the 00000 to 9FFFF and C0000 to FFFFF as Write Back.
A0000-BFFFF range is still uncacheable for VGA.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
---
 Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
index 05728275a5..38a8db6b3f 100644
--- a/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c
+++ b/Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrr
+++ Lib.c
@@ -245,7 +245,7 @@ SetCacheMtrrAfterEndOfPei (
                          &MtrrSetting,
                          0xC0000,
                          0x40000,
-                         CacheWriteProtected
+                         CacheWriteBack
                          );
   ASSERT_EFI_ERROR ( Status);
 
--
2.36.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110014): https://edk2.groups.io/g/devel/message/110014
Mute This Topic: https://groups.io/mt/102037244/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-