diff options
author | Liming Gao <liming.gao@intel.com> | 2018-06-27 21:14:20 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-28 11:19:53 +0800 |
commit | 7367cc6c24d01b400d2370ffd58ae02854a56b32 (patch) | |
tree | c5b8a758492e188fb3246eb8a72f07340cd80d44 /UefiCpuPkg/CpuIo2Smm | |
parent | 77695f4da3dc8eedb6fc7fc67f91ef6ccd22daee (diff) | |
download | edk2-7367cc6c24d01b400d2370ffd58ae02854a56b32.tar.gz edk2-7367cc6c24d01b400d2370ffd58ae02854a56b32.tar.bz2 edk2-7367cc6c24d01b400d2370ffd58ae02854a56b32.zip |
UefiCpuPkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'UefiCpuPkg/CpuIo2Smm')
-rw-r--r-- | UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c | 100 | ||||
-rw-r--r-- | UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h | 72 | ||||
-rw-r--r-- | UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf | 10 | ||||
-rw-r--r-- | UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni | 4 |
4 files changed, 93 insertions, 93 deletions
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c index 20b8350fe4..619249300f 100644 --- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c +++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c @@ -1,14 +1,14 @@ /** @file
Produces the SMM CPU I/O Protocol.
-Copyright (c) 2009 - 2017, 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.
+Copyright (c) 2009 - 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.
**/
@@ -48,17 +48,17 @@ UINT8 mStride[] = { @param[in] MmioOperation TRUE for an MMIO operation, FALSE for I/O Port operation.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[in] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[in] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
-
+
**/
EFI_STATUS
CpuIoCheckParameter (
@@ -92,20 +92,20 @@ CpuIoCheckParameter ( if (!MmioOperation && (Width == SMM_IO_UINT64)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
- // Check to see if any address associated with this transfer exceeds the maximum
+ // Check to see if any address associated with this transfer exceeds the maximum
// allowed address. The maximum address implied by the parameters passed in is
// Address + Size * Count. If the following condition is met, then the transfer
// is not supported.
//
// Address + Size * Count > (MmioOperation ? MAX_ADDRESS : MAX_IO_PORT_ADDRESS) + 1
//
- // Since MAX_ADDRESS can be the maximum integer value supported by the CPU and Count
+ // Since MAX_ADDRESS can be the maximum integer value supported by the CPU and Count
// can also be the maximum integer value supported by the CPU, this range
// check must be adjusted to avoid all overflow conditions.
- //
- // The following form of the range check is equivalent but assumes that
+ //
+ // The following form of the range check is equivalent but assumes that
// MAX_ADDRESS and MAX_IO_PORT_ADDRESS are of the form (2^n - 1).
//
Limit = (MmioOperation ? MAX_ADDRESS : MAX_IO_PORT_ADDRESS);
@@ -113,7 +113,7 @@ CpuIoCheckParameter ( if (Address > Limit) {
return EFI_UNSUPPORTED;
}
- } else {
+ } else {
MaxCount = RShiftU64 (Limit, Width);
if (MaxCount < (Count - 1)) {
return EFI_UNSUPPORTED;
@@ -122,7 +122,7 @@ CpuIoCheckParameter ( return EFI_UNSUPPORTED;
}
}
-
+
//
// Check to see if Address is aligned
//
@@ -136,23 +136,23 @@ CpuIoCheckParameter ( /**
Reads memory-mapped registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[out] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[out] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -196,23 +196,23 @@ CpuMemoryServiceRead ( /**
Writes memory-mapped registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[in] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[in] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -256,23 +256,23 @@ CpuMemoryServiceWrite ( /**
Reads I/O registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[out] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[out] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -315,23 +315,23 @@ CpuIoServiceRead ( /**
Write I/O registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[in] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[in] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -370,7 +370,7 @@ CpuIoServiceWrite ( IoWrite32 ((UINTN)Address, *((UINT32 *)Uint8Buffer));
}
}
-
+
return EFI_SUCCESS;
}
@@ -408,6 +408,6 @@ SmmCpuIo2Initialize ( &mSmmCpuIo2
);
ASSERT_EFI_ERROR (Status);
-
+
return Status;
}
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h index 5a092594d7..535bf5c83b 100644 --- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h +++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h @@ -1,14 +1,14 @@ /** @file
Internal include file for the SMM CPU I/O Protocol.
-Copyright (c) 2009 - 2010, 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.
+Copyright (c) 2009 - 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.
**/
@@ -30,23 +30,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Reads memory-mapped registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[out] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[out] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -63,23 +63,23 @@ CpuMemoryServiceRead ( /**
Writes memory-mapped registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[in] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[in] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -96,23 +96,23 @@ CpuMemoryServiceWrite ( /**
Reads I/O registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[out] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[out] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
@@ -129,23 +129,23 @@ CpuIoServiceRead ( /**
Write I/O registers.
- The I/O operations are carried out exactly as requested. The caller is
- responsible for any alignment and I/O width issues that the bus, device,
+ The I/O operations are carried out exactly as requested. The caller is
+ responsible for any alignment and I/O width issues that the bus, device,
platform, or type of I/O might require.
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
@param[in] Width Signifies the width of the I/O operations.
- @param[in] Address The base address of the I/O operations. The caller is
- responsible for aligning the Address if required.
+ @param[in] Address The base address of the I/O operations. The caller is
+ responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[in] Buffer For read operations, the destination buffer to store
- the results. For write operations, the source buffer
+ @param[in] Buffer For read operations, the destination buffer to store
+ the results. For write operations, the source buffer
from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
lack of resources
**/
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf index d7c98f67c0..4e230fc490 100644 --- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf +++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf @@ -1,7 +1,7 @@ ## @file
-# Produces the SMM CPU I/O 2 Protocol by using the services of the I/O Library.
+# Produces the SMM CPU I/O 2 Protocol by using the services of the I/O Library.
#
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 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
@@ -24,13 +24,13 @@ #
# The following information is for reference only and not required by the build tools.
#
-# VALID_ARCHITECTURES = IA32 X64
+# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
CpuIo2Smm.c
CpuIo2Smm.h
-
+
[Packages]
MdePkg/MdePkg.dec
@@ -41,7 +41,7 @@ IoLib
SmmServicesTableLib
BaseMemoryLib
-
+
[Protocols]
gEfiSmmCpuIo2ProtocolGuid ## PRODUCES
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni b/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni index b1b82b03b7..037c90d57e 100644 --- a/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni +++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni @@ -1,7 +1,7 @@ // /** @file
// CpuIo2Smm Localized Strings and Content
//
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2013 - 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
@@ -12,7 +12,7 @@ //
// **/
-#string STR_PROPERTIES_MODULE_NAME
+#string STR_PROPERTIES_MODULE_NAME
#language en-US
"CPU I/O v2 SMM Driver"
|