/** @file\r
The implementation for EFI_ISA_IO_PROTOCOL. \r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
},\r
};\r
\r
-/**\r
- report a error Status code\r
-\r
- @param Code The error status code.\r
- \r
- @return EFI_SUCCESS Success to report status code.\r
-**/\r
-EFI_STATUS\r
-ReportErrorStatusCode (\r
- EFI_STATUS_CODE_VALUE Code\r
- )\r
-{\r
- return REPORT_STATUS_CODE (\r
- EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
- Code\r
- );\r
-}\r
-\r
/**\r
Initializes an ISA I/O Instance\r
\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r
&Value\r
);\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
return Status;\r
}\r
\r
Status = IsaIoDevice->PciIo->Flush (IsaIoDevice->PciIo);\r
\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r
EFI_ISA_ACPI_RESOURCE *Item;\r
EFI_STATUS Status;\r
\r
- if (Width < EfiIsaIoWidthUint8 ||\r
- Width >= EfiIsaIoWidthMaximum ||\r
+ if ((UINT32)Width >= EfiIsaIoWidthMaximum ||\r
Width == EfiIsaIoWidthReserved ||\r
Width == EfiIsaIoWidthFifoReserved ||\r
Width == EfiIsaIoWidthFillReserved\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r
//\r
// Make sure the Operation parameter is valid\r
//\r
- if (Operation < 0 || Operation >= EfiIsaIoOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiIsaIoOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Type < AllocateAnyPages || Type >= MaxAllocateType) {\r
+ if ((UINT32)Type >= MaxAllocateType) {\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
\r
Status = gBS->AllocatePages (Type, MemoryType, Pages, &PhysicalAddress);\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
return Status;\r
}\r
\r
Pages\r
);\r
if (EFI_ERROR (Status)) {\r
- ReportErrorStatusCode (EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR);\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR\r
+ );\r
}\r
\r
return Status;\r