diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-04 06:21:53 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-04 06:21:53 +0000 |
commit | a694b670e1a14b3a4da306463d9760176a73bef3 (patch) | |
tree | 445f9e195e0e956915bc720d0f5582f473b750d5 /IntelFrameworkModulePkg/Universal | |
parent | 2b534a7c0904b8fbc2d2b0b46d4879ec1002e10c (diff) | |
download | edk2-platforms-a694b670e1a14b3a4da306463d9760176a73bef3.tar.xz |
Add module Legacy8259Dxe to IntelFrameworkModulePkg.dsc, and make it clean for ICC build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6833 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c index 8a21cd6bf5..4ba196fe6a 100644 --- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c +++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c @@ -1,7 +1,7 @@ /**@file
This contains the installation function for the driver.
-Copyright (c) 2005 - 2007, Intel Corporation
+Copyright (c) 2005 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -89,16 +89,21 @@ Interrupt8259ReadMask ( **/
// TODO: EdgeLevel - add argument and description to function comment
{
+ UINT16 MasterValue;
+ UINT16 SlaveValue;
+
if (Mask != NULL) {
- *Mask = (UINT16) (IoRead8 (LEGACY_8259_MASK_REGISTER_MASTER) | (IoRead8 (LEGACY_8259_MASK_REGISTER_SLAVE) << 8));
+ MasterValue = IoRead8 (LEGACY_8259_MASK_REGISTER_MASTER);
+ SlaveValue = IoRead8 (LEGACY_8259_MASK_REGISTER_SLAVE);
+
+ *Mask = (UINT16) (MasterValue | (SlaveValue << 8));
}
if (EdgeLevel != NULL) {
- *EdgeLevel = (UINT16)
- (
- IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER) |
- (IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE) << 8)
- );
+ MasterValue = IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER);
+ SlaveValue = IoRead8 (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE);
+
+ *EdgeLevel = (UINT16) (MasterValue | (SlaveValue << 8));
}
}
//
@@ -432,11 +437,11 @@ Interrupt8259EnableIrq ( return EFI_INVALID_PARAMETER;
}
- mProtectedModeMask &= ~(1 << Irq);
+ mProtectedModeMask = (UINT16) (mProtectedModeMask & ~(1 << Irq));
if (LevelTriggered) {
- mProtectedModeEdgeLevel |= (1 << Irq);
+ mProtectedModeEdgeLevel = (UINT16) (mProtectedModeEdgeLevel | (1 << Irq));
} else {
- mProtectedModeEdgeLevel &= ~(1 << Irq);
+ mProtectedModeEdgeLevel = (UINT16) (mProtectedModeEdgeLevel & ~(1 << Irq));
}
Interrupt8259WriteMask (mProtectedModeMask, mProtectedModeEdgeLevel);
@@ -469,8 +474,8 @@ Interrupt8259DisableIrq ( return EFI_INVALID_PARAMETER;
}
- mProtectedModeMask |= (1 << Irq);
- mProtectedModeEdgeLevel &= ~(1 << Irq);
+ mProtectedModeMask = (UINT16) (mProtectedModeMask | (1 << Irq));
+ mProtectedModeEdgeLevel = (UINT16) (mProtectedModeEdgeLevel & ~(1 << Irq));
Interrupt8259WriteMask (mProtectedModeMask, mProtectedModeEdgeLevel);
|