]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
SecurityPkg/Tcg2Pei: drop PeiReadOnlyVariable from Depex
[mirror_edk2.git] / UefiCpuPkg / CpuIo2Smm / CpuIo2Smm.c
index 1c172a096c858bbb58e50b0a61c962c8ce6be48e..20b8350fe4a4e189a80dd64b05bd8de65af8cc73 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Produces the SMM CPU I/O Protocol.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -82,7 +82,7 @@ CpuIoCheckParameter (
   //\r
   // Check to see if Width is in the valid range\r
   //\r
-  if (Width < 0 || Width > SMM_IO_UINT64) {\r
+  if ((UINT32)Width > SMM_IO_UINT64) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -126,7 +126,7 @@ CpuIoCheckParameter (
   //\r
   // Check to see if Address is aligned\r
   //\r
-  if ((Address & (UINT64)(mStride[Width] - 1)) != 0) {\r
+  if ((Address & ((UINT64)mStride[Width] - 1)) != 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r