summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuIo2Smm
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:17 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit053e878bfb5c9d5eca779789b62891add30b14ba (patch)
tree1cdf5bacb37306e373b8d14bd67c5b3e4f3b269f /UefiCpuPkg/CpuIo2Smm
parent91415a36ae7aaeabb2bbab3762f39544f9aed683 (diff)
downloadedk2-053e878bfb5c9d5eca779789b62891add30b14ba.tar.gz
edk2-053e878bfb5c9d5eca779789b62891add30b14ba.tar.bz2
edk2-053e878bfb5c9d5eca779789b62891add30b14ba.zip
UefiCpuPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the UefiCpuPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/CpuIo2Smm')
-rw-r--r--UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.c7
-rw-r--r--UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.c b/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.c
index 7e314eaa15..44e52562a8 100644
--- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.c
+++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.c
@@ -16,7 +16,7 @@ EFI_HANDLE mHandle = NULL;
//
// SMM CPU I/O Protocol instance
//
-EFI_SMM_CPU_IO2_PROTOCOL mSmmCpuIo2 = {
+EFI_SMM_CPU_IO2_PROTOCOL mSmmCpuIo2 = {
{
CpuMemoryServiceRead,
CpuMemoryServiceWrite
@@ -30,7 +30,7 @@ EFI_SMM_CPU_IO2_PROTOCOL mSmmCpuIo2 = {
//
// Lookup table for increment values based on transfer widths
//
-UINT8 mStride[] = {
+UINT8 mStride[] = {
1, // SMM_IO_UINT8
2, // SMM_IO_UINT16
4, // SMM_IO_UINT32
@@ -112,6 +112,7 @@ CpuIoCheckParameter (
if (MaxCount < (Count - 1)) {
return EFI_UNSUPPORTED;
}
+
if (Address > LShiftU64 (MaxCount - Count + 1, Width)) {
return EFI_UNSUPPORTED;
}
@@ -184,6 +185,7 @@ CpuMemoryServiceRead (
*((UINT64 *)Uint8Buffer) = MmioRead64 ((UINTN)Address);
}
}
+
return EFI_SUCCESS;
}
@@ -244,6 +246,7 @@ CpuMemoryServiceWrite (
MmioWrite64 ((UINTN)Address, *((UINT64 *)Uint8Buffer));
}
}
+
return EFI_SUCCESS;
}
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.h b/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.h
index eda9fbb090..8404513554 100644
--- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.h
+++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Mm.h
@@ -19,7 +19,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/MmServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
-#define MAX_IO_PORT_ADDRESS 0xFFFF
+#define MAX_IO_PORT_ADDRESS 0xFFFF
/**
Reads memory-mapped registers.