public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
@ 2023-10-18 11:55 Yuanhao Xie
  2023-10-18 13:28 ` Laszlo Ersek
  0 siblings, 1 reply; 7+ messages in thread
From: Yuanhao Xie @ 2023-10-18 11:55 UTC (permalink / raw)
  To: devel; +Cc: Yuanhao Xie

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.

M: Chasel Chiu <chasel.chiu@intel.com>
M: Nate DeSimone <nathaniel.l.desimone@intel.com>
M: Isaac Oram <isaac.w.oram@intel.com>
R: Liming Gao <gaoliming@byosoft.com.cn>
R: 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 (#109737): https://edk2.groups.io/g/devel/message/109737
Mute This Topic: https://groups.io/mt/102037244/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB
@ 2023-10-19  3:20 Yuanhao Xie
  2023-10-25  5:40 ` Dong, Eric
  2023-10-25  8:00 ` Laszlo Ersek
  0 siblings, 2 replies; 7+ messages in thread
From: Yuanhao Xie @ 2023-10-19  3:20 UTC (permalink / raw)
  To: devel
  Cc: Chasel Chiu, Nate DeSimone, Isaac Oram, Liming Gao, Eric Dong,
	Yuanhao Xie

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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-25  9:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 11:55 [edk2-devel] [PATCH] Remove memory cache setting for memory under 1MB Yuanhao Xie
2023-10-18 13:28 ` Laszlo Ersek
  -- strict thread matches above, loose matches on Subject: below --
2023-10-19  3:20 Yuanhao Xie
2023-10-25  5:40 ` Dong, Eric
2023-10-25  8:00 ` Laszlo Ersek
2023-10-25  8:37   ` Yuanhao Xie
2023-10-25  9:31     ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox