summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c')
-rw-r--r--ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c b/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
index 54d9b01633..ebe593d1c3 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
+++ b/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
@@ -211,73 +211,3 @@ CpuSetMemoryAttributes (
return EFI_SUCCESS;
}
}
-
-EFI_STATUS
-EFIAPI
-CpuConvertPagesToUncachedVirtualAddress (
- IN VIRTUAL_UNCACHED_PAGES_PROTOCOL *This,
- IN EFI_PHYSICAL_ADDRESS Address,
- IN UINTN Length,
- IN EFI_PHYSICAL_ADDRESS VirtualMask,
- OUT UINT64 *Attributes OPTIONAL
- )
-{
- EFI_STATUS Status;
- EFI_GCD_MEMORY_SPACE_DESCRIPTOR GcdDescriptor;
-
- if (Attributes != NULL) {
- Status = gDS->GetMemorySpaceDescriptor (Address, &GcdDescriptor);
- if (!EFI_ERROR (Status)) {
- *Attributes = GcdDescriptor.Attributes;
- }
- }
-
- //
- // Make this address range page fault if accessed. If it is a DMA buffer than this would
- // be the PCI address. Code should always use the CPU address, and we will or in VirtualMask
- // to that address.
- //
- Status = SetMemoryAttributes (Address, Length, EFI_MEMORY_RO, 0);
- if (!EFI_ERROR (Status)) {
- Status = SetMemoryAttributes (Address | VirtualMask, Length, EFI_MEMORY_UC, VirtualMask);
- }
-
- DEBUG ((DEBUG_INFO | DEBUG_LOAD, "CpuConvertPagesToUncachedVirtualAddress()\n Unmapped 0x%08lx Mapped 0x%08lx 0x%x bytes\n", Address, Address | VirtualMask, Length));
-
- return Status;
-}
-
-
-EFI_STATUS
-EFIAPI
-CpuReconvertPages (
- IN VIRTUAL_UNCACHED_PAGES_PROTOCOL *This,
- IN EFI_PHYSICAL_ADDRESS Address,
- IN UINTN Length,
- IN EFI_PHYSICAL_ADDRESS VirtualMask,
- IN UINT64 Attributes
- )
-{
- EFI_STATUS Status;
-
- DEBUG ((DEBUG_INFO | DEBUG_LOAD, "CpuReconvertPages(%lx, %x, %lx, %lx)\n", Address, Length, VirtualMask, Attributes));
-
- //
- // Unmap the aliased Address
- //
- Status = SetMemoryAttributes (Address | VirtualMask, Length, EFI_MEMORY_RO, 0);
- if (!EFI_ERROR (Status)) {
- //
- // Restore atttributes
- //
- Status = SetMemoryAttributes (Address, Length, Attributes, 0);
- }
-
- return Status;
-}
-
-
-VIRTUAL_UNCACHED_PAGES_PROTOCOL gVirtualUncachedPages = {
- CpuConvertPagesToUncachedVirtualAddress,
- CpuReconvertPages
-};