summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/DxeIoLibEsal
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/DxeIoLibEsal')
-rw-r--r--MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf4
-rw-r--r--MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.uni4
-rw-r--r--MdePkg/Library/DxeIoLibEsal/DxeIoLibEsalInternal.h4
-rw-r--r--MdePkg/Library/DxeIoLibEsal/IoLib.c86
-rw-r--r--MdePkg/Library/DxeIoLibEsal/IoLibMmioBuffer.c112
5 files changed, 105 insertions, 105 deletions
diff --git a/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf b/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf
index fdfc12b945..1b08c564a4 100644
--- a/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf
+++ b/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf
@@ -4,9 +4,9 @@
# I/O Library implementation that uses Itanium ESAL services for I/O
# and MMIO operations.
#
-# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
+# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php.
#
diff --git a/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.uni b/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.uni
index c0d1d9717f..6aaa33473b 100644
--- a/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.uni
+++ b/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.uni
@@ -4,13 +4,13 @@
// I/O Library implementation that uses Itanium ESAL services for I/O
// and MMIO operations.
//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials are licensed and made available
// under the terms and conditions of the BSD License which accompanies this
// distribution. The full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php.
-//
+//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
diff --git a/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsalInternal.h b/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsalInternal.h
index c6dd4af543..db37d548ed 100644
--- a/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsalInternal.h
+++ b/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsalInternal.h
@@ -1,7 +1,7 @@
/** @file
Internal include file for the I/O Library using ESAL services.
-
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/DxeIoLibEsal/IoLib.c b/MdePkg/Library/DxeIoLibEsal/IoLib.c
index ab186a6d32..ceb43480a4 100644
--- a/MdePkg/Library/DxeIoLibEsal/IoLib.c
+++ b/MdePkg/Library/DxeIoLibEsal/IoLib.c
@@ -1,7 +1,7 @@
/** @file
I/O Library basic function implementation and worker functions.
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
This program and the accompanying materials
@@ -47,13 +47,13 @@ IoReadWorker (
ReturnReg = EsalCall (
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
- IoReadFunctionId,
- (UINT64)Width,
- Port,
- 1,
- (UINT64)&Data,
- 0,
- 0,
+ IoReadFunctionId,
+ (UINT64)Width,
+ Port,
+ 1,
+ (UINT64)&Data,
+ 0,
+ 0,
0
);
ASSERT (ReturnReg.Status == EFI_SAL_SUCCESS);
@@ -90,13 +90,13 @@ IoWriteWorker (
ReturnReg = EsalCall (
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
- IoWriteFunctionId,
- (UINT64)Width,
- Port,
- 1,
- (UINT64)&Data,
- 0,
- 0,
+ IoWriteFunctionId,
+ (UINT64)Width,
+ Port,
+ 1,
+ (UINT64)&Data,
+ 0,
+ 0,
0
);
ASSERT (ReturnReg.Status == EFI_SAL_SUCCESS);
@@ -133,13 +133,13 @@ IoReadFifoWorker (
ReturnReg = EsalCall (
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
- IoReadFunctionId,
- (UINT64)Width,
- Port,
- Count,
- (UINT64)Buffer,
- 0,
- 0,
+ IoReadFunctionId,
+ (UINT64)Width,
+ Port,
+ Count,
+ (UINT64)Buffer,
+ 0,
+ 0,
0
);
ASSERT (ReturnReg.Status == EFI_SAL_SUCCESS);
@@ -175,13 +175,13 @@ IoWriteFifoWorker (
ReturnReg = EsalCall (
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
- IoWriteFunctionId,
- (UINT64)Width,
- Port,
- Count,
- (UINT64)Buffer,
- 0,
- 0,
+ IoWriteFunctionId,
+ (UINT64)Width,
+ Port,
+ Count,
+ (UINT64)Buffer,
+ 0,
+ 0,
0
);
ASSERT (ReturnReg.Status == EFI_SAL_SUCCESS);
@@ -216,13 +216,13 @@ MmioReadWorker (
ReturnReg = EsalCall (
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
- MemReadFunctionId,
- (UINT64)Width,
- Address,
- 1,
- (UINT64)&Data,
- 0,
- 0,
+ MemReadFunctionId,
+ (UINT64)Width,
+ Address,
+ 1,
+ (UINT64)&Data,
+ 0,
+ 0,
0
);
ASSERT (ReturnReg.Status == EFI_SAL_SUCCESS);
@@ -257,13 +257,13 @@ MmioWriteWorker (
ReturnReg = EsalCall (
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
- MemWriteFunctionId,
- (UINT64)Width,
- Address,
- 1,
- (UINT64)&Data,
- 0,
- 0,
+ MemWriteFunctionId,
+ (UINT64)Width,
+ Address,
+ 1,
+ (UINT64)&Data,
+ 0,
+ 0,
0
);
ASSERT (ReturnReg.Status == EFI_SAL_SUCCESS);
diff --git a/MdePkg/Library/DxeIoLibEsal/IoLibMmioBuffer.c b/MdePkg/Library/DxeIoLibEsal/IoLibMmioBuffer.c
index 5addef2291..8a725dc29e 100644
--- a/MdePkg/Library/DxeIoLibEsal/IoLibMmioBuffer.c
+++ b/MdePkg/Library/DxeIoLibEsal/IoLibMmioBuffer.c
@@ -1,7 +1,7 @@
/** @file
I/O Library MMIO Buffer Functions.
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,11 +17,11 @@
/**
Copy data from MMIO region to system memory by using 8-bit access.
- Copy data from MMIO region specified by starting address StartAddress
- to system memory specified by Buffer by using 8-bit access. The total
+ Copy data from MMIO region specified by starting address StartAddress
+ to system memory specified by Buffer by using 8-bit access. The total
number of byte to be copied is specified by Length. Buffer is returned.
-
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@@ -44,9 +44,9 @@ MmioReadBuffer8 (
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
-
+
ReturnBuffer = Buffer;
-
+
while (Length-- > 0) {
*(Buffer++) = MmioRead8 (StartAddress++);
}
@@ -57,13 +57,13 @@ MmioReadBuffer8 (
/**
Copy data from MMIO region to system memory by using 16-bit access.
- Copy data from MMIO region specified by starting address StartAddress
- to system memory specified by Buffer by using 16-bit access. The total
+ Copy data from MMIO region specified by starting address StartAddress
+ to system memory specified by Buffer by using 16-bit access. The total
number of byte to be copied is specified by Length. Buffer is returned.
-
+
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
@@ -87,15 +87,15 @@ MmioReadBuffer16 (
UINT16 *ReturnBuffer;
ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
-
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);
ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
-
+
ReturnBuffer = Buffer;
-
+
while (Length > 0) {
*(Buffer++) = MmioRead16 (StartAddress);
StartAddress += sizeof (UINT16);
@@ -108,13 +108,13 @@ MmioReadBuffer16 (
/**
Copy data from MMIO region to system memory by using 32-bit access.
- Copy data from MMIO region specified by starting address StartAddress
- to system memory specified by Buffer by using 32-bit access. The total
+ Copy data from MMIO region specified by starting address StartAddress
+ to system memory specified by Buffer by using 32-bit access. The total
number of byte to be copied is specified by Length. Buffer is returned.
-
+
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
@@ -138,15 +138,15 @@ MmioReadBuffer32 (
UINT32 *ReturnBuffer;
ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
-
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
-
+
ReturnBuffer = Buffer;
-
+
while (Length > 0) {
*(Buffer++) = MmioRead32 (StartAddress);
StartAddress += sizeof (UINT32);
@@ -159,13 +159,13 @@ MmioReadBuffer32 (
/**
Copy data from MMIO region to system memory by using 64-bit access.
- Copy data from MMIO region specified by starting address StartAddress
- to system memory specified by Buffer by using 64-bit access. The total
+ Copy data from MMIO region specified by starting address StartAddress
+ to system memory specified by Buffer by using 64-bit access. The total
number of byte to be copied is specified by Length. Buffer is returned.
-
+
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
@@ -189,15 +189,15 @@ MmioReadBuffer64 (
UINT64 *ReturnBuffer;
ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
-
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);
ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
-
+
ReturnBuffer = Buffer;
-
+
while (Length > 0) {
*(Buffer++) = MmioRead64 (StartAddress);
StartAddress += sizeof (UINT64);
@@ -211,11 +211,11 @@ MmioReadBuffer64 (
/**
Copy data from system memory to MMIO region by using 8-bit access.
- Copy data from system memory specified by Buffer to MMIO region specified
- by starting address StartAddress by using 8-bit access. The total number
+ Copy data from system memory specified by Buffer to MMIO region specified
+ by starting address StartAddress by using 8-bit access. The total number
of byte to be copied is specified by Length. Buffer is returned.
-
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
@@ -238,27 +238,27 @@ MmioWriteBuffer8 (
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
-
+
ReturnBuffer = (UINT8 *) Buffer;
-
+
while (Length-- > 0) {
MmioWrite8 (StartAddress++, *(Buffer++));
}
return ReturnBuffer;
-
+
}
/**
Copy data from system memory to MMIO region by using 16-bit access.
- Copy data from system memory specified by Buffer to MMIO region specified
- by starting address StartAddress by using 16-bit access. The total number
+ Copy data from system memory specified by Buffer to MMIO region specified
+ by starting address StartAddress by using 16-bit access. The total number
of byte to be copied is specified by Length. Buffer is returned.
-
+
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
@@ -283,7 +283,7 @@ MmioWriteBuffer16 (
UINT16 *ReturnBuffer;
ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
-
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
@@ -291,10 +291,10 @@ MmioWriteBuffer16 (
ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
ReturnBuffer = (UINT16 *) Buffer;
-
+
while (Length > 0) {
MmioWrite16 (StartAddress, *(Buffer++));
-
+
StartAddress += sizeof (UINT16);
Length -= sizeof (UINT16);
}
@@ -306,13 +306,13 @@ MmioWriteBuffer16 (
/**
Copy data from system memory to MMIO region by using 32-bit access.
- Copy data from system memory specified by Buffer to MMIO region specified
- by starting address StartAddress by using 32-bit access. The total number
+ Copy data from system memory specified by Buffer to MMIO region specified
+ by starting address StartAddress by using 32-bit access. The total number
of byte to be copied is specified by Length. Buffer is returned.
-
+
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
@@ -337,7 +337,7 @@ MmioWriteBuffer32 (
UINT32 *ReturnBuffer;
ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
-
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
@@ -345,10 +345,10 @@ MmioWriteBuffer32 (
ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
ReturnBuffer = (UINT32 *) Buffer;
-
+
while (Length > 0) {
MmioWrite32 (StartAddress, *(Buffer++));
-
+
StartAddress += sizeof (UINT32);
Length -= sizeof (UINT32);
}
@@ -359,13 +359,13 @@ MmioWriteBuffer32 (
/**
Copy data from system memory to MMIO region by using 64-bit access.
- Copy data from system memory specified by Buffer to MMIO region specified
- by starting address StartAddress by using 64-bit access. The total number
+ Copy data from system memory specified by Buffer to MMIO region specified
+ by starting address StartAddress by using 64-bit access. The total number
of byte to be copied is specified by Length. Buffer is returned.
-
+
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
@@ -390,7 +390,7 @@ MmioWriteBuffer64 (
UINT64 *ReturnBuffer;
ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
-
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
@@ -398,10 +398,10 @@ MmioWriteBuffer64 (
ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
ReturnBuffer = (UINT64 *) Buffer;
-
+
while (Length > 0) {
MmioWrite64 (StartAddress, *(Buffer++));
-
+
StartAddress += sizeof (UINT64);
Length -= sizeof (UINT64);
}