From 92ea7f231b3948395e6348ab6e38e3467eff7a3d Mon Sep 17 00:00:00 2001 From: ajfish Date: Sun, 22 Oct 2006 07:32:16 +0000 Subject: Updated the Runtime Driver to use the MDE libs for cache flush and removed local copy of Cache flush code. Updated FPD files that include Runtime driver as a new lib was added to Runtime Driver for the cache flush. Removed Cache Flush routine from EDK DXE SAL Lib. Cleaned up BaseLib IPF cache routines to only Flush ranges when needed and not to flush the entire cache. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1811 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c | 14 ++++---------- MdePkg/Library/BaseLib/BaseLib.msa | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'MdePkg/Library') diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c index 0c6f0e4dc8..17060eb70f 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c @@ -62,7 +62,7 @@ InvalidateInstructionCacheRange ( IN UINTN Length ) { - return IpfInvalidateInstructionCacheRange (Address, Length); + return IpfFlushCacheRange (Address, Length); } /** @@ -119,10 +119,7 @@ WriteBackInvalidateDataCacheRange ( { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); - if (Length > 0) { - WriteBackInvalidateDataCache (); - } - return Address; + return IpfFlushCacheRange (Address, Length); } /** @@ -178,10 +175,7 @@ WriteBackDataCacheRange ( { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); - if (Length > 0) { - WriteBackDataCache (); - } - return Address; + return IpfFlushCacheRange (Address, Length); } /** @@ -238,5 +232,5 @@ InvalidateDataCacheRange ( IN UINTN Length ) { - return WriteBackInvalidateDataCacheRange (Address, Length); + return IpfFlushCacheRange (Address, Length); } diff --git a/MdePkg/Library/BaseLib/BaseLib.msa b/MdePkg/Library/BaseLib/BaseLib.msa index 52dbf7304a..08f21eb7b2 100644 --- a/MdePkg/Library/BaseLib/BaseLib.msa +++ b/MdePkg/Library/BaseLib/BaseLib.msa @@ -425,7 +425,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Ipf/CpuFlushTlb.s Ipf/GetInterruptState.s Ipf/Non-existing.c - Ipf/InvalidateInstructionCacheRange.s + Ipf/FlushCacheRange.s Ipf/ReadItc.s Math64.c -- cgit v1.2.3