/** @file\r
This contains the installation function for the driver.\r
\r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 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
IN UINT8 SlaveBase\r
)\r
{\r
- UINT8 Mask;\r
+ UINT8 Mask;\r
+ EFI_TPL OriginalTpl;\r
\r
+ OriginalTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);\r
//\r
// Set vector base for slave PIC\r
//\r
\r
IoWrite8 (LEGACY_8259_CONTROL_REGISTER_SLAVE, LEGACY_8259_EOI);\r
IoWrite8 (LEGACY_8259_CONTROL_REGISTER_MASTER, LEGACY_8259_EOI);\r
+ \r
+ gBS->RestoreTPL (OriginalTpl);\r
\r
return EFI_SUCCESS;\r
}\r
OUT UINT8 *Vector\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
IN BOOLEAN LevelTriggered\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
IN EFI_8259_IRQ Irq\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
IN EFI_8259_IRQ Irq\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r