]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/CpuRuntimeDxe/CpuIo.c
Fix ICC build issues
[mirror_edk2.git] / Nt32Pkg / CpuRuntimeDxe / CpuIo.c
index 65b694b127c0454caa4b715bf0ad5523df07cb65..7f171e6094f4ef9d78c5b980b3500ffb5adab656 100644 (file)
@@ -1,7 +1,7 @@
 /**@file\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2006 - 2010, 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
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -81,6 +81,10 @@ Returns:
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -89,7 +93,7 @@ Returns:
   //\r
   // Do nothing for Nt32 version\r
   //\r
-  return EFI_SUCCESS;\r
+  return EFI_UNSUPPORTED;\r
 }\r
 \r
 EFI_STATUS\r
@@ -135,6 +139,10 @@ Returns:
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -143,7 +151,7 @@ Returns:
   //\r
   // Do nothing for Nt32 version\r
   //\r
-  return EFI_SUCCESS;\r
+  return EFI_UNSUPPORTED;\r
 }\r
 \r
 EFI_STATUS\r
@@ -192,7 +200,7 @@ Returns:
 \r
   Address = (UINTN) UserAddress;\r
 \r
-  if (Width >= EfiCpuIoWidthMaximum) {\r
+  if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -204,7 +212,7 @@ Returns:
   //\r
   // Do nothing for Nt32 version\r
   //\r
-  return EFI_SUCCESS;\r
+  return EFI_UNSUPPORTED;\r
 }\r
 \r
 EFI_STATUS\r
@@ -257,7 +265,7 @@ Returns:
 \r
   Address = (UINTN) UserAddress;\r
 \r
-  if (Width >= EfiCpuIoWidthMaximum) {\r
+  if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -269,7 +277,7 @@ Returns:
   //\r
   // Do nothing for Nt32 version\r
   //\r
-  return EFI_SUCCESS;\r
+  return EFI_UNSUPPORTED;\r
 }\r
 \r
 \r