\r
#include "8259.h"\r
\r
-//\r
-// Global for the CPU I/O Protocol that is consumed by this driver\r
-//\r
-EFI_CPU_IO_PROTOCOL *mCpuIo;\r
-\r
//\r
// Global for the Legacy 8259 Protocol that is prodiced by this driver\r
//\r
//\r
// Worker Functions\r
//\r
-VOID\r
-IoWrite8 (\r
- IN UINT16 Port,\r
- IN UINT8 Value\r
- )\r
-/**\r
-\r
- Routine Description:\r
- Writes an I/O port using the CPU I/O Protocol\r
-\r
- Arguments:\r
- Register - I/O Port to write\r
- Value - The 8 bit value to write to Port\r
-\r
- Returns:\r
- None\r
-\r
-**/\r
-{\r
- mCpuIo->Io.Write (mCpuIo, EfiCpuIoWidthUint8, Port, 1, &Value);\r
-}\r
-\r
-UINT8\r
-IoRead8 (\r
- IN UINT16 Port\r
- )\r
-/**\r
-\r
- Routine Description:\r
- Writes an I/O port using the CPU I/O Protocol\r
-\r
- Arguments:\r
- Register - I/O Port to write\r
- Value - The 8 bit value to write to Port\r
-\r
- Returns:\r
- None\r
-\r
-**/\r
-{\r
- UINT8 Value;\r
-\r
- mCpuIo->Io.Read (mCpuIo, EfiCpuIoWidthUint8, Port, 1, &Value);\r
- return Value;\r
-}\r
-\r
VOID\r
Interrupt8259WriteMask (\r
IN UINT16 Mask,\r
EFI_STATUS Status;\r
EFI_8259_IRQ Irq;\r
\r
- //\r
- // Find the CPU I/O Protocol\r
- //\r
- Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &mCpuIo);\r
- ASSERT_EFI_ERROR (Status);\r
-\r
//\r
// Clear all pending interrupt\r
//\r
EFI_NATIVE_INTERFACE,\r
&m8259\r
);\r
-\r
return Status;\r
}\r
\r
+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2005, 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
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- 8259.dxs\r
-\r
-Abstract:\r
- Dependency expression source file.\r
- \r
---*/ \r
-\r
-#include "EfiDepex.h"\r
-\r
-#include EFI_PROTOCOL_DEFINITION (CpuIo)\r
-\r
-DEPENDENCY_START\r
- EFI_CPU_IO_PROTOCOL_GUID \r
-DEPENDENCY_END\r
-\r
\r
#include <FrameworkDxe.h>\r
\r
-#include <Protocol/CpuIo.h>\r
#include <Protocol/Legacy8259.h>\r
\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/DebugLib.h>\r
+#include <Library/IoLib.h>\r
\r
//\r
// 8259 Hardware definitions\r
UefiBootServicesTableLib\r
DebugLib\r
UefiDriverEntryPoint\r
+ IoLib\r
\r
[Sources.common]\r
8259.c\r
\r
[Protocols]\r
gEfiLegacy8259ProtocolGuid\r
- gEfiCpuIoProtocolGuid\r
\r
[Depex]\r
- gEfiCpuIoProtocolGuid
\ No newline at end of file
+ TRUE
\ No newline at end of file