]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add module Legacy8259Dxe to IntelFrameworkModulePkg.dsc, and make it clean for ICC...
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Dec 2008 06:21:53 +0000 (06:21 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Dec 2008 06:21:53 +0000 (06:21 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6833 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c

index e18e6da19cd952a06fedccb7a7a286eb291862a3..58d2cc4d5db1d53b1d170788f42ff7a3de6ca6ec 100644 (file)
   IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.inf\r
-\r
   IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf\r
   IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf\r
\r
+  IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
+  IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf\r
+  IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf\r
+  IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.inf\r
+  IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
+\r
   IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf\r
   IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointerDxe.inf\r
+  IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPortDxe.inf\r
+\r
+  IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.inf\r
   IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf\r
   IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.inf\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf\r
   IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf\r
   IntelFrameworkModulePkg/Universal/PcatSingleSegmentPciCfgPei/PcatSingleSegmentPciCfgPei.inf\r
   IntelFrameworkModulePkg/Universal/VariablePei/VariablePei.inf\r
-  IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPortDxe.inf\r
-\r
-  IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
-  IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf\r
-  IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf\r
-  IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.inf\r
-  IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
-  IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.inf\r
+  IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf\r
 \r
 [Components.IA32]\r
   IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.inf\r
index 8a21cd6bf5660b2c3731718bd2bcc4b882b566cc..4ba196fe6a0408a2559b428364a964c5127ab4eb 100644 (file)
@@ -1,7 +1,7 @@
 /**@file\r
   This contains the installation function for the driver.\r
   \r
-Copyright (c) 2005 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2005 - 2008, Intel Corporation                                                         \r
 All rights reserved. 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
@@ -89,16 +89,21 @@ Interrupt8259ReadMask (
 **/\r
 // TODO:    EdgeLevel - add argument and description to function comment\r
 {\r
+  UINT16  MasterValue;\r
+  UINT16  SlaveValue;\r
+\r
   if (Mask != NULL) {\r
-    *Mask = (UINT16) (IoRead8 (LEGACY_8259_MASK_REGISTER_MASTER) | (IoRead8 (LEGACY_8259_MASK_REGISTER_SLAVE) << 8));\r
+    MasterValue = IoRead8 (LEGACY_8259_MASK_REGISTER_MASTER);\r
+    SlaveValue  = IoRead8 (LEGACY_8259_MASK_REGISTER_SLAVE);\r
+\r
+    *Mask = (UINT16) (MasterValue | (SlaveValue << 8));\r
   }\r
 \r
   if (EdgeLevel != NULL) {\r
-    *EdgeLevel = (UINT16)\r
-      (\r
-        IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER) |\r
-          (IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE) << 8)\r
-      );\r
+    MasterValue = IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER);\r
+    SlaveValue  = IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE);\r
+\r
+    *EdgeLevel = (UINT16) (MasterValue | (SlaveValue << 8));\r
   }\r
 }\r
 //\r
@@ -432,11 +437,11 @@ Interrupt8259EnableIrq (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  mProtectedModeMask &= ~(1 << Irq);\r
+  mProtectedModeMask = (UINT16) (mProtectedModeMask & ~(1 << Irq));\r
   if (LevelTriggered) {\r
-    mProtectedModeEdgeLevel |= (1 << Irq);\r
+    mProtectedModeEdgeLevel = (UINT16) (mProtectedModeEdgeLevel | (1 << Irq));\r
   } else {\r
-    mProtectedModeEdgeLevel &= ~(1 << Irq);\r
+    mProtectedModeEdgeLevel = (UINT16) (mProtectedModeEdgeLevel & ~(1 << Irq));\r
   }\r
 \r
   Interrupt8259WriteMask (mProtectedModeMask, mProtectedModeEdgeLevel);\r
@@ -469,8 +474,8 @@ Interrupt8259DisableIrq (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  mProtectedModeMask |= (1 << Irq);\r
-  mProtectedModeEdgeLevel &= ~(1 << Irq);\r
+  mProtectedModeMask      = (UINT16) (mProtectedModeMask | (1 << Irq));\r
+  mProtectedModeEdgeLevel = (UINT16) (mProtectedModeEdgeLevel & ~(1 << Irq));\r
 \r
   Interrupt8259WriteMask (mProtectedModeMask, mProtectedModeEdgeLevel);\r
 \r