</ModuleSA>\r
<ModuleSA SupArchList="IA32" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="B601F8C4-43B7-4784-95B1-F4226CB40CEE">\r
<Libraries>\r
+ <Instance ModuleGuid="123dd843-57c9-4158-8418-ce68b3944ce7" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
</ModuleSA>\r
<ModuleSA SupArchList="X64" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="B601F8C4-43B7-4784-95B1-F4226CB40CEE">\r
<Libraries>\r
+ <Instance ModuleGuid="123dd843-57c9-4158-8418-ce68b3944ce7" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
</ModuleSA>\r
<ModuleSA SupArchList="IPF" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="B601F8C4-43B7-4784-95B1-F4226CB40CEE">\r
<Libraries>\r
+ <Instance ModuleGuid="123dd843-57c9-4158-8418-ce68b3944ce7" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
)\r
;\r
\r
-VOID\r
-EFIAPI\r
-SalFlushCache (\r
- IN EFI_PHYSICAL_ADDRESS Start,\r
- IN UINT64 Length\r
- )\r
-;\r
\r
#endif\r
<SourceFiles>\r
<Filename SupArchList="IPF">Ipf/EsalServiceLib.c</Filename>\r
<Filename SupArchList="IPF">Ipf/AsmEsalServiceLib.s</Filename>\r
- <Filename SupArchList="IPF">Ipf/AsmIpfCpuCache.s</Filename>\r
</SourceFiles>\r
<PackageDependencies>\r
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
RuntimeImage->RelocationData\r
);\r
\r
- FlushCpuCache (RuntimeImage->ImageBase, (UINT64)RuntimeImage->ImageSize);\r
+ InvalidateInstructionCacheRange ((VOID *)(UINTN)RuntimeImage->ImageBase, (UINTN)RuntimeImage->ImageSize);\r
}\r
}\r
//\r
VOID\r
RelocatePeImageForRuntime (\r
RUNTIME_IMAGE_RELOCATION_DATA *Image\r
- )\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
IN VOID *Data,\r
IN UINTN DataSize,\r
OUT UINT32 *CrcOut\r
- )\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
IN EFI_PHYSICAL_ADDRESS ImageBase,\r
IN UINTN ImageSize,\r
IN VOID *RelocationData\r
- )\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
IN EFI_EVENT_NOTIFY NotifyFunction,\r
IN VOID *NotifyContext,\r
IN EFI_EVENT *Event\r
- )\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
RuntimeDriverConvertPointer (\r
IN UINTN DebugDisposition,\r
IN OUT VOID **ConvertAddress\r
- )\r
-;\r
+ );\r
\r
VOID\r
RuntimeDriverInitializeCrc32Table (\r
VOID\r
- )\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
RuntimeDriverInitialize (\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-;\r
+ );\r
\r
\r
-//\r
-// Cache Flush Routine.\r
-//\r
-EFI_STATUS\r
-FlushCpuCache (\r
- IN EFI_PHYSICAL_ADDRESS Start,\r
- IN UINT64 Length\r
- )\r
-;\r
\r
#endif\r
<LibraryClass Usage="ALWAYS_CONSUMED">\r
<Keyword>UefiBootServicesTableLib</Keyword>\r
</LibraryClass>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">\r
+ <Keyword>CacheMaintenanceLib</Keyword>\r
+ </LibraryClass>\r
</LibraryClassDefinitions>\r
<SourceFiles>\r
<Filename>Runtime.dxs</Filename>\r
<Filename>Runtime.c</Filename>\r
<Filename>Runtime.h</Filename>\r
<Filename>Crc32.c</Filename>\r
- <Filename SupArchList="IA32">Ia32/PeHotRelocateEx.c</Filename>\r
- <Filename SupArchList="X64">x64/PeHotRelocateEx.c</Filename>\r
- <Filename SupArchList="X64">x64/PeHotRelocateEx.h</Filename>\r
- <Filename SupArchList="IPF">Ipf/PeHotRelocateEx.c</Filename>\r
- <Filename SupArchList="IPF">Ipf/PeHotRelocateEx.h</Filename>\r
</SourceFiles>\r
<PackageDependencies>\r
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
</ModuleSA>\r
<ModuleSA SupArchList="IA32" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="B601F8C4-43B7-4784-95B1-F4226CB40CEE">\r
<Libraries>\r
+ <Instance ModuleGuid="123dd843-57c9-4158-8418-ce68b3944ce7" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
\r
\r
/**\r
- Invalidates a range of instruction cache lines in the cache coherency domain\r
- of the calling CPU.\r
-\r
- Invalidates the instruction cache lines specified by Address and Length. If\r
- Address is not aligned on a cache line boundary, then entire instruction\r
- cache line containing Address is invalidated. If Address + Length is not\r
- aligned on a cache line boundary, then the entire instruction cache line\r
- containing Address + Length -1 is invalidated. This function may choose to\r
- invalidate the entire instruction cache if that is more efficient than\r
- invalidating the specified range. If Length is 0, the no instruction cache\r
- lines are invalidated. Address is returned.\r
+ Flush a range of cache lines in the cache coherency domain of the calling \r
+ CPU.\r
+\r
+ Invalidates the cache lines specified by Address and Length. If Address is \r
+ not aligned on a cache line boundary, then entire cache line containing \r
+ Address is invalidated. If Address + Length is not aligned on a cache line \r
+ boundary, then the entire instruction cache line containing Address + Length\r
+ -1 is invalidated. This function may choose to invalidate the entire \r
+ instruction cache if that is more efficient than invalidating the specified \r
+ range. If Length is 0, the no instruction cache lines are invalidated. \r
+ Address is returned.\r
\r
If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().\r
\r
- @param Address The base address of the instruction cache lines to\r
- invalidate. If the CPU is in a physical addressing mode, then\r
- Address is a physical address. If the CPU is in a virtual\r
- addressing mode, then Address is a virtual address.\r
+ @param Address The base address of the instruction lines to invalidate. If \r
+ the CPU is in a physical addressing mode, then Address is a\r
+ physical address. If the CPU is in a virtual addressing mode,\r
+ then Address is a virtual address.\r
\r
@param Length The number of bytes to invalidate from the instruction cache.\r
\r
**/\r
VOID *\r
EFIAPI\r
-IpfInvalidateInstructionCacheRange (\r
+IpfFlushCacheRange (\r
IN VOID *Address,\r
IN UINTN Length\r
);\r
IN UINTN Length\r
)\r
{\r
- return IpfInvalidateInstructionCacheRange (Address, Length);\r
+ return IpfFlushCacheRange (Address, Length);\r
}\r
\r
/**\r
{\r
ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);\r
\r
- if (Length > 0) {\r
- WriteBackInvalidateDataCache ();\r
- }\r
- return Address;\r
+ return IpfFlushCacheRange (Address, Length);\r
}\r
\r
/**\r
{\r
ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);\r
\r
- if (Length > 0) {\r
- WriteBackDataCache ();\r
- }\r
- return Address;\r
+ return IpfFlushCacheRange (Address, Length);\r
}\r
\r
/**\r
IN UINTN Length\r
)\r
{\r
- return WriteBackInvalidateDataCacheRange (Address, Length);\r
+ return IpfFlushCacheRange (Address, Length);\r
}\r
<Filename SupArchList="IPF">Ipf/CpuFlushTlb.s</Filename>\r
<Filename SupArchList="IPF">Ipf/GetInterruptState.s</Filename>\r
<Filename SupArchList="IPF">Ipf/Non-existing.c</Filename>\r
- <Filename SupArchList="IPF">Ipf/InvalidateInstructionCacheRange.s</Filename>\r
+ <Filename SupArchList="IPF">Ipf/FlushCacheRange.s</Filename>\r
<Filename SupArchList="IPF">Ipf/ReadItc.s</Filename>\r
\r
<Filename SupArchList="EBC">Math64.c</Filename>\r