summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c
diff options
context:
space:
mode:
Diffstat (limited to 'EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c')
-rw-r--r--EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c59
1 files changed, 33 insertions, 26 deletions
diff --git a/EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c b/EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c
index d7ed8c9ebc..4e7a5698c1 100644
--- a/EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c
+++ b/EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.c
@@ -107,15 +107,15 @@ STATIC
EFI_STATUS
EFIAPI
NonCoherentIoMmuMap (
- IN EDKII_IOMMU_PROTOCOL *This,
- IN EDKII_IOMMU_OPERATION Operation,
- IN VOID *HostAddress,
- IN OUT UINTN *NumberOfBytes,
- OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
- OUT VOID **Mapping
+ IN EDKII_IOMMU_PROTOCOL *This,
+ IN EDKII_IOMMU_OPERATION Operation,
+ IN VOID *HostAddress,
+ IN OUT UINTN *NumberOfBytes,
+ OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
+ OUT VOID **Mapping
)
{
- DMA_MAP_OPERATION DmaOperation;
+ DMA_MAP_OPERATION DmaOperation;
switch (Operation) {
case EdkiiIoMmuOperationBusMasterRead:
@@ -138,8 +138,13 @@ NonCoherentIoMmuMap (
return EFI_INVALID_PARAMETER;
}
- return DmaMap (DmaOperation, HostAddress, NumberOfBytes,
- DeviceAddress, Mapping);
+ return DmaMap (
+ DmaOperation,
+ HostAddress,
+ NumberOfBytes,
+ DeviceAddress,
+ Mapping
+ );
}
/**
@@ -158,8 +163,8 @@ STATIC
EFI_STATUS
EFIAPI
NonCoherentIoMmuUnmap (
- IN EDKII_IOMMU_PROTOCOL *This,
- IN VOID *Mapping
+ IN EDKII_IOMMU_PROTOCOL *This,
+ IN VOID *Mapping
)
{
return DmaUnmap (Mapping);
@@ -191,12 +196,12 @@ STATIC
EFI_STATUS
EFIAPI
NonCoherentIoMmuAllocateBuffer (
- IN EDKII_IOMMU_PROTOCOL *This,
- IN EFI_ALLOCATE_TYPE Type,
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN Pages,
- IN OUT VOID **HostAddress,
- IN UINT64 Attributes
+ IN EDKII_IOMMU_PROTOCOL *This,
+ IN EFI_ALLOCATE_TYPE Type,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN Pages,
+ IN OUT VOID **HostAddress,
+ IN UINT64 Attributes
)
{
return DmaAllocateBuffer (MemoryType, Pages, HostAddress);
@@ -219,9 +224,9 @@ STATIC
EFI_STATUS
EFIAPI
NonCoherentIoMmuFreeBuffer (
- IN EDKII_IOMMU_PROTOCOL *This,
- IN UINTN Pages,
- IN VOID *HostAddress
+ IN EDKII_IOMMU_PROTOCOL *This,
+ IN UINTN Pages,
+ IN VOID *HostAddress
)
{
return DmaFreeBuffer (Pages, HostAddress);
@@ -236,15 +241,17 @@ STATIC EDKII_IOMMU_PROTOCOL mNonCoherentIoMmuOps = {
NonCoherentIoMmuFreeBuffer,
};
-
EFI_STATUS
EFIAPI
NonCoherentIoMmuDxeEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- return gBS->InstallMultipleProtocolInterfaces (&ImageHandle,
- &gEdkiiIoMmuProtocolGuid, &mNonCoherentIoMmuOps,
- NULL);
+ return gBS->InstallMultipleProtocolInterfaces (
+ &ImageHandle,
+ &gEdkiiIoMmuProtocolGuid,
+ &mNonCoherentIoMmuOps,
+ NULL
+ );
}